@skyscanner/backpack-web 18.2.1 → 20.0.0

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 (265) hide show
  1. package/README.md +0 -1
  2. package/bpk-animate-height/README.md +1 -1
  3. package/bpk-animate-height/src/AnimateHeight.js +1 -1
  4. package/bpk-component-accordion/README.md +0 -3
  5. package/bpk-component-accordion/src/BpkAccordion.js +1 -1
  6. package/bpk-component-accordion/src/BpkAccordionItem.js +3 -2
  7. package/bpk-component-accordion/src/withAccordionItemState.js +2 -1
  8. package/bpk-component-accordion/src/withSingleItemAccordionState.js +2 -8
  9. package/bpk-component-aria-live/README.md +0 -1
  10. package/bpk-component-aria-live/src/BpkAriaLive.js +0 -1
  11. package/bpk-component-autosuggest/README.md +1 -1
  12. package/bpk-component-autosuggest/src/BpkAutosuggest.js +0 -1
  13. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +1 -1
  14. package/bpk-component-badge/README.md +0 -1
  15. package/bpk-component-badge/src/BpkBadge.js +0 -1
  16. package/bpk-component-banner-alert/README.md +2 -3
  17. package/bpk-component-banner-alert/src/AnimateAndFade.js +2 -1
  18. package/bpk-component-banner-alert/src/BpkBannerAlert.js +1 -3
  19. package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +0 -8
  20. package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +0 -1
  21. package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +1 -1
  22. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +1 -3
  23. package/bpk-component-banner-alert/src/common-types.js +1 -9
  24. package/bpk-component-banner-alert/src/withBannerAlertState.js +2 -1
  25. package/bpk-component-barchart/README.md +0 -1
  26. package/bpk-component-barchart/src/BpkBarchart.js +1 -1
  27. package/bpk-component-barchart/src/BpkBarchartBar.js +0 -1
  28. package/bpk-component-barchart/src/BpkBarchartBars.js +0 -1
  29. package/bpk-component-barchart/src/BpkBarchartDefs.js +0 -2
  30. package/bpk-component-barchart/src/BpkChartAxis.js +1 -1
  31. package/bpk-component-barchart/src/BpkChartDataTable.js +0 -1
  32. package/bpk-component-barchart/src/BpkChartGridLines.js +0 -1
  33. package/bpk-component-barchart/src/BpkChartMargin.js +1 -1
  34. package/bpk-component-blockquote/README.md +0 -1
  35. package/bpk-component-blockquote/src/BpkBlockquote.js +0 -1
  36. package/bpk-component-breadcrumb/README.md +1 -1
  37. package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +5 -4
  38. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +1 -1
  39. package/bpk-component-breakpoint/README.md +0 -1
  40. package/bpk-component-breakpoint/src/BpkBreakpoint.js +1 -1
  41. package/bpk-component-button/README.md +0 -3
  42. package/bpk-component-button/index.js +0 -2
  43. package/bpk-component-button/src/BpkButton.js +0 -9
  44. package/bpk-component-button/src/BpkButtonBase.js +1 -3
  45. package/bpk-component-button/src/BpkButtonDestructive.js +1 -3
  46. package/bpk-component-button/src/BpkButtonFeatured.js +1 -3
  47. package/bpk-component-button/src/BpkButtonLink.js +1 -7
  48. package/bpk-component-button/src/BpkButtonLinkOnDark.js +1 -7
  49. package/bpk-component-button/src/BpkButtonPrimary.js +1 -3
  50. package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +1 -3
  51. package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +1 -3
  52. package/bpk-component-button/src/BpkButtonSecondary.js +1 -3
  53. package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +1 -3
  54. package/bpk-component-button/src/commonButtonTests.js +0 -1
  55. package/bpk-component-calendar/README.md +2 -2
  56. package/bpk-component-calendar/src/BpkCalendarContainer.js +4 -19
  57. package/bpk-component-calendar/src/BpkCalendarDate.js +1 -1
  58. package/bpk-component-calendar/src/BpkCalendarGrid.js +2 -19
  59. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +2 -7
  60. package/bpk-component-calendar/src/BpkCalendarGridTransition.js +1 -1
  61. package/bpk-component-calendar/src/BpkCalendarNav.js +0 -1
  62. package/bpk-component-calendar/src/Week.js +2 -21
  63. package/bpk-component-calendar/src/composeCalendar.js +1 -12
  64. package/bpk-component-card/README.md +0 -2
  65. package/bpk-component-card/src/BpkCard.js +1 -1
  66. package/bpk-component-card/src/BpkDividedCard.js +0 -1
  67. package/bpk-component-checkbox/README.md +0 -1
  68. package/bpk-component-checkbox/src/BpkCheckbox.js +1 -1
  69. package/bpk-component-chip/README.md +0 -1
  70. package/bpk-component-chip/src/BpkDismissibleChip.js +0 -2
  71. package/bpk-component-chip/src/BpkDropdownChip.js +0 -2
  72. package/bpk-component-chip/src/BpkSelectableChip.js +1 -1
  73. package/bpk-component-close-button/README.md +0 -1
  74. package/bpk-component-close-button/src/BpkCloseButton.js +1 -1
  75. package/bpk-component-code/README.md +0 -1
  76. package/bpk-component-code/src/BpkCode.js +1 -1
  77. package/bpk-component-code/src/BpkCodeBlock.js +1 -1
  78. package/bpk-component-content-cards/README.md +0 -1
  79. package/bpk-component-content-cards/src/BpkContentCard.js +0 -2
  80. package/bpk-component-content-cards/src/BpkContentCards.js +0 -2
  81. package/bpk-component-datatable/README.md +3 -4
  82. package/bpk-component-datatable/src/BpkDataTable.js +3 -2
  83. package/bpk-component-datatable/src/BpkDataTableColumn.js +0 -1
  84. package/bpk-component-datatable/src/BpkDataTableHeader.js +2 -2
  85. package/bpk-component-datepicker/README.md +2 -2
  86. package/bpk-component-datepicker/src/BpkDatepicker.js +3 -13
  87. package/bpk-component-description-list/README.md +0 -1
  88. package/bpk-component-description-list/src/ComponentFactory.js +0 -1
  89. package/bpk-component-dialog/README.md +1 -1
  90. package/bpk-component-dialog/src/BpkDialog.js +0 -2
  91. package/bpk-component-dialog/src/BpkDialogInner.js +0 -2
  92. package/bpk-component-drawer/README.md +1 -1
  93. package/bpk-component-drawer/src/BpkDrawer.js +1 -1
  94. package/bpk-component-drawer/src/BpkDrawerContent.js +1 -1
  95. package/bpk-component-fieldset/README.md +1 -1
  96. package/bpk-component-fieldset/src/BpkFieldset.js +2 -1
  97. package/bpk-component-flare/README.md +0 -1
  98. package/bpk-component-flare/src/BpkContentBubble.js +0 -1
  99. package/bpk-component-flare/src/BpkFlareBar.js +0 -1
  100. package/bpk-component-flare/src/svgs/pointer.svg +1 -1
  101. package/bpk-component-floating-notification/README.md +0 -1
  102. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +1 -1
  103. package/bpk-component-form-validation/README.md +0 -1
  104. package/bpk-component-form-validation/src/BpkFormValidation.js +0 -1
  105. package/bpk-component-graphic-promotion/README.md +0 -1
  106. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +4 -4
  107. package/bpk-component-grid-toggle/README.md +0 -1
  108. package/bpk-component-grid-toggle/src/BpkGridToggle.js +2 -2
  109. package/bpk-component-horizontal-nav/README.md +1 -1
  110. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +4 -3
  111. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -1
  112. package/bpk-component-icon/README.md +0 -3
  113. package/bpk-component-icon/index.js +0 -4
  114. package/bpk-component-icon/src/classNameModifierHOCFactory.js +0 -1
  115. package/bpk-component-icon/src/withAlignment.js +0 -2
  116. package/bpk-component-icon/src/withDescription.js +1 -1
  117. package/bpk-component-image/README.md +0 -1
  118. package/bpk-component-image/src/BpkBackgroundImage.js +4 -20
  119. package/bpk-component-image/src/BpkImage.js +4 -22
  120. package/bpk-component-image/src/withLazyLoading.js +9 -5
  121. package/bpk-component-image/src/withLoadingBehavior.js +6 -5
  122. package/bpk-component-infinite-scroll/README.md +0 -2
  123. package/bpk-component-infinite-scroll/src/withInfiniteScroll-test.flow.js +3 -3
  124. package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +2 -6
  125. package/bpk-component-input/README.md +0 -2
  126. package/bpk-component-input/index.js +2 -11
  127. package/bpk-component-input/src/BpkClearButton.js +0 -1
  128. package/bpk-component-input/src/BpkInput.js +1 -1
  129. package/bpk-component-input/src/withOpenEvents.js +2 -2
  130. package/bpk-component-label/README.md +0 -1
  131. package/bpk-component-label/src/BpkLabel.js +1 -1
  132. package/bpk-component-link/README.md +0 -1
  133. package/bpk-component-link/src/BpkButtonLink.js +3 -8
  134. package/bpk-component-link/src/BpkLink.js +2 -8
  135. package/bpk-component-list/README.md +0 -1
  136. package/bpk-component-list/src/BpkList.js +1 -1
  137. package/bpk-component-list/src/BpkListItem.js +1 -1
  138. package/bpk-component-loading-button/README.md +0 -1
  139. package/bpk-component-loading-button/src/BpkLoadingButton.js +1 -1
  140. package/bpk-component-map/README.md +0 -3
  141. package/bpk-component-map/src/BpkBasicMapMarker.js +1 -1
  142. package/bpk-component-map/src/BpkIconMarker.js +1 -1
  143. package/bpk-component-map/src/BpkIconMarkerBackground.js +0 -2
  144. package/bpk-component-map/src/BpkMap.js +2 -1
  145. package/bpk-component-map/src/BpkOverlayView.js +1 -1
  146. package/bpk-component-map/src/BpkPriceMarker.js +0 -1
  147. package/bpk-component-map/src/DefaultLoadingElement.js +0 -2
  148. package/bpk-component-map/src/withGoogleMapsScript.js +1 -1
  149. package/bpk-component-mobile-scroll-container/README.md +0 -1
  150. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +2 -1
  151. package/bpk-component-modal/README.md +1 -1
  152. package/bpk-component-modal/src/BpkModal.js +0 -1
  153. package/bpk-component-modal/src/BpkModalInner.js +1 -1
  154. package/bpk-component-navigation-bar/README.md +0 -3
  155. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +3 -2
  156. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +1 -1
  157. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +1 -1
  158. package/bpk-component-nudger/README.md +2 -2
  159. package/bpk-component-nudger/src/BpkConfigurableNudger.js +0 -1
  160. package/bpk-component-nudger/src/BpkNudger.js +0 -1
  161. package/bpk-component-overlay/README.md +1 -3
  162. package/bpk-component-overlay/index.js +1 -2
  163. package/bpk-component-overlay/src/BpkOverlay.js +2 -15
  164. package/bpk-component-page-indicator/README.md +0 -1
  165. package/bpk-component-page-indicator/src/BpkPageIndicator.js +0 -1
  166. package/bpk-component-page-indicator/src/NavButton.js +0 -1
  167. package/bpk-component-pagination/README.md +0 -1
  168. package/bpk-component-pagination/src/BpkPagination.js +0 -1
  169. package/bpk-component-pagination/src/BpkPaginationBreak.js +0 -1
  170. package/bpk-component-pagination/src/BpkPaginationList.js +0 -1
  171. package/bpk-component-pagination/src/BpkPaginationNudger.js +0 -1
  172. package/bpk-component-pagination/src/BpkPaginationPage.js +0 -1
  173. package/bpk-component-panel/README.md +0 -1
  174. package/bpk-component-panel/src/BpkPanel.js +0 -1
  175. package/bpk-component-phone-input/README.md +1 -1
  176. package/bpk-component-phone-input/src/BpkPhoneInput.js +0 -1
  177. package/bpk-component-popover/README.md +1 -1
  178. package/bpk-component-popover/src/BpkPopover.js +1 -1
  179. package/bpk-component-popover/src/BpkPopoverPortal.js +2 -1
  180. package/bpk-component-price/README.md +4 -4
  181. package/bpk-component-price/src/BpkPrice.js +60 -25
  182. package/bpk-component-price/src/BpkPrice.module.scss +18 -5
  183. package/bpk-component-progress/README.md +1 -1
  184. package/bpk-component-progress/src/BpkProgress.js +1 -1
  185. package/bpk-component-radio/README.md +0 -1
  186. package/bpk-component-radio/src/BpkRadio.js +1 -1
  187. package/bpk-component-rating/README.md +0 -1
  188. package/bpk-component-rating/src/BpkRating.js +1 -1
  189. package/bpk-component-rtl-toggle/README.md +0 -1
  190. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +2 -2
  191. package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +1 -1
  192. package/bpk-component-scrollable-calendar/README.md +1 -1
  193. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +1 -1
  194. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +0 -2
  195. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +3 -8
  196. package/bpk-component-section-list/README.md +0 -1
  197. package/bpk-component-section-list/src/BpkSectionList.js +1 -1
  198. package/bpk-component-section-list/src/BpkSectionListItem.js +1 -1
  199. package/bpk-component-section-list/src/BpkSectionListSection.js +3 -2
  200. package/bpk-component-select/README.md +0 -2
  201. package/bpk-component-select/src/BpkSelect.js +3 -2
  202. package/bpk-component-skip-link/README.md +0 -1
  203. package/bpk-component-skip-link/src/BpkSkipLink.js +0 -1
  204. package/bpk-component-slider/README.md +1 -1
  205. package/bpk-component-slider/src/BpkSlider.js +0 -1
  206. package/bpk-component-spinner/README.md +0 -1
  207. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +0 -1
  208. package/bpk-component-spinner/src/BpkLargeSpinner.js +0 -1
  209. package/bpk-component-spinner/src/BpkSpinner.js +0 -1
  210. package/bpk-component-split-input/README.md +0 -1
  211. package/bpk-component-split-input/src/BpkInputField.js +1 -1
  212. package/bpk-component-split-input/src/BpkSplitInput.js +1 -1
  213. package/bpk-component-star-rating/README.md +0 -1
  214. package/bpk-component-star-rating/src/BpkInteractiveStar.js +0 -1
  215. package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +0 -1
  216. package/bpk-component-star-rating/src/BpkStar.js +0 -1
  217. package/bpk-component-star-rating/src/BpkStarRating.js +0 -1
  218. package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +2 -1
  219. package/bpk-component-switch/README.md +0 -1
  220. package/bpk-component-switch/index.js +2 -5
  221. package/bpk-component-switch/src/BpkSwitch.js +3 -18
  222. package/bpk-component-switch/src/BpkSwitch.module.scss +6 -13
  223. package/bpk-component-table/README.md +0 -2
  224. package/bpk-component-table/src/BpkTable.js +4 -14
  225. package/bpk-component-table/src/BpkTable.module.scss +0 -8
  226. package/bpk-component-table/src/BpkTableBody.js +1 -1
  227. package/bpk-component-table/src/BpkTableCell.js +1 -1
  228. package/bpk-component-table/src/BpkTableHead.js +1 -1
  229. package/bpk-component-table/src/BpkTableHeadCell.js +5 -10
  230. package/bpk-component-table/src/BpkTableRow.js +1 -1
  231. package/bpk-component-text/README.md +0 -3
  232. package/bpk-component-text/src/BpkText.js +1 -1
  233. package/bpk-component-textarea/README.md +0 -1
  234. package/bpk-component-textarea/src/BpkTextarea.js +0 -1
  235. package/bpk-component-theme-toggle/README.md +0 -2
  236. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +2 -2
  237. package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
  238. package/bpk-component-ticket/README.md +0 -1
  239. package/bpk-component-ticket/src/BpkTicket.js +1 -1
  240. package/bpk-component-tooltip/README.md +1 -1
  241. package/bpk-component-tooltip/src/BpkTooltip.js +1 -1
  242. package/bpk-component-tooltip/src/BpkTooltipPortal.js +3 -2
  243. package/bpk-react-utils/README.md +1 -7
  244. package/bpk-react-utils/src/TransitionInitialMount.js +1 -1
  245. package/bpk-react-utils/src/withDefaultProps.js +1 -1
  246. package/bpk-scrim-utils/src/BpkScrim.js +0 -1
  247. package/bpk-scrim-utils/src/withScrim.js +1 -1
  248. package/bpk-theming/src/BpkThemeProvider.js +1 -1
  249. package/package.json +2 -2
  250. package/bpk-component-button/BpkButtonOutline.js +0 -21
  251. package/bpk-component-button/src/BpkButtonOutline.js +0 -48
  252. package/bpk-component-button/src/BpkButtonOutline.module.css +0 -18
  253. package/bpk-component-button/src/BpkButtonOutline.module.scss +0 -23
  254. package/bpk-component-grid/README.md +0 -90
  255. package/bpk-component-grid/index.js +0 -25
  256. package/bpk-component-grid/src/BpkGridColumn.js +0 -118
  257. package/bpk-component-grid/src/BpkGridColumn.module.css +0 -18
  258. package/bpk-component-grid/src/BpkGridColumn.module.scss +0 -73
  259. package/bpk-component-grid/src/BpkGridContainer.js +0 -62
  260. package/bpk-component-grid/src/BpkGridContainer.module.css +0 -18
  261. package/bpk-component-grid/src/BpkGridContainer.module.scss +0 -33
  262. package/bpk-component-grid/src/BpkGridRow.js +0 -57
  263. package/bpk-component-grid/src/BpkGridRow.module.css +0 -18
  264. package/bpk-component-grid/src/BpkGridRow.module.scss +0 -29
  265. package/bpk-component-image/src/customPropTypes.js +0 -37
