@skyscanner/backpack-web 6.0.0-alpha.0 → 6.0.0-alpha.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 (1260) hide show
  1. package/bpk-animate-height/README.md +55 -0
  2. package/bpk-animate-height/index.js +4 -13
  3. package/bpk-animate-height/package.json +26 -0
  4. package/bpk-animate-height/src/AnimateHeight.js +76 -86
  5. package/bpk-component-accordion/README.md +124 -0
  6. package/bpk-component-accordion/index.js +30 -44
  7. package/bpk-component-accordion/package.json +31 -0
  8. package/bpk-component-accordion/src/BpkAccordion.js +42 -42
  9. package/bpk-component-accordion/src/{BpkAccordion.css → BpkAccordion.module.css} +0 -0
  10. package/bpk-component-accordion/src/BpkAccordion.module.scss +23 -0
  11. package/bpk-component-accordion/src/BpkAccordionItem.js +105 -91
  12. package/bpk-component-accordion/src/{BpkAccordionItem.css → BpkAccordionItem.module.css} +0 -0
  13. package/bpk-component-accordion/src/BpkAccordionItem.module.scss +117 -0
  14. package/bpk-component-accordion/src/themeAttributes.js +8 -9
  15. package/bpk-component-accordion/src/withAccordionItemState.js +68 -64
  16. package/bpk-component-accordion/src/withSingleItemAccordionState.js +75 -62
  17. package/bpk-component-aria-live/README.md +42 -0
  18. package/bpk-component-aria-live/index.js +10 -21
  19. package/bpk-component-aria-live/package.json +31 -0
  20. package/bpk-component-aria-live/src/BpkAriaLive.js +45 -43
  21. package/bpk-component-aria-live/src/{BpkAriaLive.css → BpkAriaLive.module.css} +0 -0
  22. package/bpk-component-aria-live/src/BpkAriaLive.module.scss +25 -0
  23. package/bpk-component-autosuggest/README.md +126 -0
  24. package/bpk-component-autosuggest/index.js +8 -21
  25. package/bpk-component-autosuggest/package.json +29 -0
  26. package/bpk-component-autosuggest/src/BpkAutosuggest.js +46 -42
  27. package/bpk-component-autosuggest/src/{BpkAutosuggest.css → BpkAutosuggest.module.css} +0 -0
  28. package/bpk-component-autosuggest/src/BpkAutosuggest.module.scss +156 -0
  29. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +82 -64
  30. package/bpk-component-badge/README.md +39 -0
  31. package/bpk-component-badge/index.js +9 -31
  32. package/bpk-component-badge/package.json +29 -0
  33. package/bpk-component-badge/src/BpkBadge.js +49 -52
  34. package/bpk-component-badge/src/{BpkBadge.css → BpkBadge.module.css} +0 -0
  35. package/bpk-component-badge/src/BpkBadge.module.scss +55 -0
  36. package/bpk-component-badge/src/themeAttributes.js +6 -9
  37. package/bpk-component-banner-alert/README.md +153 -0
  38. package/bpk-component-banner-alert/index.js +17 -53
  39. package/bpk-component-banner-alert/package.json +34 -0
  40. package/bpk-component-banner-alert/src/AnimateAndFade.js +142 -126
  41. package/bpk-component-banner-alert/src/{BpkAnimateAndFade.css → BpkAnimateAndFade.module.css} +0 -0
  42. package/bpk-component-banner-alert/src/BpkAnimateAndFade.module.scss +53 -0
  43. package/bpk-component-banner-alert/src/BpkBannerAlert.js +19 -20
  44. package/bpk-component-banner-alert/src/{BpkBannerAlert.css → BpkBannerAlert.module.css} +0 -0
  45. package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +163 -0
  46. package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +52 -45
  47. package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +56 -55
  48. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +185 -141
  49. package/bpk-component-banner-alert/src/common-types.js +41 -26
  50. package/bpk-component-banner-alert/src/themeAttributes.js +7 -9
  51. package/bpk-component-banner-alert/src/withBannerAlertState.js +142 -118
  52. package/bpk-component-barchart/README.md +189 -0
  53. package/bpk-component-barchart/data.json +102 -0
  54. package/bpk-component-barchart/index.js +21 -61
  55. package/bpk-component-barchart/package.json +35 -0
  56. package/bpk-component-barchart/src/BpkBarchart.js +268 -222
  57. package/bpk-component-barchart/src/{BpkBarchart.css → BpkBarchart.module.css} +0 -0
  58. package/bpk-component-barchart/src/BpkBarchart.module.scss +21 -0
  59. package/bpk-component-barchart/src/BpkBarchartBar.js +113 -81
  60. package/bpk-component-barchart/src/{BpkBarchartBar.css → BpkBarchartBar.module.css} +0 -0
  61. package/bpk-component-barchart/src/BpkBarchartBar.module.scss +68 -0
  62. package/bpk-component-barchart/src/BpkBarchartBars.js +129 -117
  63. package/bpk-component-barchart/src/BpkBarchartDefs.js +38 -32
  64. package/bpk-component-barchart/src/BpkChartAxis.js +135 -100
  65. package/bpk-component-barchart/src/{BpkChartAxis.css → BpkChartAxis.module.css} +0 -0
  66. package/bpk-component-barchart/src/BpkChartAxis.module.scss +37 -0
  67. package/bpk-component-barchart/src/BpkChartDataTable.js +49 -43
  68. package/bpk-component-barchart/src/{BpkChartDataTable.css → BpkChartDataTable.module.css} +0 -0
  69. package/bpk-component-barchart/src/BpkChartDataTable.module.scss +28 -0
  70. package/bpk-component-barchart/src/BpkChartGridLines.js +95 -72
  71. package/bpk-component-barchart/src/{BpkChartGridLines.css → BpkChartGridLines.module.css} +0 -0
  72. package/bpk-component-barchart/src/BpkChartGridLines.module.scss +26 -0
  73. package/bpk-component-barchart/src/BpkChartMargin.js +46 -39
  74. package/bpk-component-barchart/src/RTLtransforms.js +49 -50
  75. package/bpk-component-barchart/src/customPropTypes.js +22 -19
  76. package/bpk-component-barchart/src/orientation.js +5 -11
  77. package/bpk-component-barchart/src/themeAttributes.js +9 -9
  78. package/bpk-component-barchart/src/utils.js +10 -20
  79. package/bpk-component-blockquote/README.md +35 -0
  80. package/bpk-component-blockquote/index.js +6 -21
  81. package/bpk-component-blockquote/package.json +24 -0
  82. package/bpk-component-blockquote/src/BpkBlockquote.js +21 -28
  83. package/bpk-component-blockquote/src/{BpkBlockquote.css → BpkBlockquote.module.css} +0 -0
  84. package/bpk-component-blockquote/src/BpkBlockquote.module.scss +29 -0
  85. package/bpk-component-blockquote/src/themeAttributes.js +2 -9
  86. package/bpk-component-breadcrumb/README.md +58 -0
  87. package/bpk-component-breadcrumb/index.js +14 -21
  88. package/bpk-component-breadcrumb/package.json +27 -0
  89. package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +79 -68
  90. package/bpk-component-breadcrumb/src/{BpkBreadcrumb.css → BpkBreadcrumb.module.css} +0 -0
  91. package/bpk-component-breadcrumb/src/BpkBreadcrumb.module.scss +27 -0
  92. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +77 -70
  93. package/bpk-component-breadcrumb/src/{BpkBreadcrumbItem.css → BpkBreadcrumbItem.module.css} +0 -0
  94. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.scss +40 -0
  95. package/bpk-component-breakpoint/README.md +34 -0
  96. package/bpk-component-breakpoint/index.js +7 -21
  97. package/bpk-component-breakpoint/package.json +28 -0
  98. package/bpk-component-breakpoint/src/BpkBreakpoint.js +38 -46
  99. package/bpk-component-button/BpkButtonDestructive.js +19 -13
  100. package/bpk-component-button/BpkButtonFeatured.js +19 -13
  101. package/bpk-component-button/BpkButtonLink.js +19 -13
  102. package/bpk-component-button/BpkButtonLinkOnDark.js +19 -13
  103. package/bpk-component-button/BpkButtonOutline.js +19 -13
  104. package/bpk-component-button/BpkButtonPrimary.js +19 -13
  105. package/bpk-component-button/BpkButtonPrimaryOnDark.js +19 -13
  106. package/bpk-component-button/BpkButtonPrimaryOnLight.js +19 -13
  107. package/bpk-component-button/BpkButtonSecondary.js +19 -13
  108. package/bpk-component-button/BpkButtonSecondaryOnDark.js +19 -13
  109. package/bpk-component-button/README.md +140 -0
  110. package/bpk-component-button/index.js +40 -144
  111. package/bpk-component-button/package.json +26 -0
  112. package/bpk-component-button/src/BpkButton.js +87 -64
  113. package/bpk-component-button/src/BpkButtonBase.js +74 -64
  114. package/bpk-component-button/src/BpkButtonBase.module.css +18 -0
  115. package/bpk-component-button/src/BpkButtonBase.module.scss +50 -0
  116. package/bpk-component-button/src/BpkButtonDestructive.js +36 -51
  117. package/bpk-component-button/src/BpkButtonDestructive.module.css +18 -0
  118. package/bpk-component-button/src/BpkButtonDestructive.module.scss +24 -0
  119. package/bpk-component-button/src/BpkButtonFeatured.js +36 -51
  120. package/bpk-component-button/src/{BpkButtonFeatured.css → BpkButtonFeatured.module.css} +1 -1
  121. package/bpk-component-button/src/BpkButtonFeatured.module.scss +23 -0
  122. package/bpk-component-button/src/BpkButtonLink.js +43 -53
  123. package/bpk-component-button/src/BpkButtonLink.module.css +18 -0
  124. package/{bpk-component-split-input/src/BpkSplitInput.css → bpk-component-button/src/BpkButtonLink.module.scss} +13 -6
  125. package/bpk-component-button/src/BpkButtonLinkOnDark.js +43 -53
  126. package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +18 -0
  127. package/bpk-component-button/src/BpkButtonLinkOnDark.module.scss +23 -0
  128. package/bpk-component-button/src/BpkButtonOutline.js +36 -51
  129. package/bpk-component-button/src/{BpkButtonOutline.css → BpkButtonOutline.module.css} +0 -0
  130. package/bpk-component-button/src/BpkButtonOutline.module.scss +23 -0
  131. package/bpk-component-button/src/BpkButtonPrimary.js +29 -25
  132. package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +36 -51
  133. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +18 -0
  134. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.scss +23 -0
  135. package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +36 -51
  136. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +18 -0
  137. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.scss +23 -0
  138. package/bpk-component-button/src/BpkButtonSecondary.js +36 -51
  139. package/bpk-component-button/src/BpkButtonSecondary.module.css +18 -0
  140. package/bpk-component-button/src/BpkButtonSecondary.module.scss +23 -0
  141. package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +36 -51
  142. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +18 -0
  143. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.scss +23 -0
  144. package/bpk-component-button/src/common-types.js +33 -24
  145. package/bpk-component-button/src/commonButtonTests.js +63 -79
  146. package/bpk-component-button/src/themeAttributes.js +75 -23
  147. package/bpk-component-button/themeAttributes.js +28 -53
  148. package/bpk-component-calendar/DOCS.md +29 -0
  149. package/bpk-component-calendar/README.md +406 -0
  150. package/bpk-component-calendar/index.js +43 -126
  151. package/bpk-component-calendar/package.json +34 -0
  152. package/bpk-component-calendar/src/{BpkCalendar.css → BpkCalendar.module.css} +0 -0
  153. package/bpk-component-calendar/src/BpkCalendar.module.scss +42 -0
  154. package/bpk-component-calendar/src/BpkCalendarContainer.js +271 -237
  155. package/bpk-component-calendar/src/BpkCalendarDate.js +121 -119
  156. package/bpk-component-calendar/src/{BpkCalendarDate.css → BpkCalendarDate.module.css} +0 -0
  157. package/bpk-component-calendar/src/BpkCalendarDate.module.scss +164 -0
  158. package/bpk-component-calendar/src/BpkCalendarGrid.js +152 -127
  159. package/bpk-component-calendar/src/{BpkCalendarGrid.css → BpkCalendarGrid.module.css} +0 -0
  160. package/bpk-component-calendar/src/BpkCalendarGrid.module.scss +64 -0
  161. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +60 -72
  162. package/bpk-component-calendar/src/{BpkCalendarGridHeader.css → BpkCalendarGridHeader.module.css} +0 -0
  163. package/bpk-component-calendar/src/BpkCalendarGridHeader.module.scss +53 -0
  164. package/bpk-component-calendar/src/BpkCalendarGridTransition.js +143 -103
  165. package/bpk-component-calendar/src/{BpkCalendarGridTransition.css → BpkCalendarGridTransition.module.css} +0 -0
  166. package/bpk-component-calendar/src/BpkCalendarGridTransition.module.scss +47 -0
  167. package/bpk-component-calendar/src/BpkCalendarNav.js +136 -140
  168. package/bpk-component-calendar/src/{BpkCalendarNav.css → BpkCalendarNav.module.css} +0 -0
  169. package/bpk-component-calendar/src/BpkCalendarNav.module.scss +89 -0
  170. package/bpk-component-calendar/src/Week.js +285 -216
  171. package/bpk-component-calendar/src/_variables.scss +24 -0
  172. package/bpk-component-calendar/src/composeCalendar.js +123 -108
  173. package/bpk-component-calendar/src/custom-proptypes.js +41 -50
  174. package/bpk-component-calendar/src/date-utils.js +93 -223
  175. package/bpk-component-calendar/src/themeAttributes.js +13 -9
  176. package/bpk-component-calendar/src/utils.js +20 -28
  177. package/bpk-component-calendar/test-utils.js +272 -239
  178. package/bpk-component-card/README.md +34 -0
  179. package/bpk-component-card/index.js +5 -13
  180. package/bpk-component-card/package.json +28 -0
  181. package/bpk-component-card/src/BpkCard.js +67 -65
  182. package/bpk-component-card/src/{BpkCard.css → BpkCard.module.css} +0 -0
  183. package/bpk-component-card/src/BpkCard.module.scss +27 -0
  184. package/bpk-component-checkbox/README.md +47 -0
  185. package/bpk-component-checkbox/index.js +8 -21
  186. package/bpk-component-checkbox/package.json +29 -0
  187. package/bpk-component-checkbox/src/BpkCheckbox.js +100 -64
  188. package/bpk-component-checkbox/src/{BpkCheckbox.css → BpkCheckbox.module.css} +0 -0
  189. package/bpk-component-checkbox/src/BpkCheckbox.module.scss +70 -0
  190. package/bpk-component-checkbox/src/themeAttributes.js +4 -9
  191. package/bpk-component-chip/README.md +111 -0
  192. package/bpk-component-chip/index.js +17 -37
  193. package/bpk-component-chip/package.json +29 -0
  194. package/bpk-component-chip/src/BpkDismissibleChip.js +53 -32
  195. package/bpk-component-chip/src/BpkSelectableChip.js +86 -70
  196. package/bpk-component-chip/src/{BpkSelectableChip.css → BpkSelectableChip.module.css} +0 -0
  197. package/bpk-component-chip/src/BpkSelectableChip.module.scss +23 -0
  198. package/bpk-component-chip/src/commonTypes.js +33 -28
  199. package/bpk-component-chip/src/themeAttributes.js +17 -9
  200. package/bpk-component-close-button/README.md +27 -0
  201. package/bpk-component-close-button/index.js +6 -13
  202. package/bpk-component-close-button/package.json +28 -0
  203. package/bpk-component-close-button/src/BpkCloseButton.js +56 -56
  204. package/bpk-component-close-button/src/{BpkCloseButton.css → BpkCloseButton.module.css} +0 -0
  205. package/bpk-component-close-button/src/BpkCloseButton.module.scss +51 -0
  206. package/bpk-component-code/README.md +43 -0
  207. package/bpk-component-code/index.js +21 -21
  208. package/bpk-component-code/package.json +24 -0
  209. package/bpk-component-code/src/BpkCode.js +44 -45
  210. package/bpk-component-code/src/{BpkCode.css → BpkCode.module.css} +0 -0
  211. package/bpk-component-code/src/BpkCode.module.scss +27 -0
  212. package/bpk-component-code/src/BpkCodeBlock.js +50 -47
  213. package/bpk-component-code/src/{BpkCodeBlock.css → BpkCodeBlock.module.css} +0 -0
  214. package/bpk-component-code/src/BpkCodeBlock.module.scss +33 -0
  215. package/bpk-component-content-container/README.md +33 -0
  216. package/bpk-component-content-container/index.js +4 -13
  217. package/bpk-component-content-container/package.json +24 -0
  218. package/bpk-component-content-container/src/BpkContentContainer.js +53 -47
  219. package/bpk-component-content-container/src/BpkContentContainer.module.css +18 -0
  220. package/bpk-component-content-container/src/BpkContentContainer.module.scss +41 -0
  221. package/bpk-component-datatable/README.md +141 -0
  222. package/bpk-component-datatable/index.js +20 -22
  223. package/bpk-component-datatable/package.json +30 -0
  224. package/bpk-component-datatable/src/BpkDataTable.js +155 -177
  225. package/bpk-component-datatable/src/{BpkDataTable.css → BpkDataTable.module.css} +0 -0
  226. package/bpk-component-datatable/src/BpkDataTable.module.scss +92 -0
  227. package/bpk-component-datatable/src/BpkDataTableColumn.js +50 -52
  228. package/bpk-component-datatable/src/{BpkDataTableColumn.css → BpkDataTableColumn.module.css} +0 -0
  229. package/bpk-component-datatable/src/BpkDataTableColumn.module.scss +65 -0
  230. package/bpk-component-datatable/src/bpkHeaderRenderer.js +72 -60
  231. package/bpk-component-datatable/src/common-types.js +48 -3
  232. package/bpk-component-datatable/src/hasChildrenOfType.js +36 -29
  233. package/bpk-component-datatable/src/sort-types.js +29 -1
  234. package/bpk-component-datatable/src/sorter.js +89 -62
  235. package/bpk-component-datatable/src/utils.js +6 -11
  236. package/bpk-component-datepicker/README.md +177 -0
  237. package/bpk-component-datepicker/index.js +8 -29
  238. package/bpk-component-datepicker/package.json +33 -0
  239. package/bpk-component-datepicker/src/BpkDatepicker.js +269 -220
  240. package/bpk-component-datepicker/src/{BpkDatepicker.css → BpkDatepicker.module.css} +0 -0
  241. package/bpk-component-datepicker/src/BpkDatepicker.module.scss +25 -0
  242. package/bpk-component-datepicker/src/themeAttributes.js +11 -15
  243. package/bpk-component-description-list/README.md +46 -0
  244. package/bpk-component-description-list/index.js +21 -29
  245. package/bpk-component-description-list/package.json +24 -0
  246. package/bpk-component-description-list/src/BpkDescriptionDetails.js +3 -13
  247. package/bpk-component-description-list/src/BpkDescriptionList.js +3 -13
  248. package/bpk-component-description-list/src/{BpkDescriptionList.css → BpkDescriptionList.module.css} +0 -0
  249. package/bpk-component-description-list/src/BpkDescriptionList.module.scss +37 -0
  250. package/bpk-component-description-list/src/BpkDescriptionTerm.js +3 -13
  251. package/bpk-component-description-list/src/ComponentFactory.js +37 -41
  252. package/bpk-component-dialog/README.md +105 -0
  253. package/bpk-component-dialog/index.js +9 -21
  254. package/bpk-component-dialog/package.json +32 -0
  255. package/bpk-component-dialog/src/BpkDialog.js +78 -64
  256. package/bpk-component-dialog/src/{BpkDialog.css → BpkDialog.module.css} +0 -0
  257. package/bpk-component-dialog/src/BpkDialog.module.scss +80 -0
  258. package/bpk-component-dialog/src/BpkDialogInner.js +74 -59
  259. package/bpk-component-dialog/src/BpkDialogInner.module.css +18 -0
  260. package/bpk-component-dialog/src/BpkDialogInner.module.scss +62 -0
  261. package/bpk-component-dialog/src/common-types.js +80 -56
  262. package/bpk-component-drawer/README.md +90 -0
  263. package/bpk-component-drawer/index.js +8 -21
  264. package/bpk-component-drawer/package.json +34 -0
  265. package/bpk-component-drawer/src/BpkDrawer.js +76 -86
  266. package/bpk-component-drawer/src/{BpkDrawer.css → BpkDrawer.module.css} +0 -0
  267. package/bpk-component-drawer/src/BpkDrawer.module.scss +23 -0
  268. package/bpk-component-drawer/src/BpkDrawerContent.js +123 -97
  269. package/bpk-component-drawer/src/{BpkDrawerContent.css → BpkDrawerContent.module.css} +1 -1
  270. package/bpk-component-drawer/src/BpkDrawerContent.module.scss +107 -0
  271. package/bpk-component-drawer/src/themeAttributes.js +6 -11
  272. package/bpk-component-fieldset/README.md +73 -0
  273. package/bpk-component-fieldset/index.js +13 -37
  274. package/bpk-component-fieldset/package.json +36 -0
  275. package/bpk-component-fieldset/src/BpkFieldset.js +130 -104
  276. package/bpk-component-fieldset/src/{BpkFieldset.css → BpkFieldset.module.css} +0 -0
  277. package/bpk-component-fieldset/src/BpkFieldset.module.scss +39 -0
  278. package/bpk-component-fieldset/src/themeAttributes.js +2 -9
  279. package/bpk-component-flare/README.md +52 -0
  280. package/bpk-component-flare/index.js +8 -27
  281. package/bpk-component-flare/package.json +29 -0
  282. package/bpk-component-flare/src/BpkContentBubble.js +67 -59
  283. package/bpk-component-flare/src/BpkFlareBar.js +55 -57
  284. package/bpk-component-flare/src/__generated__/js/corner-radius.js +5 -33
  285. package/bpk-component-flare/src/__generated__/js/pointer.js +5 -33
  286. package/bpk-component-flare/src/{bpk-content-bubble.css → bpk-content-bubble.module.css} +0 -0
  287. package/bpk-component-flare/src/bpk-content-bubble.module.scss +60 -0
  288. package/bpk-component-flare/src/{bpk-flare-bar.css → bpk-flare-bar.module.css} +1 -1
  289. package/bpk-component-flare/src/bpk-flare-bar.module.scss +74 -0
  290. package/bpk-component-flare/src/svgs/corner-radius.svg +1 -0
  291. package/bpk-component-flare/src/svgs/pointer.svg +1 -0
  292. package/bpk-component-floating-notification/README.md +58 -0
  293. package/bpk-component-floating-notification/index.js +10 -21
  294. package/bpk-component-floating-notification/package.json +25 -0
  295. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +121 -88
  296. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +18 -0
  297. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.scss +96 -0
  298. package/bpk-component-form-validation/README.md +33 -0
  299. package/bpk-component-form-validation/index.js +6 -21
  300. package/bpk-component-form-validation/package.json +34 -0
  301. package/bpk-component-form-validation/src/BpkFormValidation.js +75 -67
  302. package/bpk-component-form-validation/src/{BpkFormValidation.css → BpkFormValidation.module.css} +0 -0
  303. package/bpk-component-form-validation/src/BpkFormValidation.module.scss +44 -0
  304. package/bpk-component-form-validation/src/themeAttributes.js +2 -9
  305. package/bpk-component-graphic-promotion/README.md +68 -0
  306. package/bpk-component-graphic-promotion/index.js +10 -21
  307. package/bpk-component-graphic-promotion/package.json +25 -0
  308. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +132 -103
  309. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +18 -0
  310. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.scss +260 -0
  311. package/bpk-component-graphic-promotion/src/custom-breakpoints.module.css +17 -0
  312. package/bpk-component-graphic-promotion/src/custom-breakpoints.module.scss +70 -0
  313. package/bpk-component-grid/README.md +90 -0
  314. package/bpk-component-grid/index.js +8 -21
  315. package/bpk-component-grid/package.json +24 -0
  316. package/bpk-component-grid/src/BpkGridColumn.js +66 -60
  317. package/bpk-component-grid/src/BpkGridColumn.module.css +18 -0
  318. package/bpk-component-grid/src/BpkGridColumn.module.scss +73 -0
  319. package/bpk-component-grid/src/BpkGridContainer.js +41 -48
  320. package/bpk-component-grid/src/BpkGridContainer.module.css +18 -0
  321. package/bpk-component-grid/src/BpkGridContainer.module.scss +33 -0
  322. package/bpk-component-grid/src/BpkGridRow.js +40 -45
  323. package/bpk-component-grid/src/{BpkGridRow.css → BpkGridRow.module.css} +1 -1
  324. package/bpk-component-grid/src/BpkGridRow.module.scss +29 -0
  325. package/bpk-component-grid-toggle/README.md +27 -0
  326. package/bpk-component-grid-toggle/index.js +4 -13
  327. package/bpk-component-grid-toggle/package.json +25 -0
  328. package/bpk-component-grid-toggle/src/BpkGridToggle.js +67 -55
  329. package/bpk-component-grid-toggle/src/{BpkGridToggle.css → BpkGridToggle.module.css} +0 -0
  330. package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +52 -0
  331. package/bpk-component-horizontal-nav/README.md +103 -0
  332. package/bpk-component-horizontal-nav/index.js +15 -35
  333. package/bpk-component-horizontal-nav/package.json +30 -0
  334. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +152 -133
  335. package/bpk-component-horizontal-nav/src/{BpkHorizontalNav.css → BpkHorizontalNav.module.css} +0 -0
  336. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.scss +37 -0
  337. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +110 -87
  338. package/bpk-component-horizontal-nav/src/{BpkHorizontalNavItem.css → BpkHorizontalNavItem.module.css} +0 -0
  339. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.scss +152 -0
  340. package/bpk-component-icon/README.md +79 -0
  341. package/bpk-component-icon/all.js +6 -5
  342. package/bpk-component-icon/index.js +27 -40
  343. package/bpk-component-icon/lg/accessibility.js +8 -39
  344. package/bpk-component-icon/lg/account--add.js +8 -39
  345. package/bpk-component-icon/lg/account--female.js +8 -39
  346. package/bpk-component-icon/lg/account--id-card.js +8 -39
  347. package/bpk-component-icon/lg/account--name.js +8 -39
  348. package/bpk-component-icon/lg/account--permit.js +8 -39
  349. package/bpk-component-icon/lg/account-circle.js +8 -39
  350. package/bpk-component-icon/lg/account.js +8 -39
  351. package/bpk-component-icon/lg/add-circle.js +8 -39
  352. package/bpk-component-icon/lg/adult.js +8 -39
  353. package/bpk-component-icon/lg/aircon.js +8 -39
  354. package/bpk-component-icon/lg/aircraft.js +8 -41
  355. package/bpk-component-icon/lg/airline--multiple.js +8 -39
  356. package/bpk-component-icon/lg/airline.js +8 -39
  357. package/bpk-component-icon/lg/airports.js +8 -39
  358. package/bpk-component-icon/lg/alert--active.js +8 -39
  359. package/bpk-component-icon/lg/alert--add.js +8 -39
  360. package/bpk-component-icon/lg/alert--expired.js +8 -39
  361. package/bpk-component-icon/lg/alert--remove.js +8 -39
  362. package/bpk-component-icon/lg/arrow-down.js +8 -39
  363. package/bpk-component-icon/lg/arrow-left.js +8 -39
  364. package/bpk-component-icon/lg/arrow-right.js +8 -39
  365. package/bpk-component-icon/lg/arrow-up.js +8 -39
  366. package/bpk-component-icon/lg/award.js +8 -39
  367. package/bpk-component-icon/lg/baby-carriage.js +8 -39
  368. package/bpk-component-icon/lg/baggage--add.js +8 -39
  369. package/bpk-component-icon/lg/baggage--remove.js +8 -39
  370. package/bpk-component-icon/lg/baggage-cross.js +8 -39
  371. package/bpk-component-icon/lg/baggage-tick.js +8 -39
  372. package/bpk-component-icon/lg/baggage.js +8 -39
  373. package/bpk-component-icon/lg/bar.js +8 -39
  374. package/bpk-component-icon/lg/beach.js +8 -41
  375. package/bpk-component-icon/lg/beer.js +8 -39
  376. package/bpk-component-icon/lg/breakfast-cross.js +8 -39
  377. package/bpk-component-icon/lg/breakfast-tick.js +8 -39
  378. package/bpk-component-icon/lg/bus.js +8 -39
  379. package/bpk-component-icon/lg/business.js +8 -39
  380. package/bpk-component-icon/lg/cafe.js +8 -39
  381. package/bpk-component-icon/lg/calendar.js +8 -39
  382. package/bpk-component-icon/lg/call-back.js +8 -41
  383. package/bpk-component-icon/lg/camera.js +8 -39
  384. package/bpk-component-icon/lg/camper-van.js +8 -41
  385. package/bpk-component-icon/lg/car-door.js +8 -39
  386. package/bpk-component-icon/lg/car-wash.js +8 -41
  387. package/bpk-component-icon/lg/cars-flexible.js +8 -39
  388. package/bpk-component-icon/lg/cars.js +8 -41
  389. package/bpk-component-icon/lg/center-location.js +8 -39
  390. package/bpk-component-icon/lg/chart.js +8 -39
  391. package/bpk-component-icon/lg/chauffeur.js +8 -39
  392. package/bpk-component-icon/lg/chevron-down.js +8 -39
  393. package/bpk-component-icon/lg/chevron-left.js +8 -39
  394. package/bpk-component-icon/lg/chevron-right.js +8 -39
  395. package/bpk-component-icon/lg/chevron-up.js +8 -39
  396. package/bpk-component-icon/lg/child-seat.js +8 -39
  397. package/bpk-component-icon/lg/child.js +8 -39
  398. package/bpk-component-icon/lg/city-center.js +8 -39
  399. package/bpk-component-icon/lg/city.js +8 -39
  400. package/bpk-component-icon/lg/clean-policy.js +8 -39
  401. package/bpk-component-icon/lg/clean.js +8 -43
  402. package/bpk-component-icon/lg/cleaning-medical.js +8 -39
  403. package/bpk-component-icon/lg/cloakroom.js +8 -43
  404. package/bpk-component-icon/lg/close-circle.js +8 -39
  405. package/bpk-component-icon/lg/close.js +8 -39
  406. package/bpk-component-icon/lg/collapse.js +8 -39
  407. package/bpk-component-icon/lg/content--copy.js +8 -41
  408. package/bpk-component-icon/lg/content--event.js +8 -39
  409. package/bpk-component-icon/lg/content--guides.js +8 -39
  410. package/bpk-component-icon/lg/currency.js +8 -39
  411. package/bpk-component-icon/lg/data.js +8 -41
  412. package/bpk-component-icon/lg/deals.js +8 -39
  413. package/bpk-component-icon/lg/depart.js +8 -41
  414. package/bpk-component-icon/lg/device-mid.js +8 -39
  415. package/bpk-component-icon/lg/device-wide.js +8 -39
  416. package/bpk-component-icon/lg/direct.js +8 -39
  417. package/bpk-component-icon/lg/document-csv.js +8 -39
  418. package/bpk-component-icon/lg/document-pdf.js +8 -39
  419. package/bpk-component-icon/lg/download.js +8 -41
  420. package/bpk-component-icon/lg/duration.js +8 -39
  421. package/bpk-component-icon/lg/eco-leaf.js +8 -39
  422. package/bpk-component-icon/lg/edit.js +8 -39
  423. package/bpk-component-icon/lg/education.js +8 -41
  424. package/bpk-component-icon/lg/electric.js +8 -39
  425. package/bpk-component-icon/lg/end-call.js +8 -39
  426. package/bpk-component-icon/lg/estimated.js +8 -39
  427. package/bpk-component-icon/lg/exclamation-circle.js +8 -39
  428. package/bpk-component-icon/lg/exclamation.js +8 -39
  429. package/bpk-component-icon/lg/expand.js +8 -39
  430. package/bpk-component-icon/lg/explore.js +8 -39
  431. package/bpk-component-icon/lg/face--blank.js +8 -39
  432. package/bpk-component-icon/lg/face--happy.js +8 -39
  433. package/bpk-component-icon/lg/face--sad.js +8 -39
  434. package/bpk-component-icon/lg/face-id.js +8 -39
  435. package/bpk-component-icon/lg/face-mask.js +8 -39
  436. package/bpk-component-icon/lg/family.js +8 -39
  437. package/bpk-component-icon/lg/fast-track.js +8 -41
  438. package/bpk-component-icon/lg/fast-train.js +8 -41
  439. package/bpk-component-icon/lg/filter.js +8 -40
  440. package/bpk-component-icon/lg/fingerprint.js +8 -39
  441. package/bpk-component-icon/lg/flag.js +8 -39
  442. package/bpk-component-icon/lg/flask.js +8 -39
  443. package/bpk-component-icon/lg/flight-flexible.js +8 -39
  444. package/bpk-component-icon/lg/flight-landing.js +8 -43
  445. package/bpk-component-icon/lg/flight-takeoff.js +8 -41
  446. package/bpk-component-icon/lg/flight.js +8 -41
  447. package/bpk-component-icon/lg/food.js +8 -39
  448. package/bpk-component-icon/lg/gears-automatic-circle.js +8 -39
  449. package/bpk-component-icon/lg/gears-automatic.js +8 -39
  450. package/bpk-component-icon/lg/gears-manual-circle.js +8 -39
  451. package/bpk-component-icon/lg/gears-manual.js +8 -39
  452. package/bpk-component-icon/lg/globe.js +8 -39
  453. package/bpk-component-icon/lg/grid-layout.js +8 -39
  454. package/bpk-component-icon/lg/headset.js +8 -39
  455. package/bpk-component-icon/lg/health-fitness.js +8 -39
  456. package/bpk-component-icon/lg/heart--outline.js +8 -39
  457. package/bpk-component-icon/lg/heart.js +8 -39
  458. package/bpk-component-icon/lg/help-circle.js +8 -39
  459. package/bpk-component-icon/lg/help.js +8 -39
  460. package/bpk-component-icon/lg/hide.js +8 -39
  461. package/bpk-component-icon/lg/hotel-flexible.js +8 -39
  462. package/bpk-component-icon/lg/hotels--disabled-facilities.js +8 -39
  463. package/bpk-component-icon/lg/hotels--jacuzzi.js +8 -39
  464. package/bpk-component-icon/lg/hotels--pets-allowed.js +8 -39
  465. package/bpk-component-icon/lg/hotels--smoking.js +8 -39
  466. package/bpk-component-icon/lg/hotels.js +8 -39
  467. package/bpk-component-icon/lg/infant.js +8 -39
  468. package/bpk-component-icon/lg/information--language-alert.js +8 -39
  469. package/bpk-component-icon/lg/information--language-question.js +8 -39
  470. package/bpk-component-icon/lg/information--language.js +8 -39
  471. package/bpk-component-icon/lg/information-circle.js +8 -39
  472. package/bpk-component-icon/lg/information.js +8 -39
  473. package/bpk-component-icon/lg/insurance.js +8 -39
  474. package/bpk-component-icon/lg/key.js +8 -39
  475. package/bpk-component-icon/lg/keypad.js +8 -39
  476. package/bpk-component-icon/lg/landmark.js +8 -39
  477. package/bpk-component-icon/lg/language.js +8 -39
  478. package/bpk-component-icon/lg/legroom--extra.js +8 -41
  479. package/bpk-component-icon/lg/legroom--normal.js +8 -41
  480. package/bpk-component-icon/lg/legroom--reduced.js +8 -41
  481. package/bpk-component-icon/lg/leisure.js +8 -39
  482. package/bpk-component-icon/lg/lightning.js +8 -39
  483. package/bpk-component-icon/lg/list.js +8 -39
  484. package/bpk-component-icon/lg/location.js +8 -39
  485. package/bpk-component-icon/lg/lock.js +8 -39
  486. package/bpk-component-icon/lg/logout.js +8 -41
  487. package/bpk-component-icon/lg/long-arrow-down.js +8 -39
  488. package/bpk-component-icon/lg/long-arrow-left.js +8 -39
  489. package/bpk-component-icon/lg/long-arrow-right.js +8 -39
  490. package/bpk-component-icon/lg/long-arrow-up.js +8 -39
  491. package/bpk-component-icon/lg/lounge.js +8 -41
  492. package/bpk-component-icon/lg/luggageall.js +8 -39
  493. package/bpk-component-icon/lg/mail.js +8 -41
  494. package/bpk-component-icon/lg/map.js +8 -39
  495. package/bpk-component-icon/lg/meal.js +8 -39
  496. package/bpk-component-icon/lg/media.js +8 -39
  497. package/bpk-component-icon/lg/menu--horizontal.js +8 -39
  498. package/bpk-component-icon/lg/menu--vertical.js +8 -39
  499. package/bpk-component-icon/lg/menu.js +8 -39
  500. package/bpk-component-icon/lg/mileage.js +8 -41
  501. package/bpk-component-icon/lg/minus.js +8 -39
  502. package/bpk-component-icon/lg/mobile.js +8 -39
  503. package/bpk-component-icon/lg/money.js +8 -39
  504. package/bpk-component-icon/lg/multiple-bookings.js +8 -39
  505. package/bpk-component-icon/lg/music.js +8 -39
  506. package/bpk-component-icon/lg/mute.js +8 -39
  507. package/bpk-component-icon/lg/native-android--back.js +8 -39
  508. package/bpk-component-icon/lg/native-android--close.js +8 -39
  509. package/bpk-component-icon/lg/native-android--forward.js +8 -39
  510. package/bpk-component-icon/lg/native-ios-close.js +8 -39
  511. package/bpk-component-icon/lg/navigation.js +8 -39
  512. package/bpk-component-icon/lg/new-window.js +8 -41
  513. package/bpk-component-icon/lg/news.js +8 -39
  514. package/bpk-component-icon/lg/night.js +8 -39
  515. package/bpk-component-icon/lg/not-allowed.js +8 -39
  516. package/bpk-component-icon/lg/onsen.js +8 -39
  517. package/bpk-component-icon/lg/paid.js +8 -39
  518. package/bpk-component-icon/lg/paperclip.js +8 -39
  519. package/bpk-component-icon/lg/parking.js +8 -39
  520. package/bpk-component-icon/lg/passport.js +8 -39
  521. package/bpk-component-icon/lg/pause.js +8 -39
  522. package/bpk-component-icon/lg/payment-card.js +8 -39
  523. package/bpk-component-icon/lg/petrol.js +8 -39
  524. package/bpk-component-icon/lg/phone-call.js +8 -39
  525. package/bpk-component-icon/lg/picture.js +8 -39
  526. package/bpk-component-icon/lg/pin.js +8 -39
  527. package/bpk-component-icon/lg/plane-seat.js +8 -41
  528. package/bpk-component-icon/lg/play.js +8 -39
  529. package/bpk-component-icon/lg/plus.js +8 -39
  530. package/bpk-component-icon/lg/policy.js +8 -39
  531. package/bpk-component-icon/lg/powerplug.js +8 -39
  532. package/bpk-component-icon/lg/ppe.js +8 -39
  533. package/bpk-component-icon/lg/price-alerts.js +8 -39
  534. package/bpk-component-icon/lg/price-tag.js +8 -39
  535. package/bpk-component-icon/lg/print.js +8 -39
  536. package/bpk-component-icon/lg/recent-searches.js +8 -39
  537. package/bpk-component-icon/lg/redo.js +8 -39
  538. package/bpk-component-icon/lg/refresh.js +8 -39
  539. package/bpk-component-icon/lg/return.js +8 -41
  540. package/bpk-component-icon/lg/room.js +8 -39
  541. package/bpk-component-icon/lg/scales.js +8 -41
  542. package/bpk-component-icon/lg/search.js +8 -39
  543. package/bpk-component-icon/lg/self-service.js +8 -39
  544. package/bpk-component-icon/lg/send-message.js +8 -39
  545. package/bpk-component-icon/lg/services.js +8 -39
  546. package/bpk-component-icon/lg/settings.js +8 -39
  547. package/bpk-component-icon/lg/share--android.js +8 -39
  548. package/bpk-component-icon/lg/share--ios.js +8 -41
  549. package/bpk-component-icon/lg/share.js +8 -39
  550. package/bpk-component-icon/lg/single-booking.js +8 -39
  551. package/bpk-component-icon/lg/social-distancing.js +8 -41
  552. package/bpk-component-icon/lg/social-like.js +8 -39
  553. package/bpk-component-icon/lg/sort-down.js +8 -39
  554. package/bpk-component-icon/lg/sort-up.js +8 -39
  555. package/bpk-component-icon/lg/sort.js +8 -39
  556. package/bpk-component-icon/lg/speaker.js +8 -41
  557. package/bpk-component-icon/lg/star-half.js +8 -39
  558. package/bpk-component-icon/lg/star-outline.js +8 -39
  559. package/bpk-component-icon/lg/star.js +8 -39
  560. package/bpk-component-icon/lg/stops.js +8 -39
  561. package/bpk-component-icon/lg/swap--horizontal.js +8 -39
  562. package/bpk-component-icon/lg/swap--vertical.js +8 -39
  563. package/bpk-component-icon/lg/swap.js +8 -39
  564. package/bpk-component-icon/lg/taxi.js +8 -41
  565. package/bpk-component-icon/lg/thumbs-down.js +8 -39
  566. package/bpk-component-icon/lg/thumbs-up.js +8 -39
  567. package/bpk-component-icon/lg/tick-circle.js +8 -39
  568. package/bpk-component-icon/lg/tick.js +8 -39
  569. package/bpk-component-icon/lg/ticket-flexible.js +8 -39
  570. package/bpk-component-icon/lg/ticket.js +8 -39
  571. package/bpk-component-icon/lg/time.js +8 -39
  572. package/bpk-component-icon/lg/toilets.js +8 -39
  573. package/bpk-component-icon/lg/train.js +8 -39
  574. package/bpk-component-icon/lg/transmission-automatic.js +8 -39
  575. package/bpk-component-icon/lg/transmission-manual.js +8 -39
  576. package/bpk-component-icon/lg/trash.js +8 -39
  577. package/bpk-component-icon/lg/trend--down.js +8 -39
  578. package/bpk-component-icon/lg/trend--steady.js +8 -39
  579. package/bpk-component-icon/lg/trend--will-rise.js +8 -39
  580. package/bpk-component-icon/lg/trend.js +8 -39
  581. package/bpk-component-icon/lg/trips.js +8 -39
  582. package/bpk-component-icon/lg/undo.js +8 -39
  583. package/bpk-component-icon/lg/unlock.js +8 -39
  584. package/bpk-component-icon/lg/unmute.js +8 -41
  585. package/bpk-component-icon/lg/upgrade.js +8 -39
  586. package/bpk-component-icon/lg/use-location.js +8 -39
  587. package/bpk-component-icon/lg/view.js +8 -39
  588. package/bpk-component-icon/lg/virus.js +8 -39
  589. package/bpk-component-icon/lg/wallet.js +8 -41
  590. package/bpk-component-icon/lg/weather--clear.js +8 -39
  591. package/bpk-component-icon/lg/weather--cloudy.js +8 -41
  592. package/bpk-component-icon/lg/weather--fog.js +8 -39
  593. package/bpk-component-icon/lg/weather--partly-cloudy.js +8 -41
  594. package/bpk-component-icon/lg/weather--rain.js +8 -43
  595. package/bpk-component-icon/lg/weather--snow.js +8 -39
  596. package/bpk-component-icon/lg/weather--thunderstorm.js +8 -43
  597. package/bpk-component-icon/lg/weather--tornado.js +8 -39
  598. package/bpk-component-icon/lg/weather--wind.js +8 -39
  599. package/bpk-component-icon/lg/weather.js +8 -39
  600. package/bpk-component-icon/lg/wifi.js +8 -39
  601. package/bpk-component-icon/lg/window--reduce.js +8 -41
  602. package/bpk-component-icon/lg/window.js +8 -39
  603. package/bpk-component-icon/lg/world--amer.js +8 -39
  604. package/bpk-component-icon/lg/world--apac.js +8 -39
  605. package/bpk-component-icon/lg/world--emea.js +8 -41
  606. package/bpk-component-icon/package.json +34 -0
  607. package/bpk-component-icon/sm/accessibility.js +8 -40
  608. package/bpk-component-icon/sm/account--add.js +8 -40
  609. package/bpk-component-icon/sm/account--female.js +8 -40
  610. package/bpk-component-icon/sm/account--id-card.js +8 -40
  611. package/bpk-component-icon/sm/account--name.js +8 -40
  612. package/bpk-component-icon/sm/account--permit.js +8 -40
  613. package/bpk-component-icon/sm/account-circle.js +8 -40
  614. package/bpk-component-icon/sm/account.js +8 -40
  615. package/bpk-component-icon/sm/add-circle.js +8 -40
  616. package/bpk-component-icon/sm/adult.js +8 -40
  617. package/bpk-component-icon/sm/aircon.js +8 -40
  618. package/bpk-component-icon/sm/aircraft.js +8 -42
  619. package/bpk-component-icon/sm/airline--multiple.js +8 -40
  620. package/bpk-component-icon/sm/airline.js +8 -40
  621. package/bpk-component-icon/sm/airports.js +8 -40
  622. package/bpk-component-icon/sm/alert--active.js +8 -40
  623. package/bpk-component-icon/sm/alert--add.js +8 -40
  624. package/bpk-component-icon/sm/alert--expired.js +8 -40
  625. package/bpk-component-icon/sm/alert--remove.js +8 -40
  626. package/bpk-component-icon/sm/arrow-down.js +8 -40
  627. package/bpk-component-icon/sm/arrow-left.js +8 -40
  628. package/bpk-component-icon/sm/arrow-right.js +8 -40
  629. package/bpk-component-icon/sm/arrow-up.js +8 -40
  630. package/bpk-component-icon/sm/award.js +8 -40
  631. package/bpk-component-icon/sm/baby-carriage.js +8 -40
  632. package/bpk-component-icon/sm/baggage--add.js +8 -40
  633. package/bpk-component-icon/sm/baggage--remove.js +8 -40
  634. package/bpk-component-icon/sm/baggage-cross.js +8 -40
  635. package/bpk-component-icon/sm/baggage-tick.js +8 -40
  636. package/bpk-component-icon/sm/baggage.js +8 -40
  637. package/bpk-component-icon/sm/bar.js +8 -40
  638. package/bpk-component-icon/sm/beach.js +8 -42
  639. package/bpk-component-icon/sm/beer.js +8 -40
  640. package/bpk-component-icon/sm/breakfast-cross.js +8 -40
  641. package/bpk-component-icon/sm/breakfast-tick.js +8 -40
  642. package/bpk-component-icon/sm/bus.js +8 -42
  643. package/bpk-component-icon/sm/business.js +8 -40
  644. package/bpk-component-icon/sm/cafe.js +8 -40
  645. package/bpk-component-icon/sm/calendar.js +8 -40
  646. package/bpk-component-icon/sm/call-back.js +8 -42
  647. package/bpk-component-icon/sm/camera.js +8 -40
  648. package/bpk-component-icon/sm/camper-van.js +8 -42
  649. package/bpk-component-icon/sm/car-door.js +8 -40
  650. package/bpk-component-icon/sm/car-wash.js +8 -42
  651. package/bpk-component-icon/sm/cars-flexible.js +8 -40
  652. package/bpk-component-icon/sm/cars.js +8 -42
  653. package/bpk-component-icon/sm/chart.js +8 -40
  654. package/bpk-component-icon/sm/chauffeur.js +8 -42
  655. package/bpk-component-icon/sm/chevron-down.js +8 -40
  656. package/bpk-component-icon/sm/chevron-left.js +8 -40
  657. package/bpk-component-icon/sm/chevron-right.js +8 -40
  658. package/bpk-component-icon/sm/chevron-up.js +8 -40
  659. package/bpk-component-icon/sm/child-seat.js +8 -40
  660. package/bpk-component-icon/sm/child.js +8 -40
  661. package/bpk-component-icon/sm/city-center.js +8 -40
  662. package/bpk-component-icon/sm/city.js +8 -40
  663. package/bpk-component-icon/sm/clean-policy.js +8 -40
  664. package/bpk-component-icon/sm/clean.js +8 -42
  665. package/bpk-component-icon/sm/cleaning-medical.js +8 -40
  666. package/bpk-component-icon/sm/cloakroom.js +8 -40
  667. package/bpk-component-icon/sm/close-circle.js +8 -40
  668. package/bpk-component-icon/sm/close.js +8 -40
  669. package/bpk-component-icon/sm/collapse.js +8 -40
  670. package/bpk-component-icon/sm/content--copy.js +8 -42
  671. package/bpk-component-icon/sm/content--event.js +8 -40
  672. package/bpk-component-icon/sm/content--guides.js +8 -40
  673. package/bpk-component-icon/sm/currency.js +8 -40
  674. package/bpk-component-icon/sm/data.js +8 -42
  675. package/bpk-component-icon/sm/deals.js +8 -40
  676. package/bpk-component-icon/sm/depart.js +8 -44
  677. package/bpk-component-icon/sm/device-mid.js +8 -40
  678. package/bpk-component-icon/sm/device-wide.js +8 -40
  679. package/bpk-component-icon/sm/direct.js +8 -42
  680. package/bpk-component-icon/sm/document-csv.js +8 -40
  681. package/bpk-component-icon/sm/document-pdf.js +8 -40
  682. package/bpk-component-icon/sm/download.js +8 -42
  683. package/bpk-component-icon/sm/duration.js +8 -40
  684. package/bpk-component-icon/sm/eco-leaf.js +8 -40
  685. package/bpk-component-icon/sm/edit.js +8 -40
  686. package/bpk-component-icon/sm/education.js +8 -42
  687. package/bpk-component-icon/sm/electric.js +8 -40
  688. package/bpk-component-icon/sm/end-call.js +8 -40
  689. package/bpk-component-icon/sm/estimated.js +8 -40
  690. package/bpk-component-icon/sm/exclamation-circle.js +8 -40
  691. package/bpk-component-icon/sm/exclamation.js +8 -40
  692. package/bpk-component-icon/sm/expand.js +8 -40
  693. package/bpk-component-icon/sm/explore.js +8 -40
  694. package/bpk-component-icon/sm/face--blank.js +8 -40
  695. package/bpk-component-icon/sm/face--happy.js +8 -40
  696. package/bpk-component-icon/sm/face--sad.js +8 -40
  697. package/bpk-component-icon/sm/face-mask.js +8 -40
  698. package/bpk-component-icon/sm/family.js +8 -40
  699. package/bpk-component-icon/sm/fast-track.js +8 -42
  700. package/bpk-component-icon/sm/fast-train.js +8 -42
  701. package/bpk-component-icon/sm/filter.js +8 -41
  702. package/bpk-component-icon/sm/flag.js +8 -40
  703. package/bpk-component-icon/sm/flask.js +8 -40
  704. package/bpk-component-icon/sm/flight-flexible.js +8 -40
  705. package/bpk-component-icon/sm/flight-landing.js +8 -44
  706. package/bpk-component-icon/sm/flight-takeoff.js +8 -42
  707. package/bpk-component-icon/sm/flight.js +8 -42
  708. package/bpk-component-icon/sm/food.js +8 -40
  709. package/bpk-component-icon/sm/gears-automatic-circle.js +8 -40
  710. package/bpk-component-icon/sm/gears-automatic.js +8 -40
  711. package/bpk-component-icon/sm/gears-manual-circle.js +8 -40
  712. package/bpk-component-icon/sm/gears-manual.js +8 -40
  713. package/bpk-component-icon/sm/globe.js +8 -40
  714. package/bpk-component-icon/sm/grid-layout.js +8 -40
  715. package/bpk-component-icon/sm/headset.js +8 -40
  716. package/bpk-component-icon/sm/health-fitness.js +8 -40
  717. package/bpk-component-icon/sm/heart--outline.js +8 -40
  718. package/bpk-component-icon/sm/heart.js +8 -40
  719. package/bpk-component-icon/sm/help-circle.js +8 -40
  720. package/bpk-component-icon/sm/help.js +8 -40
  721. package/bpk-component-icon/sm/hide.js +8 -40
  722. package/bpk-component-icon/sm/hotel-flexible.js +8 -40
  723. package/bpk-component-icon/sm/hotels--disabled-facilities.js +8 -40
  724. package/bpk-component-icon/sm/hotels--jacuzzi.js +8 -42
  725. package/bpk-component-icon/sm/hotels--pets-allowed.js +8 -40
  726. package/bpk-component-icon/sm/hotels--smoking.js +8 -40
  727. package/bpk-component-icon/sm/hotels.js +8 -40
  728. package/bpk-component-icon/sm/infant.js +8 -42
  729. package/bpk-component-icon/sm/information--language-alert.js +8 -40
  730. package/bpk-component-icon/sm/information--language-question.js +8 -40
  731. package/bpk-component-icon/sm/information--language.js +8 -40
  732. package/bpk-component-icon/sm/information-circle.js +8 -40
  733. package/bpk-component-icon/sm/information.js +8 -40
  734. package/bpk-component-icon/sm/insurance.js +8 -40
  735. package/bpk-component-icon/sm/key.js +8 -40
  736. package/bpk-component-icon/sm/keypad.js +8 -40
  737. package/bpk-component-icon/sm/landmark.js +8 -40
  738. package/bpk-component-icon/sm/language.js +8 -40
  739. package/bpk-component-icon/sm/legroom--extra.js +8 -42
  740. package/bpk-component-icon/sm/legroom--normal.js +8 -42
  741. package/bpk-component-icon/sm/legroom--reduced.js +8 -42
  742. package/bpk-component-icon/sm/leisure.js +8 -40
  743. package/bpk-component-icon/sm/lightning.js +8 -40
  744. package/bpk-component-icon/sm/list.js +8 -40
  745. package/bpk-component-icon/sm/location.js +8 -40
  746. package/bpk-component-icon/sm/lock.js +8 -40
  747. package/bpk-component-icon/sm/logout.js +8 -42
  748. package/bpk-component-icon/sm/long-arrow-down.js +8 -41
  749. package/bpk-component-icon/sm/long-arrow-left.js +8 -41
  750. package/bpk-component-icon/sm/long-arrow-right.js +8 -41
  751. package/bpk-component-icon/sm/long-arrow-up.js +8 -41
  752. package/bpk-component-icon/sm/lounge.js +8 -40
  753. package/bpk-component-icon/sm/luggageall.js +8 -40
  754. package/bpk-component-icon/sm/mail.js +8 -42
  755. package/bpk-component-icon/sm/map.js +8 -40
  756. package/bpk-component-icon/sm/meal.js +8 -40
  757. package/bpk-component-icon/sm/media.js +8 -40
  758. package/bpk-component-icon/sm/menu--horizontal.js +8 -40
  759. package/bpk-component-icon/sm/menu--vertical.js +8 -40
  760. package/bpk-component-icon/sm/menu.js +8 -40
  761. package/bpk-component-icon/sm/mileage.js +8 -42
  762. package/bpk-component-icon/sm/minus.js +8 -40
  763. package/bpk-component-icon/sm/mobile.js +8 -40
  764. package/bpk-component-icon/sm/money.js +8 -40
  765. package/bpk-component-icon/sm/multiple-bookings.js +8 -40
  766. package/bpk-component-icon/sm/music.js +8 -40
  767. package/bpk-component-icon/sm/mute.js +8 -40
  768. package/bpk-component-icon/sm/native-android--back.js +8 -40
  769. package/bpk-component-icon/sm/native-android--close.js +8 -40
  770. package/bpk-component-icon/sm/native-android--forward.js +8 -40
  771. package/bpk-component-icon/sm/native-ios-close.js +8 -40
  772. package/bpk-component-icon/sm/navigation.js +8 -40
  773. package/bpk-component-icon/sm/new-window.js +8 -46
  774. package/bpk-component-icon/sm/news.js +8 -40
  775. package/bpk-component-icon/sm/night.js +8 -40
  776. package/bpk-component-icon/sm/not-allowed.js +8 -40
  777. package/bpk-component-icon/sm/onsen.js +8 -42
  778. package/bpk-component-icon/sm/paid.js +8 -40
  779. package/bpk-component-icon/sm/paperclip.js +8 -40
  780. package/bpk-component-icon/sm/parking.js +8 -40
  781. package/bpk-component-icon/sm/passport.js +8 -40
  782. package/bpk-component-icon/sm/pause.js +8 -40
  783. package/bpk-component-icon/sm/payment-card.js +8 -40
  784. package/bpk-component-icon/sm/petrol.js +8 -40
  785. package/bpk-component-icon/sm/phone-call.js +8 -40
  786. package/bpk-component-icon/sm/picture.js +8 -40
  787. package/bpk-component-icon/sm/pin.js +8 -40
  788. package/bpk-component-icon/sm/plane-seat.js +8 -42
  789. package/bpk-component-icon/sm/play.js +8 -40
  790. package/bpk-component-icon/sm/plus.js +8 -40
  791. package/bpk-component-icon/sm/policy.js +8 -40
  792. package/bpk-component-icon/sm/powerplug.js +8 -40
  793. package/bpk-component-icon/sm/ppe.js +8 -40
  794. package/bpk-component-icon/sm/price-alerts.js +8 -40
  795. package/bpk-component-icon/sm/price-tag.js +8 -40
  796. package/bpk-component-icon/sm/print.js +8 -40
  797. package/bpk-component-icon/sm/recent-searches.js +8 -40
  798. package/bpk-component-icon/sm/redo.js +8 -40
  799. package/bpk-component-icon/sm/refresh.js +8 -40
  800. package/bpk-component-icon/sm/return.js +8 -44
  801. package/bpk-component-icon/sm/room.js +8 -40
  802. package/bpk-component-icon/sm/scales.js +8 -40
  803. package/bpk-component-icon/sm/search.js +8 -40
  804. package/bpk-component-icon/sm/self-service.js +8 -40
  805. package/bpk-component-icon/sm/send-message.js +8 -40
  806. package/bpk-component-icon/sm/services.js +8 -40
  807. package/bpk-component-icon/sm/settings.js +8 -40
  808. package/bpk-component-icon/sm/share--android.js +8 -40
  809. package/bpk-component-icon/sm/share--ios.js +8 -44
  810. package/bpk-component-icon/sm/share.js +8 -40
  811. package/bpk-component-icon/sm/single-booking.js +8 -40
  812. package/bpk-component-icon/sm/social-distancing.js +8 -42
  813. package/bpk-component-icon/sm/social-like.js +8 -40
  814. package/bpk-component-icon/sm/sort-down.js +8 -40
  815. package/bpk-component-icon/sm/sort-up.js +8 -40
  816. package/bpk-component-icon/sm/sort.js +8 -40
  817. package/bpk-component-icon/sm/speaker.js +8 -40
  818. package/bpk-component-icon/sm/star-half.js +8 -40
  819. package/bpk-component-icon/sm/star-outline.js +8 -40
  820. package/bpk-component-icon/sm/star.js +8 -40
  821. package/bpk-component-icon/sm/stops.js +8 -40
  822. package/bpk-component-icon/sm/swap--horizontal.js +8 -41
  823. package/bpk-component-icon/sm/swap--vertical.js +8 -40
  824. package/bpk-component-icon/sm/swap.js +8 -41
  825. package/bpk-component-icon/sm/taxi.js +8 -42
  826. package/bpk-component-icon/sm/thumbs-down.js +8 -40
  827. package/bpk-component-icon/sm/thumbs-up.js +8 -40
  828. package/bpk-component-icon/sm/tick-circle.js +8 -40
  829. package/bpk-component-icon/sm/tick.js +8 -40
  830. package/bpk-component-icon/sm/ticket-flexible.js +8 -40
  831. package/bpk-component-icon/sm/ticket.js +8 -40
  832. package/bpk-component-icon/sm/time.js +8 -40
  833. package/bpk-component-icon/sm/toilets.js +8 -40
  834. package/bpk-component-icon/sm/train.js +8 -40
  835. package/bpk-component-icon/sm/transmission-automatic.js +8 -40
  836. package/bpk-component-icon/sm/transmission-manual.js +8 -40
  837. package/bpk-component-icon/sm/trash.js +8 -40
  838. package/bpk-component-icon/sm/trend--down.js +8 -40
  839. package/bpk-component-icon/sm/trend--steady.js +8 -41
  840. package/bpk-component-icon/sm/trend--will-rise.js +8 -40
  841. package/bpk-component-icon/sm/trend.js +8 -40
  842. package/bpk-component-icon/sm/trips.js +8 -40
  843. package/bpk-component-icon/sm/undo.js +8 -40
  844. package/bpk-component-icon/sm/unlock.js +8 -40
  845. package/bpk-component-icon/sm/unmute.js +8 -42
  846. package/bpk-component-icon/sm/upgrade.js +8 -40
  847. package/bpk-component-icon/sm/use-location.js +8 -40
  848. package/bpk-component-icon/sm/view.js +8 -40
  849. package/bpk-component-icon/sm/virus.js +8 -40
  850. package/bpk-component-icon/sm/wallet.js +8 -40
  851. package/bpk-component-icon/sm/weather--clear.js +8 -40
  852. package/bpk-component-icon/sm/weather--cloudy.js +8 -42
  853. package/bpk-component-icon/sm/weather--fog.js +8 -40
  854. package/bpk-component-icon/sm/weather--partly-cloudy.js +8 -40
  855. package/bpk-component-icon/sm/weather--rain.js +8 -42
  856. package/bpk-component-icon/sm/weather--snow.js +8 -40
  857. package/bpk-component-icon/sm/weather--thunderstorm.js +8 -44
  858. package/bpk-component-icon/sm/weather--tornado.js +8 -40
  859. package/bpk-component-icon/sm/weather--wind.js +8 -42
  860. package/bpk-component-icon/sm/weather.js +8 -40
  861. package/bpk-component-icon/sm/wifi.js +8 -40
  862. package/bpk-component-icon/sm/window--reduce.js +8 -42
  863. package/bpk-component-icon/sm/window.js +8 -40
  864. package/bpk-component-icon/sm/world--amer.js +8 -40
  865. package/bpk-component-icon/sm/world--apac.js +8 -40
  866. package/bpk-component-icon/sm/world--emea.js +8 -40
  867. package/bpk-component-icon/src/{BpkIcon.css → BpkIcon.module.css} +1 -1
  868. package/bpk-component-icon/src/BpkIcon.module.scss +33 -0
  869. package/bpk-component-icon/src/classNameModifierHOCFactory.js +52 -52
  870. package/bpk-component-icon/src/withAlignment.js +25 -26
  871. package/bpk-component-icon/src/withDescription.js +24 -22
  872. package/bpk-component-icon/src/{withDescription.css → withDescription.module.css} +0 -0
  873. package/bpk-component-icon/src/withDescription.module.scss +22 -0
  874. package/bpk-component-icon/src/withRtlSupport.js +9 -18
  875. package/bpk-component-image/README.md +142 -0
  876. package/bpk-component-image/index.js +20 -45
  877. package/bpk-component-image/package.json +31 -0
  878. package/bpk-component-image/src/BpkBackgroundImage.js +164 -143
  879. package/bpk-component-image/src/{BpkBackgroundImage.css → BpkBackgroundImage.module.css} +0 -0
  880. package/bpk-component-image/src/BpkBackgroundImage.module.scss +46 -0
  881. package/bpk-component-image/src/BpkImage.js +200 -176
  882. package/bpk-component-image/src/{BpkImage.css → BpkImage.module.css} +0 -0
  883. package/bpk-component-image/src/BpkImage.module.scss +89 -0
  884. package/bpk-component-image/src/BpkImageBorderRadiusStyles.js +6 -13
  885. package/bpk-component-image/src/customPropTypes.js +11 -11
  886. package/bpk-component-image/src/withLazyLoading.js +160 -143
  887. package/bpk-component-image/src/withLoadingBehavior.js +50 -30
  888. package/bpk-component-infinite-scroll/README.md +187 -0
  889. package/bpk-component-infinite-scroll/index.js +12 -31
  890. package/bpk-component-infinite-scroll/package.json +31 -0
  891. package/bpk-component-infinite-scroll/src/DataSource.js +22 -41
  892. package/bpk-component-infinite-scroll/src/intersection-observer.js +3 -9
  893. package/bpk-component-infinite-scroll/src/withInfiniteScroll-test.flow.js +81 -71
  894. package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +202 -176
  895. package/bpk-component-infinite-scroll/src/{withInfiniteScroll.css → withInfiniteScroll.module.css} +0 -0
  896. package/bpk-component-infinite-scroll/src/withInfiniteScroll.module.scss +25 -0
  897. package/bpk-component-input/README.md +121 -0
  898. package/bpk-component-input/index.js +43 -60
  899. package/bpk-component-input/package.json +30 -0
  900. package/bpk-component-input/src/BpkClearButton.js +58 -57
  901. package/bpk-component-input/src/{BpkClearButton.css → BpkClearButton.module.css} +0 -0
  902. package/bpk-component-input/src/BpkClearButton.module.scss +40 -0
  903. package/bpk-component-input/src/BpkInput.js +111 -107
  904. package/bpk-component-input/src/{BpkInput.css → BpkInput.module.css} +0 -0
  905. package/bpk-component-input/src/BpkInput.module.scss +86 -0
  906. package/bpk-component-input/src/common-types.js +74 -47
  907. package/bpk-component-input/src/themeAttributes.js +2 -9
  908. package/bpk-component-input/src/withOpenEvents.js +111 -93
  909. package/bpk-component-label/README.md +30 -0
  910. package/bpk-component-label/index.js +7 -13
  911. package/bpk-component-label/package.json +24 -0
  912. package/bpk-component-label/src/BpkLabel.js +54 -55
  913. package/bpk-component-label/src/{BpkLabel.css → BpkLabel.module.css} +0 -0
  914. package/bpk-component-label/src/BpkLabel.module.scss +43 -0
  915. package/bpk-component-link/README.md +68 -0
  916. package/bpk-component-link/index.js +11 -39
  917. package/bpk-component-link/package.json +28 -0
  918. package/bpk-component-link/src/BpkButtonLink.js +56 -59
  919. package/bpk-component-link/src/BpkLink.js +72 -68
  920. package/bpk-component-link/src/{BpkLink.css → BpkLink.module.css} +0 -0
  921. package/bpk-component-link/src/BpkLink.module.scss +31 -0
  922. package/bpk-component-link/src/themeAttributes.js +18 -11
  923. package/bpk-component-list/README.md +48 -0
  924. package/bpk-component-list/index.js +21 -20
  925. package/bpk-component-list/package.json +24 -0
  926. package/bpk-component-list/src/BpkList.js +34 -36
  927. package/bpk-component-list/src/BpkList.module.css +18 -0
  928. package/bpk-component-list/src/BpkList.module.scss +37 -0
  929. package/bpk-component-list/src/BpkListItem.js +29 -31
  930. package/bpk-component-loading-button/README.md +48 -0
  931. package/bpk-component-loading-button/index.js +7 -21
  932. package/bpk-component-loading-button/package.json +30 -0
  933. package/bpk-component-loading-button/src/BpkLoadingButton.js +130 -93
  934. package/bpk-component-loading-button/src/BpkLoadingButton.module.css +18 -0
  935. package/bpk-component-loading-button/src/BpkLoadingButton.module.scss +65 -0
  936. package/bpk-component-map/README.md +213 -0
  937. package/bpk-component-map/index.js +28 -69
  938. package/bpk-component-map/package.json +32 -0
  939. package/bpk-component-map/src/BpkBasicMapMarker.js +45 -41
  940. package/bpk-component-map/src/BpkIconMarker.js +85 -64
  941. package/bpk-component-map/src/{BpkIconMarker.css → BpkIconMarker.module.css} +0 -0
  942. package/bpk-component-map/src/BpkIconMarker.module.scss +74 -0
  943. package/bpk-component-map/src/BpkIconMarkerBackground.js +58 -51
  944. package/bpk-component-map/src/{BpkIconMarkerBackground.css → BpkIconMarkerBackground.module.css} +0 -0
  945. package/bpk-component-map/src/BpkIconMarkerBackground.module.scss +53 -0
  946. package/bpk-component-map/src/BpkMap.js +140 -103
  947. package/bpk-component-map/src/BpkMap.module.css +18 -0
  948. package/bpk-component-map/src/BpkMap.module.scss +21 -0
  949. package/bpk-component-map/src/BpkOverlayView.js +43 -44
  950. package/bpk-component-map/src/BpkPriceMarker.js +98 -71
  951. package/bpk-component-map/src/{BpkPriceMarker.css → BpkPriceMarker.module.css} +0 -0
  952. package/bpk-component-map/src/BpkPriceMarker.module.scss +146 -0
  953. package/bpk-component-map/src/DefaultLoadingElement.js +15 -25
  954. package/bpk-component-map/src/{DefaultLoadingElement.css → DefaultLoadingElement.module.css} +0 -0
  955. package/bpk-component-map/src/DefaultLoadingElement.module.scss +28 -0
  956. package/bpk-component-map/src/common-types.js +13 -16
  957. package/bpk-component-map/src/themeAttributes.js +19 -14
  958. package/bpk-component-map/src/withGoogleMapsScript.js +56 -50
  959. package/bpk-component-mobile-scroll-container/README.md +74 -0
  960. package/bpk-component-mobile-scroll-container/index.js +6 -13
  961. package/bpk-component-mobile-scroll-container/package.json +28 -0
  962. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +165 -148
  963. package/bpk-component-mobile-scroll-container/src/{BpkMobileScrollContainer.css → BpkMobileScrollContainer.module.css} +0 -0
  964. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.scss +50 -0
  965. package/bpk-component-modal/README.md +114 -0
  966. package/bpk-component-modal/index.js +10 -37
  967. package/bpk-component-modal/package.json +33 -0
  968. package/bpk-component-modal/src/BpkModal.js +96 -84
  969. package/bpk-component-modal/src/{BpkModal.css → BpkModal.module.css} +1 -1
  970. package/bpk-component-modal/src/BpkModal.module.scss +46 -0
  971. package/bpk-component-modal/src/BpkModalInner.js +135 -94
  972. package/bpk-component-modal/src/BpkModalInner.module.css +18 -0
  973. package/bpk-component-modal/src/BpkModalInner.module.scss +123 -0
  974. package/bpk-component-modal/src/customPropTypes.js +23 -16
  975. package/bpk-component-modal/src/themeAttributes.js +6 -11
  976. package/bpk-component-navigation-bar/README.md +114 -0
  977. package/bpk-component-navigation-bar/index.js +25 -37
  978. package/bpk-component-navigation-bar/package.json +32 -0
  979. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +81 -65
  980. package/bpk-component-navigation-bar/src/{BpkNavigationBar.css → BpkNavigationBar.module.css} +1 -1
  981. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.scss +77 -0
  982. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +55 -49
  983. package/bpk-component-navigation-bar/src/{BpkNavigationBarButtonLink.css → BpkNavigationBarButtonLink.module.css} +0 -0
  984. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.scss +51 -0
  985. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +52 -51
  986. package/bpk-component-navigation-bar/src/{BpkNavigationBarIconButton.css → BpkNavigationBarIconButton.module.css} +0 -0
  987. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.scss +43 -0
  988. package/bpk-component-navigation-bar/src/themeAttributes.js +16 -9
  989. package/bpk-component-navigation-stack/README.md +49 -0
  990. package/bpk-component-navigation-stack/index.js +13 -21
  991. package/bpk-component-navigation-stack/package.json +33 -0
  992. package/bpk-component-navigation-stack/src/BpkNavigationStack.js +113 -104
  993. package/bpk-component-navigation-stack/src/{BpkNavigationStack.css → BpkNavigationStack.module.css} +0 -0
  994. package/bpk-component-navigation-stack/src/BpkNavigationStack.module.scss +51 -0
  995. package/bpk-component-navigation-stack/src/withNavigationStackState.js +81 -68
  996. package/bpk-component-nudger/README.md +170 -0
  997. package/bpk-component-nudger/index.js +9 -29
  998. package/bpk-component-nudger/package.json +32 -0
  999. package/bpk-component-nudger/src/BpkConfigurableNudger.js +125 -97
  1000. package/bpk-component-nudger/src/BpkNudger.js +60 -55
  1001. package/bpk-component-nudger/src/{BpkNudger.css → BpkNudger.module.css} +1 -1
  1002. package/bpk-component-nudger/src/BpkNudger.module.scss +49 -0
  1003. package/bpk-component-nudger/src/common-types.js +25 -22
  1004. package/bpk-component-nudger/src/themeAttributes.js +6 -11
  1005. package/bpk-component-overlay/README.md +51 -0
  1006. package/bpk-component-overlay/index.js +11 -27
  1007. package/bpk-component-overlay/package.json +28 -0
  1008. package/bpk-component-overlay/src/BpkOverlay.js +60 -47
  1009. package/bpk-component-overlay/src/{BpkOverlay.css → BpkOverlay.module.css} +0 -0
  1010. package/bpk-component-overlay/src/BpkOverlay.module.scss +41 -0
  1011. package/bpk-component-pagination/README.md +59 -0
  1012. package/bpk-component-pagination/index.js +6 -21
  1013. package/bpk-component-pagination/package.json +28 -0
  1014. package/bpk-component-pagination/src/BpkPagination.js +70 -68
  1015. package/bpk-component-pagination/src/{BpkPagination.css → BpkPagination.module.css} +0 -0
  1016. package/bpk-component-pagination/src/BpkPagination.module.scss +22 -0
  1017. package/bpk-component-pagination/src/BpkPaginationBreak.js +12 -22
  1018. package/bpk-component-pagination/src/BpkPaginationList.js +66 -61
  1019. package/bpk-component-pagination/src/{BpkPaginationList.css → BpkPaginationList.module.css} +0 -0
  1020. package/bpk-component-pagination/src/BpkPaginationList.module.scss +45 -0
  1021. package/bpk-component-pagination/src/BpkPaginationNudger.js +51 -55
  1022. package/bpk-component-pagination/src/{BpkPaginationNudger.css → BpkPaginationNudger.module.css} +0 -0
  1023. package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +74 -0
  1024. package/bpk-component-pagination/src/BpkPaginationPage.js +30 -41
  1025. package/bpk-component-pagination/src/BpkPaginationPage.module.css +18 -0
  1026. package/bpk-component-pagination/src/BpkPaginationPage.module.scss +92 -0
  1027. package/bpk-component-pagination/src/themeAttributes.js +9 -11
  1028. package/bpk-component-panel/README.md +33 -0
  1029. package/bpk-component-panel/index.js +4 -13
  1030. package/bpk-component-panel/package.json +24 -0
  1031. package/bpk-component-panel/src/BpkPanel.js +41 -48
  1032. package/bpk-component-panel/src/{BpkPanel.css → BpkPanel.module.css} +0 -0
  1033. package/bpk-component-panel/src/BpkPanel.module.scss +31 -0
  1034. package/bpk-component-phone-input/README.md +100 -0
  1035. package/bpk-component-phone-input/index.js +9 -13
  1036. package/bpk-component-phone-input/package.json +33 -0
  1037. package/bpk-component-phone-input/src/BpkPhoneInput.js +157 -119
  1038. package/bpk-component-phone-input/src/{BpkPhoneInput.css → BpkPhoneInput.module.css} +1 -1
  1039. package/bpk-component-phone-input/src/BpkPhoneInput.module.scss +42 -0
  1040. package/bpk-component-popover/README.md +128 -0
  1041. package/bpk-component-popover/index.js +17 -37
  1042. package/bpk-component-popover/package.json +35 -0
  1043. package/bpk-component-popover/src/BpkPopover.js +146 -111
  1044. package/bpk-component-popover/src/BpkPopover.module.css +18 -0
  1045. package/bpk-component-popover/src/BpkPopover.module.scss +128 -0
  1046. package/bpk-component-popover/src/BpkPopoverPortal.js +173 -158
  1047. package/bpk-component-popover/src/constants.js +6 -13
  1048. package/bpk-component-popover/src/keyboardFocusScope.js +15 -26
  1049. package/bpk-component-popover/src/themeAttributes.js +6 -11
  1050. package/bpk-component-price/README.md +37 -0
  1051. package/bpk-component-price/index.js +7 -27
  1052. package/bpk-component-price/package.json +24 -0
  1053. package/bpk-component-price/src/BpkPrice.js +100 -76
  1054. package/bpk-component-price/src/BpkPrice.module.css +18 -0
  1055. package/bpk-component-price/src/BpkPrice.module.scss +61 -0
  1056. package/bpk-component-price/src/common-types.js +8 -13
  1057. package/bpk-component-progress/README.md +56 -0
  1058. package/bpk-component-progress/index.js +8 -21
  1059. package/bpk-component-progress/package.json +30 -0
  1060. package/bpk-component-progress/src/BpkProgress.js +114 -123
  1061. package/bpk-component-progress/src/{BpkProgress.css → BpkProgress.module.css} +0 -0
  1062. package/bpk-component-progress/src/BpkProgress.module.scss +64 -0
  1063. package/bpk-component-progress/src/themeAttributes.js +4 -9
  1064. package/bpk-component-radio/README.md +43 -0
  1065. package/bpk-component-radio/index.js +8 -21
  1066. package/bpk-component-radio/package.json +28 -0
  1067. package/bpk-component-radio/src/BpkRadio.js +77 -57
  1068. package/bpk-component-radio/src/{BpkRadio.css → BpkRadio.module.css} +0 -0
  1069. package/bpk-component-radio/src/BpkRadio.module.scss +78 -0
  1070. package/bpk-component-radio/src/themeAttributes.js +4 -9
  1071. package/bpk-component-rating/README.md +80 -0
  1072. package/bpk-component-rating/index.js +7 -27
  1073. package/bpk-component-rating/package.json +29 -0
  1074. package/bpk-component-rating/src/BpkRating.js +128 -100
  1075. package/bpk-component-rating/src/BpkRating.module.css +18 -0
  1076. package/bpk-component-rating/src/BpkRating.module.scss +86 -0
  1077. package/bpk-component-rating/src/common-types.js +7 -15
  1078. package/bpk-component-rtl-toggle/README.md +26 -0
  1079. package/bpk-component-rtl-toggle/index.js +6 -21
  1080. package/bpk-component-rtl-toggle/package.json +24 -0
  1081. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +65 -54
  1082. package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +46 -36
  1083. package/bpk-component-rtl-toggle/src/utils.js +6 -12
  1084. package/bpk-component-scrollable-calendar/README.md +102 -0
  1085. package/bpk-component-scrollable-calendar/index.js +17 -45
  1086. package/bpk-component-scrollable-calendar/package.json +32 -0
  1087. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.js +18 -17
  1088. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +37 -46
  1089. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +49 -57
  1090. package/bpk-component-scrollable-calendar/src/{BpkScrollableCalendarGrid.css → BpkScrollableCalendarGrid.module.css} +0 -0
  1091. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.module.scss +31 -0
  1092. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +128 -112
  1093. package/bpk-component-scrollable-calendar/src/{BpkScrollableCalendarGridList.css → BpkScrollableCalendarGridList.module.css} +0 -0
  1094. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.scss +37 -0
  1095. package/bpk-component-scrollable-calendar/src/utils.js +5 -13
  1096. package/bpk-component-scrollable-calendar/test-utils.js +244 -211
  1097. package/bpk-component-section-list/README.md +52 -0
  1098. package/bpk-component-section-list/index.js +9 -29
  1099. package/bpk-component-section-list/package.json +30 -0
  1100. package/bpk-component-section-list/src/BpkSectionList.js +32 -27
  1101. package/bpk-component-section-list/src/BpkSectionListItem.js +85 -71
  1102. package/bpk-component-section-list/src/{BpkSectionListItem.css → BpkSectionListItem.module.css} +0 -0
  1103. package/bpk-component-section-list/src/BpkSectionListItem.module.scss +54 -0
  1104. package/bpk-component-section-list/src/BpkSectionListSection.js +56 -49
  1105. package/bpk-component-section-list/src/{BpkSectionListSection.css → BpkSectionListSection.module.css} +0 -0
  1106. package/bpk-component-section-list/src/BpkSectionListSection.module.scss +35 -0
  1107. package/bpk-component-select/README.md +47 -0
  1108. package/bpk-component-select/index.js +9 -21
  1109. package/bpk-component-select/package.json +27 -0
  1110. package/bpk-component-select/src/BpkSelect.js +99 -63
  1111. package/bpk-component-select/src/{BpkSelect.css → BpkSelect.module.css} +0 -0
  1112. package/bpk-component-select/src/BpkSelect.module.scss +126 -0
  1113. package/bpk-component-select/src/themeAttributes.js +2 -9
  1114. package/bpk-component-skip-link/README.md +30 -0
  1115. package/bpk-component-skip-link/index.js +8 -21
  1116. package/bpk-component-skip-link/package.json +24 -0
  1117. package/bpk-component-skip-link/src/BpkSkipLink.js +48 -44
  1118. package/bpk-component-skip-link/src/{BpkSkipLink.css → BpkSkipLink.module.css} +0 -0
  1119. package/bpk-component-skip-link/src/BpkSkipLink.module.scss +50 -0
  1120. package/bpk-component-skip-link/src/themeAttributes.js +2 -9
  1121. package/bpk-component-slider/README.md +43 -0
  1122. package/bpk-component-slider/index.js +6 -21
  1123. package/bpk-component-slider/package.json +29 -0
  1124. package/bpk-component-slider/src/BpkSlider.js +48 -52
  1125. package/bpk-component-slider/src/{BpkSlider.css → BpkSlider.module.css} +0 -0
  1126. package/bpk-component-slider/src/BpkSlider.module.scss +103 -0
  1127. package/bpk-component-slider/src/themeAttributes.js +2 -9
  1128. package/bpk-component-spinner/README.md +40 -0
  1129. package/bpk-component-spinner/changelog.yml +55 -0
  1130. package/bpk-component-spinner/index.js +30 -44
  1131. package/bpk-component-spinner/package.json +25 -0
  1132. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +50 -46
  1133. package/bpk-component-spinner/src/BpkLargeSpinner.js +53 -47
  1134. package/bpk-component-spinner/src/BpkSpinner.js +52 -47
  1135. package/bpk-component-spinner/src/{BpkSpinner.css → BpkSpinner.module.css} +1 -1
  1136. package/bpk-component-spinner/src/BpkSpinner.module.scss +57 -0
  1137. package/bpk-component-spinner/src/spinnerTypes.js +5 -10
  1138. package/bpk-component-spinner/src/themeAttributes.js +4 -9
  1139. package/bpk-component-split-input/README.md +42 -0
  1140. package/bpk-component-split-input/index.js +10 -21
  1141. package/bpk-component-split-input/package.json +24 -0
  1142. package/bpk-component-split-input/src/BpkInputField.js +55 -70
  1143. package/bpk-component-split-input/src/BpkInputField.module.css +18 -0
  1144. package/bpk-component-split-input/src/BpkInputField.module.scss +34 -0
  1145. package/bpk-component-split-input/src/BpkSplitInput.js +219 -243
  1146. package/bpk-component-split-input/src/BpkSplitInput.module.css +18 -0
  1147. package/bpk-component-split-input/src/BpkSplitInput.module.scss +36 -0
  1148. package/bpk-component-star-rating/README.md +99 -0
  1149. package/bpk-component-star-rating/index.js +21 -75
  1150. package/bpk-component-star-rating/package.json +29 -0
  1151. package/bpk-component-star-rating/src/BpkInteractiveStar.js +74 -60
  1152. package/bpk-component-star-rating/src/{BpkInteractiveStar.css → BpkInteractiveStar.module.css} +0 -0
  1153. package/bpk-component-star-rating/src/BpkInteractiveStar.module.scss +66 -0
  1154. package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +83 -67
  1155. package/bpk-component-star-rating/src/BpkStar.js +88 -85
  1156. package/bpk-component-star-rating/src/{BpkStar.css → BpkStar.module.css} +0 -0
  1157. package/bpk-component-star-rating/src/BpkStar.module.scss +63 -0
  1158. package/bpk-component-star-rating/src/BpkStarRating.js +88 -68
  1159. package/bpk-component-star-rating/src/{BpkStarRating.css → BpkStarRating.module.css} +0 -0
  1160. package/bpk-component-star-rating/src/BpkStarRating.module.scss +21 -0
  1161. package/bpk-component-star-rating/src/themeAttributes.js +4 -9
  1162. package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +82 -71
  1163. package/bpk-component-switch/README.md +37 -0
  1164. package/bpk-component-switch/index.js +11 -31
  1165. package/bpk-component-switch/package.json +24 -0
  1166. package/bpk-component-switch/src/BpkSwitch.js +64 -53
  1167. package/bpk-component-switch/src/{BpkSwitch.css → BpkSwitch.module.css} +0 -0
  1168. package/bpk-component-switch/src/BpkSwitch.module.scss +93 -0
  1169. package/bpk-component-switch/src/themeAttributes.js +2 -9
  1170. package/bpk-component-table/README.md +66 -0
  1171. package/bpk-component-table/index.js +35 -55
  1172. package/bpk-component-table/package.json +24 -0
  1173. package/bpk-component-table/src/BpkTable.js +50 -43
  1174. package/bpk-component-table/src/{BpkTable.css → BpkTable.module.css} +0 -0
  1175. package/bpk-component-table/src/BpkTable.module.scss +39 -0
  1176. package/bpk-component-table/src/BpkTableBody.js +12 -17
  1177. package/bpk-component-table/src/BpkTableCell.js +44 -40
  1178. package/bpk-component-table/src/BpkTableHead.js +12 -17
  1179. package/bpk-component-table/src/BpkTableHeadCell.js +47 -44
  1180. package/bpk-component-table/src/BpkTableRow.js +12 -17
  1181. package/bpk-component-text/README.md +76 -0
  1182. package/bpk-component-text/index.js +7 -27
  1183. package/bpk-component-text/package.json +24 -0
  1184. package/bpk-component-text/src/BpkText.js +88 -52
  1185. package/bpk-component-text/src/{BpkText.css → BpkText.module.css} +1 -1
  1186. package/bpk-component-text/src/BpkText.module.scss +139 -0
  1187. package/bpk-component-textarea/README.md +34 -0
  1188. package/bpk-component-textarea/index.js +8 -21
  1189. package/bpk-component-textarea/package.json +28 -0
  1190. package/bpk-component-textarea/src/BpkTextarea.js +55 -43
  1191. package/bpk-component-textarea/src/{BpkTextarea.css → BpkTextarea.module.css} +0 -0
  1192. package/bpk-component-textarea/src/BpkTextarea.module.scss +33 -0
  1193. package/bpk-component-textarea/src/themeAttributes.js +4 -9
  1194. package/bpk-component-theme-toggle/README.md +30 -0
  1195. package/bpk-component-theme-toggle/index.js +6 -21
  1196. package/bpk-component-theme-toggle/package.json +27 -0
  1197. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +90 -94
  1198. package/bpk-component-theme-toggle/src/{BpkThemeToggle.css → BpkThemeToggle.module.css} +0 -0
  1199. package/bpk-component-theme-toggle/src/BpkThemeToggle.module.scss +25 -0
  1200. package/bpk-component-theme-toggle/src/theming.js +99 -57
  1201. package/bpk-component-theme-toggle/src/updateOnThemeChange.js +52 -49
  1202. package/bpk-component-theme-toggle/src/utils.js +3 -10
  1203. package/bpk-component-ticket/README.md +37 -0
  1204. package/bpk-component-ticket/index.js +6 -13
  1205. package/bpk-component-ticket/package.json +28 -0
  1206. package/bpk-component-ticket/src/BpkTicket.js +117 -74
  1207. package/bpk-component-ticket/src/BpkTicket.module.css +18 -0
  1208. package/bpk-component-ticket/src/BpkTicket.module.scss +145 -0
  1209. package/bpk-component-tooltip/README.md +56 -0
  1210. package/bpk-component-tooltip/index.js +10 -21
  1211. package/bpk-component-tooltip/package.json +29 -0
  1212. package/bpk-component-tooltip/src/BpkTooltip.js +94 -76
  1213. package/bpk-component-tooltip/src/BpkTooltip.module.css +18 -0
  1214. package/bpk-component-tooltip/src/BpkTooltip.module.scss +144 -0
  1215. package/bpk-component-tooltip/src/BpkTooltipPortal.js +167 -138
  1216. package/bpk-component-tooltip/src/constants.js +8 -17
  1217. package/bpk-react-utils/README.md +251 -0
  1218. package/bpk-react-utils/index.js +42 -106
  1219. package/bpk-react-utils/package.json +25 -0
  1220. package/bpk-react-utils/src/Portal-v1.js +101 -81
  1221. package/bpk-react-utils/src/Portal.js +98 -86
  1222. package/bpk-react-utils/src/TransitionInitialMount.js +36 -38
  1223. package/bpk-react-utils/src/cssModules.js +10 -15
  1224. package/bpk-react-utils/src/deprecated.js +19 -19
  1225. package/bpk-react-utils/src/deviceDetection.js +8 -12
  1226. package/bpk-react-utils/src/isRTL.js +12 -11
  1227. package/bpk-react-utils/src/withDefaultProps.js +53 -45
  1228. package/bpk-react-utils/src/wrapDisplayName.js +2 -9
  1229. package/bpk-scrim-utils/README.md +50 -0
  1230. package/bpk-scrim-utils/index.js +6 -20
  1231. package/bpk-scrim-utils/package.json +25 -0
  1232. package/bpk-scrim-utils/src/BpkScrim.js +28 -33
  1233. package/bpk-scrim-utils/src/{bpk-scrim-content.css → bpk-scrim-content.module.css} +0 -0
  1234. package/bpk-scrim-utils/src/bpk-scrim-content.module.scss +32 -0
  1235. package/bpk-scrim-utils/src/{bpk-scrim.css → bpk-scrim.module.css} +1 -1
  1236. package/bpk-scrim-utils/src/bpk-scrim.module.scss +51 -0
  1237. package/bpk-scrim-utils/src/customPropTypes.js +15 -12
  1238. package/bpk-scrim-utils/src/scroll-utils.js +16 -27
  1239. package/bpk-scrim-utils/src/withScrim.js +103 -119
  1240. package/bpk-theming/README.md +43 -0
  1241. package/bpk-theming/index.js +4 -13
  1242. package/bpk-theming/package.json +23 -0
  1243. package/bpk-theming/src/BpkThemeProvider.js +63 -82
  1244. package/package.json +1 -1
  1245. package/bpk-component-button/src/BpkButtonBase.css +0 -18
  1246. package/bpk-component-button/src/BpkButtonDestructive.css +0 -18
  1247. package/bpk-component-button/src/BpkButtonLink.css +0 -18
  1248. package/bpk-component-button/src/BpkButtonSecondary.css +0 -18
  1249. package/bpk-component-content-container/src/BpkContentContainer.css +0 -18
  1250. package/bpk-component-dialog/src/BpkDialogInner.css +0 -18
  1251. package/bpk-component-floating-notification/src/BpkFloatingNotification.css +0 -18
  1252. package/bpk-component-grid/src/BpkGridColumn.css +0 -18
  1253. package/bpk-component-grid/src/BpkGridContainer.css +0 -18
  1254. package/bpk-component-list/src/BpkList.css +0 -18
  1255. package/bpk-component-modal/src/BpkModalInner.css +0 -18
  1256. package/bpk-component-pagination/src/BpkPaginationPage.css +0 -18
  1257. package/bpk-component-popover/src/BpkPopover.css +0 -18
  1258. package/bpk-component-rating/src/BpkRating.css +0 -18
  1259. package/bpk-component-ticket/src/BpkTicket.css +0 -18
  1260. package/bpk-component-tooltip/src/BpkTooltip.css +0 -18