@@ -18,13 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import {
24
- type Props as CommonProps,
25
- defaultProps,
26
- propTypes,
27
- } from './common-types';
21
+ import { Props as CommonProps, defaultProps, propTypes } from './common-types';
28
22
  import BpkButtonBase, { cssModules } from './BpkButtonBase';
29
23
  import STYLES from './BpkButtonLink.module.scss';
30
24
 
@@ -18,13 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import {
24
- type Props as CommonProps,
25
- defaultProps,
26
- propTypes,
27
- } from './common-types';
21
+ import { Props as CommonProps, defaultProps, propTypes } from './common-types';
28
22
  import BpkButtonBase, { cssModules } from './BpkButtonBase';
29
23
  import STYLES from './BpkButtonLinkOnDark.module.scss';
30
24
 
@@ -18,9 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import { type Props, defaultProps, propTypes } from './common-types';
21
+ import { Props, defaultProps, propTypes } from './common-types';
24
22
  import BpkButtonBase from './BpkButtonBase';
25
23
 
26
24
  // TODO: BpkButtonBase has the primary button style as it wasn't removed to
@@ -18,9 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import { type Props, defaultProps, propTypes } from './common-types';
21
+ import { Props, defaultProps, propTypes } from './common-types';
24
22
  import BpkButtonBase, { cssModules } from './BpkButtonBase';
25
23
  import STYLES from './BpkButtonPrimaryOnDark.module.scss';
26
24
 
@@ -18,9 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import { type Props, defaultProps, propTypes } from './common-types';
21
+ import { Props, defaultProps, propTypes } from './common-types';
24
22
  import BpkButtonBase, { cssModules } from './BpkButtonBase';
25
23
  import STYLES from './BpkButtonPrimaryOnLight.module.scss';
26
24
 
@@ -18,9 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import { type Props, defaultProps, propTypes } from './common-types';
21
+ import { Props, defaultProps, propTypes } from './common-types';
24
22
  import BpkButtonBase, { cssModules } from './BpkButtonBase';
25
23
  import STYLES from './BpkButtonSecondary.module.scss';
26
24
 
@@ -18,9 +18,7 @@
18
18
 
19
19
  /* @flow strict */
20
20
 
21
- import React from 'react';
22
-
23
- import { type Props, defaultProps, propTypes } from './common-types';
21
+ import { Props, defaultProps, propTypes } from './common-types';
24
22
  import BpkButtonBase, { cssModules } from './BpkButtonBase';
25
23
  import STYLES from './BpkButtonSecondaryOnDark.module.scss';
26
24
 
@@ -16,7 +16,6 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import React from 'react';
20
19
  import { render } from '@testing-library/react';