@@ -1,74 +1,85 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _bpkReactUtils = require("../../bpk-react-utils");
13
-
14
- var _dateUtils = require("./date-utils");
15
-
16
- var _customProptypes = _interopRequireWildcard(require("./custom-proptypes"));
17
-
18
- var _BpkCalendarGridModule = _interopRequireDefault(require("./BpkCalendarGrid.css"));
19
-
20
- var _BpkCalendarDate = require("./BpkCalendarDate");
21
-
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
29
18
 
30
- const getClassName = (0, _bpkReactUtils.cssModules)(_BpkCalendarGridModule.default);
19
+ import PropTypes from 'prop-types';
20
+ import React, { Component } from 'react';
21
+ import { cssModules, deprecated } from '../../bpk-react-utils';
22
+
23
+ import {
24
+ isSameDay,
25
+ isSameWeek,
26
+ isSameMonth,
27
+ isToday,
28
+ isWithinRange,
29
+ startOfMonth,
30
+ endOfMonth,
31
+ } from './date-utils';
32
+ import CustomPropTypes, { CALENDAR_SELECTION_TYPE } from './custom-proptypes';
33
+ // TODO: Move this to `Week.scss`
34
+ // This should be using its own css file as `BpkCalendarGrid` is also importing `BpkCalendarGrid.module.scss`
35
+ // and the order of css imports can break the component.
36
+ import STYLES from './BpkCalendarGrid.module.scss';
37
+ import { SELECTION_TYPES } from './BpkCalendarDate';
38
+
39
+ const getClassName = cssModules(STYLES);
31
40
 