21
20
 
22
21
  const commonButtonTests = (ButtonToTest) => {
@@ -9,7 +9,7 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React, { Component } from 'react';
12
+ import { Component } from 'react';
13
13
  import BpkCalendar from '@skyscanner/backpack-web/bpk-component-calendar';
14
14
  import BpkInput, { INPUT_TYPES } from '@skyscanner/backpack-web/bpk-component-input';
15
15
  import format from 'date-fns/format';
@@ -373,7 +373,7 @@ const onMonthChange = (event, {
373
373
 
374
374
  #### initiallyFocusedDate
375
375
 
376
- Sets the date that is focused initially, this prop has no effect if `selectedDate` or the deprecated `date` prop are specified in which case the date specified in those props is focused. If no selected date is set and `initiallyFocusedDate` is not set the focused date is the `minDate`(defaults to today if it has not been explicitly set).
376
+ Sets the date that is focused initially, this prop has no effect if `selectionConfiguration` is specified in which case the date specified in this prop is focused. If no selected date is set and `initiallyFocusedDate` is not set the focused date is the `minDate`(defaults to today if it has not been explicitly set).
377
377
 
378
378
  #### navProps, headerProps, gridProps, dateProps
379
379
 
@@ -17,9 +17,9 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React, { Component } from 'react';
20
+ import { Component } from 'react';
21
21
 
22
- import { deprecated, isRTL } from '../../bpk-react-utils';
22
+ import { isRTL } from '../../bpk-react-utils';
23
23
 
24
24
  import CustomPropTypes, { CALENDAR_SELECTION_TYPE } from './custom-proptypes';
25
25
  import BpkCalendarNav from './BpkCalendarNav';
@@ -287,13 +287,8 @@ const withCalendarState = (Calendar) => {
287
287
  };
288
288
 
289
289
  render() {
290
- const {
291
- date,
292
- maxDate,
293
- minDate,
294
- selectionConfiguration,
295
- ...calendarProps
296
- } = this.props;
290
+ const { maxDate, minDate, selectionConfiguration, ...calendarProps } =
291
+ this.props;
297
292
 
298
293
  delete calendarProps.onDateSelect;
299
294
  delete calendarProps.onMonthChange;
@@ -326,25 +321,16 @@ const withCalendarState = (Calendar) => {
326
321
  }
327
322
 
328
323
  BpkCalendarContainer.propTypes = {
329
- date: deprecated(
330
- PropTypes.instanceOf(Date),
331
- 'Use selectionConfiguration to set selectedDate',
332
- ),
333
324
  fixedWidth: PropTypes.bool,
334
325
  maxDate: PropTypes.instanceOf(Date),
335
326
  minDate: PropTypes.instanceOf(Date),
336
327
  onDateSelect: PropTypes.func,
337
328
  onMonthChange: PropTypes.func,
338
329
  selectionConfiguration: CustomPropTypes.SelectionConfiguration,
339
- selectedDate: deprecated(
340
- PropTypes.instanceOf(Date),
341
- 'Use selectionConfiguration to set selectedDate',
342
- ),
343
330
  initiallyFocusedDate: PropTypes.instanceOf(Date),
344
331
  };
345
332
 
346
333
  BpkCalendarContainer.defaultProps = {
347
- date: null,
348
334
  fixedWidth: true,
349
335
  maxDate: addMonths(new Date(), 12),
350
336
  minDate: new Date(),
@@ -354,7 +340,6 @@ const withCalendarState = (Calendar) => {
354
340
  type: CALENDAR_SELECTION_TYPE.single,
355
341
  date: null,
356
342
  },
357
- selectedDate: null,
358
343
  initiallyFocusedDate: null,
359
344
  };
360
345
 
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React, { PureComponent } from 'react';
20
+ import { PureComponent } from 'react';
21
21
 
22
22
  import { cssModules } from '../../bpk-react-utils';
23
23
 
@@ -17,9 +17,9 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React, { Component } from 'react';
20
+ import { Component } from 'react';
21
21
 
22
- import { cssModules, deprecated, isDeviceIos } from '../../bpk-react-utils';
22
+ import { cssModules, isDeviceIos } from '../../bpk-react-utils';
23
23
 
24
24
  import BpkCalendarGridHeader from './BpkCalendarGridHeader';
25
25
  import Week from './Week';
@@ -103,8 +103,6 @@ class BpkCalendarGrid extends Component {
103
103
  onDateKeyDown,
104
104
  preventKeyboardFocus,
105
105
  selectionConfiguration,
106
- selectionEnd,
107
- selectionStart,
108
106
  weekStartsOn,
109
107
  } = this.props;
110
108
 
@@ -139,8 +137,6 @@ class BpkCalendarGrid extends Component {
139
137
  markToday={markToday}
140
138
  markOutsideDays={markOutsideDays}
141
139
  selectionConfiguration={selectionConfiguration}
142
- selectionEnd={selectionEnd}
143
- selectionStart={selectionStart}
144
140
  focusedDate={focusedDate}
145
141
  minDate={minDate}
146
142
  maxDate={maxDate}
@@ -177,16 +173,6 @@ export const propTypes = {
177
173
  onDateKeyDown: PropTypes.func,
178
174
  preventKeyboardFocus: PropTypes.bool,
179
175
  selectionConfiguration: CustomPropTypes.SelectionConfiguration,
180
- selectedDate: deprecated(
181
- PropTypes.instanceOf(Date),
182
- 'Use selectionConfiguration to set selectedDate',
183
- ),
184
- selectionEnd: PropTypes.instanceOf(Date),
185
- selectionStart: PropTypes.instanceOf(Date),
186
- showWeekendSeparator: deprecated(
187
- PropTypes.bool,
188
- 'The showWeekendSeparator prop in BpkCalendarGrid is now deprecated as no longer part of the calendar, so is no longer required',
189
- ),
190
176
  ignoreOutsideDate: PropTypes.bool,
191
177
  dateProps: PropTypes.object,
192
178
  };
@@ -205,10 +191,7 @@ BpkCalendarGrid.defaultProps = {
205
191
  onDateClick: null,
206
192
  onDateKeyDown: null,
207
193
  preventKeyboardFocus: false,
208
- selectedDate: null,
209
194
  selectionConfiguration: { type: CALENDAR_SELECTION_TYPE.single, date: null },
210
- selectionEnd: null,
211
- selectionStart: null,
212
195
  ignoreOutsideDate: false,
213
196
  dateProps: null,
214
197
  cellClassName: null,
@@ -17,9 +17,9 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React, { PureComponent } from 'react';
20
+ import { PureComponent } from 'react';
21
21
 
22
- import { cssModules, deprecated } from '../../bpk-react-utils';
22
+ import { cssModules } from '../../bpk-react-utils';
23
23
 
24
24
  import CustomPropTypes from './custom-proptypes';
25
25
  import { orderDaysOfWeek } from './date-utils';
@@ -94,11 +94,6 @@ BpkCalendarGridHeader.propTypes = {
94
94
  isTableHead: PropTypes.bool,
95
95
  className: PropTypes.string,
96
96
  weekDayKey: CustomPropTypes.WeekDayKey,
97
- // eslint-disable-next-line react/require-default-props,react/no-unused-prop-types
98
- showWeekendSeparator: deprecated(
99
- PropTypes.bool,
100
- 'The showWeekendSeparator prop in BpkCalendarGridHeader is now deprecated as no longer part of the calendar, so is no longer required',
101
- ),
102
97
  };
103
98
 
104
99
  BpkCalendarGridHeader.defaultProps = {
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React, { Component } from 'react';
20
+ import { Component } from 'react';
21
21
 
22
22
  import { cssModules, isRTL } from '../../bpk-react-utils';
23
23
 
@@ -17,7 +17,6 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React from 'react';
21
20
 
22
21
  import ArrowLeftIcon from '../../bpk-component-icon/lg/arrow-left';
23
22
  import ArrowRightIcon from '../../bpk-component-icon/lg/arrow-right';
@@ -17,9 +17,9 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React, { Component } from 'react';
20
+ import { Component } from 'react';
21
21
 
22
- import { cssModules, deprecated } from '../../bpk-react-utils';
22
+ import { cssModules } from '../../bpk-react-utils';
23
23
 
24
24
  import {
25
25
  isSameDay,
@@ -379,10 +379,6 @@ Week.propTypes = {
379
379
  isKeyboardFocusable: PropTypes.bool.isRequired,
380
380
  month: PropTypes.instanceOf(Date).isRequired,
381
381
  weekStartsOn: PropTypes.number.isRequired,
382
- daysOfWeek: deprecated(
383
- CustomPropTypes.DaysOfWeek,
384
- 'daysOfWeek property in Week is now deprecated as no longer part of the calendar, so is no longer required',
385
- ),
386
382
  focusedDate: PropTypes.instanceOf(Date),
387
383
  maxDate: PropTypes.instanceOf(Date),
388
384
  minDate: PropTypes.instanceOf(Date),
@@ -390,33 +386,18 @@ Week.propTypes = {
390
386
  onDateClick: PropTypes.func,
391
387
  onDateKeyDown: PropTypes.func,
392
388
  selectionConfiguration: CustomPropTypes.SelectionConfiguration,
393
- selectedDate: deprecated(
394
- PropTypes.instanceOf(Date),
395
- 'Use selectionConfiguration to set selectedDate',
396
- ),
397
- selectionEnd: PropTypes.instanceOf(Date),
398
- selectionStart: PropTypes.instanceOf(Date),
399
- // eslint-disable-next-line react/require-default-props
400
- showWeekendSeparator: deprecated(
401
- PropTypes.bool,
402
- 'The showWeekendSeparator prop in Week is now deprecated as no longer part of the calendar, so is no longer required',
403
- ),
404
389
  ignoreOutsideDate: PropTypes.bool,
405
390
  dateProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types
406
391
  };
407
392
 
408
393
  Week.defaultProps = {
409
394
  cellClassName: null,
410
- daysOfWeek: null,
411
395
  focusedDate: null,
412
396
  maxDate: null,
413
397
  minDate: null,
414
398
  onDateClick: null,
415
399
  onDateKeyDown: null,
416
400
  selectionConfiguration: { type: CALENDAR_SELECTION_TYPE.single, date: null },
417
- selectedDate: null,
418
- selectionEnd: null,
419
- selectionStart: null,
420
401
  ignoreOutsideDate: false,
421
402
  dateProps: null,
422
403
  };
@@ -17,9 +17,8 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import React from 'react';
21
20
 
22
- import { cssModules, deprecated } from '../../bpk-react-utils';
21
+ import { cssModules } from '../../bpk-react-utils';
23
22
 
24
23
  import CustomPropTypes, { CALENDAR_SELECTION_TYPE } from './custom-proptypes';
25
24
  import STYLES from './BpkCalendar.module.scss';
@@ -160,15 +159,6 @@ const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
160
159
  onDateKeyDown: PropTypes.func,
161
160
  preventKeyboardFocus: PropTypes.bool,
162
161
  selectionConfiguration: CustomPropTypes.SelectionConfiguration,
163
- selectedDate: deprecated(
164
- PropTypes.instanceOf(Date),
165
- 'Use selectionConfiguration to set selectedDate',
166
- ),
167
- // eslint-disable-next-line react/require-default-props
168
- showWeekendSeparator: deprecated(
169
- PropTypes.bool,
170
- 'The showWeekendSeparator prop in composeCalendar is now deprecated as no longer part of the calendar, so is no longer required',
171
- ),
172
162
  gridClassName: PropTypes.string,
173
163
  weekDayKey: PropTypes.string,
174
164
  /* eslint-disable react/forbid-prop-types */
@@ -197,7 +187,6 @@ const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
197
187
  type: CALENDAR_SELECTION_TYPE.single,
198
188
  date: null,
199
189
  },
200
- selectedDate: null,
201
190
  gridClassName: null,
202
191
  weekDayKey: 'nameAbbr',
203
192
  navProps: null,
@@ -11,7 +11,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
11
11
  ### BpkCard
12
12
 
13
13
  ```js
14
- import React from 'react';
15
14
  import BpkCard from '@skyscanner/backpack-web/bpk-component-card';
16
15
 
17
16
  export default () => (
@@ -26,7 +25,6 @@ export default () => (
26
25
  ### BpkDividedCard
27
26
 
28
27
  ```js
29
- import React from 'react';
30
28
  import { BpkDividedCard, ORIENTATION } from '@skyscanner/backpack-web/bpk-component-card';
31
29
 
32
30
  export default () => (
@@ -19,7 +19,7 @@
19
19
  /* @flow strict */
20
20
 
21
21
  import PropTypes from 'prop-types';
22
- import React, { type Node } from 'react';
22
+ import type { Node } from 'react';
23
23
 
24
24
  import { cssModules } from '../../bpk-react-utils';
25
25
 
@@ -18,7 +18,6 @@
18
18
  /* @flow strict */
19
19
 
20
20
  import PropTypes from 'prop-types';
21
- import React from 'react';
22
21
 
23
22
  import { cssModules } from '../../bpk-react-utils';
24
23
 
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React from 'react';
13
12
  import BpkCheckbox from '@skyscanner/backpack-web/bpk-component-checkbox';
14
13
 
15
14
  export default () => (
@@ -19,7 +19,7 @@
19
19
  /* @flow strict */
20
20
 
21
21
  import PropTypes from 'prop-types';
22
- import React, { type Node } from 'react';
22
+ import type { Node } from 'react';
23
23
 
24
24
  import { cssModules } from '../../bpk-react-utils';
25
25
 
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React from 'react';
13
12
  import BpkSelectableChip, { BpkDismissibleChip, BpkDropdownChip, CHIP_TYPES } from '@skyscanner/backpack-web/bpk-component-chip';
14
13
  import BeachIconSm from '@skyscanner/backpack-web/bpk-component-icon/sm/beach';
15
14
 
@@ -24,8 +24,6 @@ been hard coded to have disabled={false}, selected and a trailing
24
24
  accessory view of a close icon.
25
25
  */
26
26
 
27
- import React from 'react';
28
-
29
27
  import { cssModules } from '../../bpk-react-utils';
30
28
  import CloseCircleIconSm from '../../bpk-component-icon/sm/close-circle';
31
29
 
@@ -23,8 +23,6 @@ The dropdown chip component is just a selectable chip component
23
23
  with a trailing accessory view of a chevron down icon.
24
24
  */
25
25
 
26
- import React from 'react';
27
-
28
26
  import ChevronDownIconSm from '../../bpk-component-icon/sm/chevron-down';
29
27
 
30
28
  import BpkSelectableChip from './BpkSelectableChip';
@@ -19,7 +19,7 @@
19
19
  /* @flow strict */
20
20
 
21
21
  import PropTypes from 'prop-types';
22
- import React, { type Node } from 'react';
22
+ import type { Node } from 'react';
23
23
 
24
24
  import { cssModules } from '../../bpk-react-utils';
25
25
  import BpkText, { TEXT_STYLES } from '../../bpk-component-text';
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React from 'react';
13
12
  import BpkCloseButton from '@skyscanner/backpack-web/bpk-component-close-button';
14
13
 
15
14
  export default () => (
@@ -19,7 +19,7 @@
19
19
  /* @flow strict */
20
20
 
21
21
  import PropTypes from 'prop-types';
22
- import React, { type StatelessFunctionalComponent } from 'react';
22
+ import type { StatelessFunctionalComponent } from 'react';
23
23
 
24
24
  import CloseIcon from '../../bpk-component-icon/sm/close';
25
25
  import { cssModules } from '../../bpk-react-utils';
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React from 'react';
13
12
  import { BpkCode, BpkCodeBlock } from '@skyscanner/backpack-web/bpk-component-code';
14
13
  import BpkText from '@skyscanner/backpack-web/bpk-component-text';
15
14
 
@@ -18,7 +18,7 @@
18
18
  /* @flow strict */
19
19
 
20
20
  import PropTypes from 'prop-types';
21
- import React, { type Node } from 'react';
21
+ import type { Node } from 'react';
22
22
 
23
23
  import { cssModules } from '../../bpk-react-utils';
24
24
 
@@ -17,7 +17,7 @@
17
17
  */
18
18
  /* @flow strict */
19
19
 
20
- import React, { type Node } from 'react';
20
+ import type { Node } from 'react';
21
21
  import PropTypes from 'prop-types';
22
22
 
23
23
  import { cssModules } from '../../bpk-react-utils';
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```tsx
12
- import React from 'react';
13
12
  import BpkContentCards from '@skyscanner/backpack-web/bpk-component-content-cards';
14
13
 
15
14
  <BpkContentCards
@@ -16,8 +16,6 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import React from 'react';
20
-
21
19
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
20
  import BpkText from '../../bpk-component-text';
23
21
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
@@ -17,8 +17,6 @@
17
17
  */
18
18
  /* eslint react/no-array-index-key: 0 */
19
19
 
20
- import React from 'react';
21
-
22
20
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
23
21
  import BpkText from '../../bpk-component-text';
24
22
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React from 'react';
13
12
  import { BpkDataTable, BpkDataTableColumn } from '@skyscanner/backpack-web/bpk-component-datatable';
14
13
 
15
14
  const rows = [
@@ -39,7 +38,7 @@ export default () => (
39
38
  By default `BpkDataTable` sorts the column using the value of `dataKey`. For use cases where the data might more complex and requires custom sorting you can pass a `sort` function along with `sortBy` and `sortDirection`.
40
39
 
41
40
  ```js
42
- import React from 'react';
41
+ import { Fragment } from 'react';
43
42
  import { BpkDataTable, BpkDataTableColumn } from '@skyscanner/backpack-web/bpk-component-datatable';
44
43
 
45
44
  const complexRows = [
@@ -97,9 +96,9 @@ export default () => (
97
96
  width={100}
98
97
  flexGrow={1}
99
98
  cellRenderer={({ cellData }) => (
100
- <React.Fragment>
99
+ <Fragment>
101
100
  {cellData.office} - {cellData.desk}
102
- </React.Fragment>
101
+ </Fragment>
103
102
  )}
104
103
  />
105
104
  </BpkDataTable>
@@ -18,7 +18,8 @@
18
18
  /* @flow strict */
19
19
 
20
20
  import PropTypes from 'prop-types';
21
- import React, { useMemo, useState } from 'react';
21
+ import type { KeyboardEvent } from 'react';
22
+ import { useMemo, useState } from 'react';
22
23
  import { useTable, useSortBy } from 'react-table';
23
24
 
24
25
  import { cssModules } from '../../bpk-react-utils';
@@ -123,7 +124,7 @@ const BpkDataTable = (props: Props) => {
123
124
  };
124
125
 
125
126
  const handleKeyboardEvent = (
126
- event: React.KeyboardEvent<HTMLElement>,
127
+ event: KeyboardEvent<HTMLElement>,
127
128
  i: number,
128
129
  ) => {
129
130
  if (
@@ -17,7 +17,6 @@
17
17
  */
18
18
  /* @flow strict */
19
19
 
20
- import React from 'react';
21
20
  import PropTypes from 'prop-types';
22
21
 
23
22
  import { SORT_DIRECTION_TYPES } from './sort-types';
@@ -17,7 +17,7 @@
17
17
  */
18
18
  /* @flow strict */
19
19
 
20
- import React from 'react';
20
+ import type { KeyboardEvent } from 'react';
21
21
 
22
22
  import { cssModules } from '../../bpk-react-utils';
23
23
  import BpkSmallArrowDownIcon from '../../bpk-component-icon/sm/arrow-down';
@@ -72,7 +72,7 @@ const BpkDataTableHeader = ({ column }: { column: ColumnType }) => {
72
72
  column.toggleSortBy(isDescending);
73
73
  };
74
74
 
75
- const handleKeyboardEvent = (event: React.KeyboardEvent<HTMLElement>) => {
75
+ const handleKeyboardEvent = (event: KeyboardEvent<HTMLElement>) => {
76
76
  if (
77
77
  event.keyCode === KEYCODES.ENTER ||
78
78
  event.keyCode === KEYCODES.SPACEBAR
@@ -9,7 +9,7 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
9
9
  ## Usage
10
10
 
11
11
  ```js
12
- import React, { Component } from 'react';
12
+ import { Component } from 'react';
13
13
  import BpkDatepicker, { CALENDAR_SELECTION_TYPE } from '@skyscanner/backpack-web/bpk-component-datepicker';
14
14
  import format from 'date-fns/format';
15
15
 
@@ -71,7 +71,7 @@ export default class App extends Component {
71
71
  By default `BpkCalendar` is used but the calendar component is fully configurable through the `calendarComponent` prop.
72
72
 
73
73
  ```js
74
- import React, { Component } from 'react';
74
+ import { Component } from 'react';
75
75
  import BpkDatepicker from '@skyscanner/backpack-web/bpk-component-datepicker';
76
76
  import {
77
77
  BpkCalendarNav,