32
41
  const shallowEqualProps = (props1, props2, propList) => {
33
42
  let i = 0;
34
-
35
43
  for (; i < propList.length; i += 1) {
36
44
  if (props1[propList[i]] !== props2[propList[i]]) {
37
45
  return false;
38
46
  }
39
47
  }
40
-
41
48
  return true;
42
49
  };
43
50
 
44
51
  function or(total, bool) {
45
52
  return total || bool;
46
53
  }
54
+
47
55
  /**
48
56
  * Determines if the current date is selected
49
57
  * @param {Date} date the current date from the calendar
50
58
  * @param {Object} selectionConfiguration the current selection configuration
51
59
  * @returns {Boolean} true is selected and false if not
52
60
  */
53
-
54
-
55
61
  function getSelectedDate(date, selectionConfiguration) {
56
- const startDate = selectionConfiguration.date || selectionConfiguration.startDate;
57
- const {
58
- endDate
59
- } = selectionConfiguration;
60
- const sameStartDay = (0, _dateUtils.isSameDay)(date, startDate);
61
- const sameEndDay = (0, _dateUtils.isSameDay)(date, endDate);
62
-
63
- if (startDate && endDate && (sameStartDay || sameEndDay || (0, _dateUtils.isWithinRange)(date, {
64
- start: startDate,
65
- end: endDate
66
- })) || startDate && !endDate && sameStartDay || sameStartDay) {
62
+ const startDate =
63
+ selectionConfiguration.date || selectionConfiguration.startDate;
64
+ const { endDate } = selectionConfiguration;
65
+ const sameStartDay = isSameDay(date, startDate);
66
+ const sameEndDay = isSameDay(date, endDate);
67
+
68
+ if (
69
+ (startDate &&
70
+ endDate &&
71
+ (sameStartDay ||
72
+ sameEndDay ||
73
+ isWithinRange(date, { start: startDate, end: endDate }))) ||
74
+ (startDate && !endDate && sameStartDay) ||
75
+ sameStartDay
76
+ ) {
67
77
  return true;
68
78
  }
69
79
 
70
80
  return false;
71
81
  }
82
+
72
83
  /**
73
84
  * Gets the correct selection type for the current date
74
85
  * @param {Date} date the current date of the calendar
@@ -79,102 +90,114 @@ function getSelectedDate(date, selectionConfiguration) {
79
90
  * @param {Boolean} ignoreOutsideDate ignore date outside current month
80
91
  * @returns {String} selection type to be passed to the date
81
92
  */
82
-
83
-
84
- function getSelectionType(date, selectionConfiguration, formatDateFull, month, weekStartsOn, ignoreOutsideDate) {
85
- const {
86
- endDate,
87
- startDate
88
- } = selectionConfiguration;
89
- const sameStartDay = (0, _dateUtils.isSameDay)(date, startDate);
90
- const sameEndDay = (0, _dateUtils.isSameDay)(date, endDate);
93
+ function getSelectionType(
94
+ date,
95
+ selectionConfiguration,
96
+ formatDateFull,
97
+ month,
98
+ weekStartsOn,
99
+ ignoreOutsideDate,
100
+ ) {
101
+ const { endDate, startDate } = selectionConfiguration;
102
+ const sameStartDay = isSameDay(date, startDate);
103
+ const sameEndDay = isSameDay(date, endDate);
91
104
  const rangeDates = startDate && endDate;
92
- const isEmptyCell = !(0, _dateUtils.isSameMonth)(date, month) && ignoreOutsideDate;
93
-
94
- if (selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.single && selectionConfiguration.date && (selectionConfiguration.date === formatDateFull(date) || formatDateFull(selectionConfiguration.date) === formatDateFull(date))) {
95
- return _BpkCalendarDate.SELECTION_TYPES.single;
105
+ const isEmptyCell = !isSameMonth(date, month) && ignoreOutsideDate;
106
+
107
+ if (
108
+ selectionConfiguration.type === CALENDAR_SELECTION_TYPE.single &&
109
+ selectionConfiguration.date &&
110
+ (selectionConfiguration.date === formatDateFull(date) ||
111
+ formatDateFull(selectionConfiguration.date) === formatDateFull(date))
112
+ ) {
113
+ return SELECTION_TYPES.single;
96
114
  }
97
-
98
- if (selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.range) {
99
- if (startDate && !endDate && sameStartDay || rangeDates && sameStartDay && sameEndDay) {
100
- return _BpkCalendarDate.SELECTION_TYPES.single;
115
+ if (selectionConfiguration.type === CALENDAR_SELECTION_TYPE.range) {
116
+ if (
117
+ (startDate && !endDate && sameStartDay) ||
118
+ (rangeDates && sameStartDay && sameEndDay)
119
+ ) {
120
+ return SELECTION_TYPES.single;
101
121
  }
102
-
103
- if (isEmptyCell && rangeDates && ((0, _dateUtils.isSameWeek)(startDate, (0, _dateUtils.startOfMonth)(startDate), {
104
- weekStartsOn
105
- }) && (0, _dateUtils.isSameWeek)(date, startDate, {
106
- weekStartsOn
107
- }) || (0, _dateUtils.isSameWeek)(endDate, (0, _dateUtils.endOfMonth)(endDate), {
108
- weekStartsOn
109
- }) && (0, _dateUtils.isSameWeek)(date, endDate, {
110
- weekStartsOn
111
- }))) {
112
- return _BpkCalendarDate.SELECTION_TYPES.none;
122
+ if (
123
+ isEmptyCell &&
124
+ rangeDates &&
125
+ ((isSameWeek(startDate, startOfMonth(startDate), { weekStartsOn }) &&
126
+ isSameWeek(date, startDate, { weekStartsOn })) ||
127
+ (isSameWeek(endDate, endOfMonth(endDate), { weekStartsOn }) &&
128
+ isSameWeek(date, endDate, { weekStartsOn })))
129
+ ) {
130
+ return SELECTION_TYPES.none;
113
131
  }
114
-
115
- if (isEmptyCell && rangeDates && !(0, _dateUtils.isSameMonth)(startDate, endDate) && ((0, _dateUtils.isSameWeek)(startDate, (0, _dateUtils.endOfMonth)(startDate), {
116
- weekStartsOn
117
- }) && (0, _dateUtils.isSameWeek)(date, startDate, {
118
- weekStartsOn
119
- }) || (0, _dateUtils.isSameWeek)(endDate, (0, _dateUtils.startOfMonth)(endDate), {
120
- weekStartsOn
121
- }) && (0, _dateUtils.isSameWeek)(date, endDate, {
122
- weekStartsOn
123
- }))) {
124
- return _BpkCalendarDate.SELECTION_TYPES.middle;
132
+ if (
133
+ isEmptyCell &&
134
+ rangeDates &&
135
+ !isSameMonth(startDate, endDate) &&
136
+ ((isSameWeek(startDate, endOfMonth(startDate), { weekStartsOn }) &&
137
+ isSameWeek(date, startDate, { weekStartsOn })) ||
138
+ (isSameWeek(endDate, startOfMonth(endDate), { weekStartsOn }) &&
139
+ isSameWeek(date, endDate, { weekStartsOn })))
140
+ ) {
141
+ return SELECTION_TYPES.middle;
125
142
  }
126
-
127
- if (rangeDates && (0, _dateUtils.isWithinRange)(date, {
128
- start: startDate,
129
- end: endDate
130
- }) && !sameStartDay && !sameEndDay) {
131
- return _BpkCalendarDate.SELECTION_TYPES.middle;
143
+ if (
144
+ rangeDates &&
145
+ isWithinRange(date, { start: startDate, end: endDate }) &&
146
+ !sameStartDay &&
147
+ !sameEndDay
148
+ ) {
149
+ return SELECTION_TYPES.middle;
132
150
  }
133
-
134
151
  if (startDate && formatDateFull(startDate) === formatDateFull(date)) {
135
- return _BpkCalendarDate.SELECTION_TYPES.start;
152
+ return SELECTION_TYPES.start;
136
153
  }
137
-
138
154
  if (endDate && formatDateFull(endDate) === formatDateFull(date)) {
139
- return _BpkCalendarDate.SELECTION_TYPES.end;
155
+ return SELECTION_TYPES.end;
140
156
  }
141
157
  }
142
158
 
143
- return _BpkCalendarDate.SELECTION_TYPES.none;
159
+ return SELECTION_TYPES.none;
144
160
  }
161
+
145
162
  /**
146
163
  * Handles changing selected date when in single mode
147
164
  * @param {Object} props current props
148
165
  * @param {Object} nextProps next props as the component is updating
149
166
  * @returns {Boolean} based on if the date has changed
150
167
  */
151
-
152
-
153
168
  const singleDateHandler = (props, nextProps) => {
154
169
  const currentSelectConfig = props.selectionConfiguration;
155
170
  const nextSelectConfig = nextProps.selectionConfiguration;
156
171
 
157
- if (((0, _dateUtils.isSameWeek)(nextSelectConfig.date, nextProps.dates[0], {
158
- weekStartsOn: nextProps.weekStartsOn
159
- }) || (0, _dateUtils.isSameWeek)(currentSelectConfig.date, props.dates[0], {
160
- weekStartsOn: props.weekStartsOn
161
- })) && currentSelectConfig.date !== nextSelectConfig.date) {
172
+ if (
173
+ (isSameWeek(nextSelectConfig.date, nextProps.dates[0], {
174
+ weekStartsOn: nextProps.weekStartsOn,
175
+ }) ||
176
+ isSameWeek(currentSelectConfig.date, props.dates[0], {
177
+ weekStartsOn: props.weekStartsOn,
178
+ })) &&
179
+ currentSelectConfig.date !== nextSelectConfig.date
180
+ ) {
162
181
  return true;
163
182
  }
164
-
165
183
  return false;
166
184
  };
185
+
167
186
  /**
168
187
  * Handles changing selected date when in range mode
169
188
  * @param {Object} props current props
170
189
  * @param {Object} nextProps next props as the component is updating
171
190
  * @returns {Boolean} based on if the date has changed
172
191
  */
173
-
174
-
175
192
  const rangeDateHandler = (props, nextProps) => {
176
- const startDateChanged = !(0, _dateUtils.isSameDay)(props.selectionConfiguration.startDate, nextProps.selectionConfiguration.startDate);
177
- const endDateChanged = !(0, _dateUtils.isSameDay)(props.selectionConfiguration.endDate, nextProps.selectionConfiguration.endDate);
193
+ const startDateChanged = !isSameDay(
194
+ props.selectionConfiguration.startDate,
195
+ nextProps.selectionConfiguration.startDate,
196
+ );
197
+ const endDateChanged = !isSameDay(
198
+ props.selectionConfiguration.endDate,
199
+ nextProps.selectionConfiguration.endDate,
200
+ );
178
201
 
179
202
  if (startDateChanged || endDateChanged) {
180
203
  return true;
@@ -182,59 +205,79 @@ const rangeDateHandler = (props, nextProps) => {
182
205
 
183
206
  return false;
184
207
  };
208
+
185
209
  /*
186
210
  Week - table row containing a week full of DateContainer components
187
211
  */
188
-
189
-
190
- class Week extends _react.Component {
212
+ class Week extends Component {
191
213
  shouldComponentUpdate(nextProps) {
192
- const shallowProps = ['DateComponent', 'dateModifiers', 'formatDateFull', 'isKeyboardFocusable', 'markOutsideDays', 'markToday', 'onDateClick', 'onDateKeyDown', 'preventKeyboardFocus', 'weekStartsOn', 'dates', 'cellClassName']; // If any of the props have changed, component should update.
193
-
214
+ const shallowProps = [
215
+ 'DateComponent',
216
+ 'dateModifiers',
217
+ 'formatDateFull',
218
+ 'isKeyboardFocusable',
219
+ 'markOutsideDays',
220
+ 'markToday',
221
+ 'onDateClick',
222
+ 'onDateKeyDown',
223
+ 'preventKeyboardFocus',
224
+ 'weekStartsOn',
225
+ 'dates',
226
+ 'cellClassName',
227
+ ];
228
+
229
+ // If any of the props have changed, component should update.
194
230
  if (!shallowEqualProps(this.props, nextProps, shallowProps)) {
195
231
  return true;
196
- } // If focusedDate is changing, and it'll be included as part
232
+ }
233
+
234
+ // If focusedDate is changing, and it'll be included as part
197
235
  // of either the week we're rendering now or the next week
198
236
  // we'll render, component should update.
199
-
200
-
201
- if (((0, _dateUtils.isSameWeek)(nextProps.focusedDate, nextProps.dates[0], {
202
- weekStartsOn: nextProps.weekStartsOn
203
- }) || (0, _dateUtils.isSameWeek)(this.props.focusedDate, this.props.dates[0], {
204
- weekStartsOn: this.props.weekStartsOn
205
- })) && this.props.focusedDate !== nextProps.focusedDate) {
237
+ if (
238
+ (isSameWeek(nextProps.focusedDate, nextProps.dates[0], {
239
+ weekStartsOn: nextProps.weekStartsOn,
240
+ }) ||
241
+ isSameWeek(this.props.focusedDate, this.props.dates[0], {
242
+ weekStartsOn: this.props.weekStartsOn,
243
+ })) &&
244
+ this.props.focusedDate !== nextProps.focusedDate
245
+ ) {
206
246
  return true;
207
- } // If selected date is changing, and it'll be included as part
247
+ }
248
+
249
+ // If selected date is changing, and it'll be included as part
208
250
  // of either the week we're rendering now or the next week we'll
209
251
  // render, component should update.
210
-
211
-
212
- if (this.props.selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.single && this.props.selectionConfiguration.date) {
252
+ if (
253
+ this.props.selectionConfiguration.type ===
254
+ CALENDAR_SELECTION_TYPE.single &&
255
+ this.props.selectionConfiguration.date
256
+ ) {
213
257
  return singleDateHandler(this.props, nextProps);
214
258
  }
215
-
216
- if (this.props.selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.range) {
259
+ if (
260
+ this.props.selectionConfiguration.type === CALENDAR_SELECTION_TYPE.range
261
+ ) {
217
262
  return rangeDateHandler(this.props, nextProps);
218
- } // If min date is changing, component should update.
219
-
263
+ }
220
264
 
265
+ // If min date is changing, component should update.
221
266
  if (nextProps.minDate) {
222
267
  if (nextProps.minDate !== this.props.minDate) {
223
268
  return true;
224
269
  }
225
-
226
- if (!(0, _dateUtils.isSameDay)(nextProps.minDate, this.props.minDate)) {
270
+ if (!isSameDay(nextProps.minDate, this.props.minDate)) {
227
271
  return true;
228
272
  }
229
- } // If max date is changing, component should update.
230
-
273
+ }
231
274
 
275
+ // If max date is changing, component should update.
232
276
  if (nextProps.maxDate) {
233
277
  if (nextProps.maxDate !== this.props.maxDate) {
234
278
  return true;
235
279
  }
236
-
237
- if (!(0, _dateUtils.isSameDay)(nextProps.maxDate, this.props.maxDate)) {
280
+ if (!isSameDay(nextProps.maxDate, this.props.maxDate)) {
238
281
  return true;
239
282
  }
240
283
  }
@@ -260,11 +303,14 @@ class Week extends _react.Component {
260
303
  onDateKeyDown,
261
304
  preventKeyboardFocus,
262
305
  selectionConfiguration,
263
- weekStartsOn
306
+ weekStartsOn,
264
307
  } = this.props;
265
308
 
266
309
  if (ignoreOutsideDate) {
267
- const daysOutside = this.props.dates.map(date => (0, _dateUtils.isSameMonth)(date, month));
310
+ const daysOutside = this.props.dates.map((date) =>
311
+ isSameMonth(date, month),
312
+ );
313
+
268
314
  const shouldRender = daysOutside.reduce(or);
269
315
 
270
316
  if (!shouldRender) {
@@ -272,68 +318,92 @@ class Week extends _react.Component {
272
318
  }
273
319
  }
274
320
 
275
- return /*#__PURE__*/_react.default.createElement("div", {
276
- className: getClassName('bpk-calendar-grid__week')
277
- }, this.props.dates.map(date => {
278
- const isBlocked = minDate && maxDate ? !(0, _dateUtils.isWithinRange)(date, {
279
- start: minDate,
280
- end: maxDate
281
- }) : false;
282
- const dateSelectionType = getSelectionType(date, selectionConfiguration, formatDateFull, month, weekStartsOn, ignoreOutsideDate);
283
- return /*#__PURE__*/_react.default.createElement(DateContainer, {
284
- className: this.props.cellClassName,
285
- isEmptyCell: !(0, _dateUtils.isSameMonth)(date, month) && ignoreOutsideDate,
286
- isBlocked: isBlocked,
287
- key: date.getDate(),
288
- selectionType: dateSelectionType
289
- }, /*#__PURE__*/_react.default.createElement(DateComponent, _extends({
290
- date: date,
291
- modifiers: dateModifiers,
292
- "aria-label": formatDateFull(date),
293
- onClick: onDateClick,
294
- onDateKeyDown: onDateKeyDown,
295
- preventKeyboardFocus: preventKeyboardFocus,
296
- isKeyboardFocusable: isKeyboardFocusable,
297
- isFocused: (0, _dateUtils.isSameDay)(date, focusedDate),
298
- isSelected: getSelectedDate(date, selectionConfiguration),
299
- isBlocked: isBlocked,
300
- isOutside: markOutsideDays && !(0, _dateUtils.isSameMonth)(date, month),
301
- isToday: markToday && (0, _dateUtils.isToday)(date),
302
- selectionType: dateSelectionType
303
- }, dateProps)));
304
- }));
321
+ return (
322
+ <div className={getClassName('bpk-calendar-grid__week')}>
323
+ {this.props.dates.map((date) => {
324
+ const isBlocked =
325
+ minDate && maxDate
326
+ ? !isWithinRange(date, { start: minDate, end: maxDate })
327
+ : false;
328
+
329
+ const dateSelectionType = getSelectionType(
330
+ date,
331
+ selectionConfiguration,
332
+ formatDateFull,
333
+ month,
334
+ weekStartsOn,
335
+ ignoreOutsideDate,
336
+ );
337
+
338
+ return (
339
+ <DateContainer
340
+ className={this.props.cellClassName}
341
+ isEmptyCell={!isSameMonth(date, month) && ignoreOutsideDate}
342
+ isBlocked={isBlocked}
343
+ key={date.getDate()}
344
+ selectionType={dateSelectionType}
345
+ >
346
+ <DateComponent
347
+ date={date}
348
+ modifiers={dateModifiers}
349
+ aria-label={formatDateFull(date)}
350
+ onClick={onDateClick}
351
+ onDateKeyDown={onDateKeyDown}
352
+ preventKeyboardFocus={preventKeyboardFocus}
353
+ isKeyboardFocusable={isKeyboardFocusable}
354
+ isFocused={isSameDay(date, focusedDate)}
355
+ isSelected={getSelectedDate(date, selectionConfiguration)}
356
+ isBlocked={isBlocked}
357
+ isOutside={markOutsideDays && !isSameMonth(date, month)}
358
+ isToday={markToday && isToday(date)}
359
+ selectionType={dateSelectionType}
360
+ {...dateProps}
361
+ />
362
+ </DateContainer>
363
+ );
364
+ })}
365
+ </div>
366
+ );
305
367
  }
306
-
307
368
  }
308
369
 
309
370
  Week.propTypes = {
310
- DateComponent: _propTypes.default.elementType.isRequired,
311
- dateModifiers: _customProptypes.default.DateModifiers.isRequired,
312
- dates: _propTypes.default.arrayOf(Date).isRequired,
313
- formatDateFull: _propTypes.default.func.isRequired,
314
- preventKeyboardFocus: _propTypes.default.bool.isRequired,
315
- markToday: _propTypes.default.bool.isRequired,
316
- markOutsideDays: _propTypes.default.bool.isRequired,
317
- isKeyboardFocusable: _propTypes.default.bool.isRequired,
318
- month: _propTypes.default.instanceOf(Date).isRequired,
319
- weekStartsOn: _propTypes.default.number.isRequired,
320
- daysOfWeek: (0, _bpkReactUtils.deprecated)(_customProptypes.default.DaysOfWeek, 'daysOfWeek property in Week is now deprecated as no longer part of the calendar, so is no longer required'),
321
- focusedDate: _propTypes.default.instanceOf(Date),
322
- maxDate: _propTypes.default.instanceOf(Date),
323
- minDate: _propTypes.default.instanceOf(Date),
324
- cellClassName: _propTypes.default.string,
325
- onDateClick: _propTypes.default.func,
326
- onDateKeyDown: _propTypes.default.func,
327
- selectionConfiguration: _customProptypes.default.SelectionConfiguration,
328
- selectedDate: (0, _bpkReactUtils.deprecated)(_propTypes.default.instanceOf(Date), 'Use selectionConfiguration to set selectedDate'),
329
- selectionEnd: _propTypes.default.instanceOf(Date),
330
- selectionStart: _propTypes.default.instanceOf(Date),
371
+ DateComponent: PropTypes.elementType.isRequired,
372
+ dateModifiers: CustomPropTypes.DateModifiers.isRequired,
373
+ dates: PropTypes.arrayOf(Date).isRequired,
374
+ formatDateFull: PropTypes.func.isRequired,
375
+ preventKeyboardFocus: PropTypes.bool.isRequired,
376
+ markToday: PropTypes.bool.isRequired,
377
+ markOutsideDays: PropTypes.bool.isRequired,
378
+ isKeyboardFocusable: PropTypes.bool.isRequired,
379
+ month: PropTypes.instanceOf(Date).isRequired,
380
+ weekStartsOn: PropTypes.number.isRequired,
381
+ daysOfWeek: deprecated(
382
+ CustomPropTypes.DaysOfWeek,
383
+ 'daysOfWeek property in Week is now deprecated as no longer part of the calendar, so is no longer required',
384
+ ),
385
+ focusedDate: PropTypes.instanceOf(Date),
386
+ maxDate: PropTypes.instanceOf(Date),
387
+ minDate: PropTypes.instanceOf(Date),
388
+ cellClassName: PropTypes.string,
389
+ onDateClick: PropTypes.func,
390
+ onDateKeyDown: PropTypes.func,
391
+ selectionConfiguration: CustomPropTypes.SelectionConfiguration,
392
+ selectedDate: deprecated(
393
+ PropTypes.instanceOf(Date),
394
+ 'Use selectionConfiguration to set selectedDate',
395
+ ),
396
+ selectionEnd: PropTypes.instanceOf(Date),
397
+ selectionStart: PropTypes.instanceOf(Date),
331
398
  // eslint-disable-next-line react/require-default-props
332
- showWeekendSeparator: (0, _bpkReactUtils.deprecated)(_propTypes.default.bool, 'The showWeekendSeparator prop in Week is now deprecated as no longer part of the calendar, so is no longer required'),
333
- ignoreOutsideDate: _propTypes.default.bool,
334
- dateProps: _propTypes.default.object // eslint-disable-line react/forbid-prop-types
335
-
399
+ showWeekendSeparator: deprecated(
400
+ PropTypes.bool,
401
+ 'The showWeekendSeparator prop in Week is now deprecated as no longer part of the calendar, so is no longer required',
402
+ ),
403
+ ignoreOutsideDate: PropTypes.bool,
404
+ dateProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types
336
405
  };
406
+
337
407
  Week.defaultProps = {
338
408
  cellClassName: null,
339
409
  daysOfWeek: null,
@@ -342,44 +412,43 @@ Week.defaultProps = {
342
412
  minDate: null,
343
413
  onDateClick: null,
344
414
  onDateKeyDown: null,
345
- selectionConfiguration: {
346
- type: _customProptypes.CALENDAR_SELECTION_TYPE.single,
347
- date: null
348
- },
415
+ selectionConfiguration: { type: CALENDAR_SELECTION_TYPE.single, date: null },
349
416
  selectedDate: null,
350
417
  selectionEnd: null,
351
418
  selectionStart: null,
352
419
  ignoreOutsideDate: false,
353
- dateProps: null
420
+ dateProps: null,
354
421
  };
422
+
355
423
  /*
356
424
  DateContainer - one for each date in the grid; wraps the actual BpkCalendarDate (or custom) component
357
425
  */
426
+ const DateContainer = (props) => {
427
+ const { children, className, isBlocked, isEmptyCell, selectionType } = props;
358
428
 
359
- const DateContainer = props => {
360
- const {
361
- children,
429
+ const classNames = getClassName(
430
+ 'bpk-calendar-grid__date',
431
+ `bpk-calendar-grid__date--${selectionType}`,
362
432
  className,
363
- isBlocked,
364
- isEmptyCell,
365
- selectionType
366
- } = props;
367
- const classNames = getClassName('bpk-calendar-grid__date', `bpk-calendar-grid__date--${selectionType}`, className);
368
- return /*#__PURE__*/_react.default.createElement("div", {
369
- "aria-hidden": isEmptyCell || isBlocked,
370
- className: classNames
371
- }, children);
433
+ );
434
+
435
+ return (
436
+ <div aria-hidden={isEmptyCell || isBlocked} className={classNames}>
437
+ {children}
438
+ </div>
439
+ );
372
440
  };
373
441
 
374
442
  DateContainer.propTypes = {
375
- children: _propTypes.default.element.isRequired,
376
- selectionType: _propTypes.default.string.isRequired,
377
- isEmptyCell: _propTypes.default.bool.isRequired,
378
- isBlocked: _propTypes.default.bool.isRequired,
379
- className: _propTypes.default.string
443
+ children: PropTypes.element.isRequired,
444
+ selectionType: PropTypes.string.isRequired,
445
+ isEmptyCell: PropTypes.bool.isRequired,
446
+ isBlocked: PropTypes.bool.isRequired,
447
+ className: PropTypes.string,
380
448
  };
449
+
381
450
  DateContainer.defaultProps = {
382
- className: null
451
+ className: null,
383
452
  };
384
- var _default = Week;
385
- exports.default = _default;
453
+
454
+ export default Week;