@skyscanner/backpack-web 33.3.1 → 34.0.0-premajor

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 (263) hide show
  1. package/bpk-component-accordion/index.js +1 -1
  2. package/bpk-component-accordion/src/BpkAccordionItem.js +12 -13
  3. package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
  4. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +5 -3
  5. package/bpk-component-banner-alert/index.js +1 -1
  6. package/bpk-component-banner-alert/src/AnimateAndFade.js +37 -35
  7. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +12 -6
  8. package/bpk-component-barchart/src/BpkBarchart.js +9 -10
  9. package/bpk-component-barchart/src/BpkBarchartBar.js +1 -2
  10. package/bpk-component-barchart/src/BpkBarchartBars.js +2 -2
  11. package/bpk-component-barchart/src/BpkBarchartDefs.js +1 -2
  12. package/bpk-component-barchart/src/BpkChartAxis.js +1 -2
  13. package/bpk-component-barchart/src/BpkChartDataTable.js +1 -2
  14. package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +4 -6
  15. package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +1 -2
  16. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +18 -14
  17. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
  18. package/bpk-component-breakpoint/index.d.ts +2 -1
  19. package/bpk-component-breakpoint/src/BpkBreakpoint.js +5 -19
  20. package/bpk-component-breakpoint/src/useMediaQuery.js +10 -12
  21. package/bpk-component-button/index.js +5 -5
  22. package/bpk-component-button/src/BpkButtonDestructive.js +10 -9
  23. package/bpk-component-button/src/BpkButtonFeatured.js +10 -9
  24. package/bpk-component-button/src/BpkButtonLink.js +11 -10
  25. package/bpk-component-button/src/BpkButtonLinkOnDark.js +11 -10
  26. package/bpk-component-button/src/BpkButtonPrimary.js +2 -2
  27. package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +10 -9
  28. package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +10 -9
  29. package/bpk-component-button/src/BpkButtonSecondary.js +10 -10
  30. package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +10 -9
  31. package/bpk-component-calendar/index.js +1 -1
  32. package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -3
  33. package/bpk-component-calendar/src/BpkCalendarGrid.js +3 -2
  34. package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
  35. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +4 -1
  36. package/bpk-component-calendar/src/BpkCalendarGridTransition.js +6 -4
  37. package/bpk-component-calendar/src/BpkCalendarNav.js +10 -5
  38. package/bpk-component-calendar/src/Week.js +6 -3
  39. package/bpk-component-calendar/src/composeCalendar.js +9 -4
  40. package/bpk-component-calendar/src/date-utils.js +14 -14
  41. package/bpk-component-card/src/BpkCardWrapper.js +1 -2
  42. package/bpk-component-card/src/BpkDividedCard.js +19 -15
  43. package/bpk-component-card-button/src/BpkSaveButton.js +14 -6
  44. package/bpk-component-checkbox/src/BpkCheckbox.js +1 -2
  45. package/bpk-component-chip/index.d.ts +3 -5
  46. package/bpk-component-chip/index.js +3 -2
  47. package/bpk-component-chip/src/BpkDismissibleChip.js +7 -2
  48. package/bpk-component-chip/src/BpkIconChip.d.ts +25 -0
  49. package/bpk-component-chip/src/BpkIconChip.js +31 -0
  50. package/bpk-component-chip/src/BpkSelectableChip.d.ts +0 -2
  51. package/bpk-component-chip/src/BpkSelectableChip.js +5 -6
  52. package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
  53. package/bpk-component-chip/src/commonTypes.d.ts +1 -1
  54. package/bpk-component-chip/src/commonTypes.js +1 -24
  55. package/bpk-component-close-button/src/BpkCloseButton.js +3 -2
  56. package/bpk-component-close-button/src/BpkCloseButton.module.css +1 -1
  57. package/bpk-component-content-cards/src/BpkContentCard.js +9 -4
  58. package/bpk-component-content-cards/src/BpkContentCards.js +2 -7
  59. package/bpk-component-content-cards/src/BpkContentCards.module.css +1 -1
  60. package/bpk-component-datatable/src/BpkDataTable.js +4 -4
  61. package/bpk-component-datatable/src/BpkDataTableHeader.js +14 -11
  62. package/bpk-component-datatable/src/BpkDataTableHeader.module.css +1 -1
  63. package/bpk-component-datepicker/src/BpkDatepicker.js +3 -5
  64. package/bpk-component-description-list/index.js +1 -1
  65. package/bpk-component-description-list/src/ComponentFactory.js +10 -5
  66. package/bpk-component-dialog/src/BpkDialog.js +7 -6
  67. package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
  68. package/bpk-component-dialog/src/BpkDialogInner.js +7 -5
  69. package/bpk-component-drawer/src/BpkDrawer.js +1 -4
  70. package/bpk-component-drawer/src/BpkDrawerContent.js +8 -7
  71. package/bpk-component-fieldset/src/BpkFieldset.js +10 -9
  72. package/bpk-component-flare/index.js +2 -2
  73. package/bpk-component-flare/src/BpkContentBubble.js +5 -3
  74. package/bpk-component-flare/src/BpkFlareBar.js +15 -7
  75. package/bpk-component-flare/src/__generated__/corner-radius.d.ts +6 -0
  76. package/bpk-component-flare/src/__generated__/pointer.d.ts +6 -0
  77. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +10 -4
  78. package/bpk-component-form-validation/src/BpkFormValidation.js +6 -6
  79. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +10 -14
  80. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +1 -1
  81. package/bpk-component-grid-toggle/src/BpkGridToggle.js +8 -6
  82. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +16 -14
  83. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +1 -1
  84. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -2
  85. package/bpk-component-icon/index.js +1 -1
  86. package/bpk-component-icon/lg/aircraft.js +1 -2
  87. package/bpk-component-icon/lg/beach.js +1 -2
  88. package/bpk-component-icon/lg/call-back.js +1 -2
  89. package/bpk-component-icon/lg/camper-van.js +1 -2
  90. package/bpk-component-icon/lg/car-wash.js +1 -2
  91. package/bpk-component-icon/lg/cars.js +1 -2
  92. package/bpk-component-icon/lg/clean.js +1 -2
  93. package/bpk-component-icon/lg/cloakroom.js +1 -2
  94. package/bpk-component-icon/lg/content--copy.js +1 -2
  95. package/bpk-component-icon/lg/data.js +1 -2
  96. package/bpk-component-icon/lg/depart.js +1 -2
  97. package/bpk-component-icon/lg/download.js +1 -2
  98. package/bpk-component-icon/lg/education.js +1 -2
  99. package/bpk-component-icon/lg/explore.js +1 -2
  100. package/bpk-component-icon/lg/fast-track.js +1 -2
  101. package/bpk-component-icon/lg/fast-train.js +1 -2
  102. package/bpk-component-icon/lg/flight-landing.js +1 -2
  103. package/bpk-component-icon/lg/flight-takeoff.js +1 -2
  104. package/bpk-component-icon/lg/flight.js +1 -2
  105. package/bpk-component-icon/lg/legroom--extra.js +1 -2
  106. package/bpk-component-icon/lg/legroom--normal.js +1 -2
  107. package/bpk-component-icon/lg/legroom--reduced.js +1 -2
  108. package/bpk-component-icon/lg/logout.js +1 -2
  109. package/bpk-component-icon/lg/lounge.js +1 -2
  110. package/bpk-component-icon/lg/mail.js +1 -2
  111. package/bpk-component-icon/lg/mileage.js +1 -2
  112. package/bpk-component-icon/lg/new-window.js +1 -2
  113. package/bpk-component-icon/lg/plane-seat.js +1 -2
  114. package/bpk-component-icon/lg/return.js +1 -2
  115. package/bpk-component-icon/lg/scales.js +1 -2
  116. package/bpk-component-icon/lg/share--ios.js +1 -2
  117. package/bpk-component-icon/lg/social-distancing.js +1 -2
  118. package/bpk-component-icon/lg/speaker.js +1 -2
  119. package/bpk-component-icon/lg/taxi.js +1 -2
  120. package/bpk-component-icon/lg/unmute.js +1 -2
  121. package/bpk-component-icon/lg/wallet.js +1 -2
  122. package/bpk-component-icon/lg/weather--cloudy.js +1 -2
  123. package/bpk-component-icon/lg/weather--partly-cloudy.js +1 -2
  124. package/bpk-component-icon/lg/weather--rain.js +1 -2
  125. package/bpk-component-icon/lg/weather--thunderstorm.js +1 -2
  126. package/bpk-component-icon/lg/window--reduce.js +1 -2
  127. package/bpk-component-icon/lg/world--emea.js +1 -2
  128. package/bpk-component-icon/sm/aircraft.js +1 -2
  129. package/bpk-component-icon/sm/beach.js +1 -2
  130. package/bpk-component-icon/sm/bus.js +1 -2
  131. package/bpk-component-icon/sm/call-back.js +1 -2
  132. package/bpk-component-icon/sm/camper-van.js +1 -2
  133. package/bpk-component-icon/sm/car-wash.js +1 -2
  134. package/bpk-component-icon/sm/cars.js +1 -2
  135. package/bpk-component-icon/sm/chauffeur.js +1 -2
  136. package/bpk-component-icon/sm/clean.js +1 -2
  137. package/bpk-component-icon/sm/content--copy.js +1 -2
  138. package/bpk-component-icon/sm/data.js +1 -2
  139. package/bpk-component-icon/sm/depart.js +1 -2
  140. package/bpk-component-icon/sm/direct.js +1 -2
  141. package/bpk-component-icon/sm/download.js +1 -2
  142. package/bpk-component-icon/sm/education.js +1 -2
  143. package/bpk-component-icon/sm/explore.js +1 -2
  144. package/bpk-component-icon/sm/fast-track.js +1 -2
  145. package/bpk-component-icon/sm/fast-train.js +1 -2
  146. package/bpk-component-icon/sm/flight-landing.js +1 -2
  147. package/bpk-component-icon/sm/flight-takeoff.js +1 -2
  148. package/bpk-component-icon/sm/flight.js +1 -2
  149. package/bpk-component-icon/sm/hotels--jacuzzi.js +1 -2
  150. package/bpk-component-icon/sm/infant.js +1 -2
  151. package/bpk-component-icon/sm/legroom--extra.js +1 -2
  152. package/bpk-component-icon/sm/legroom--normal.js +1 -2
  153. package/bpk-component-icon/sm/legroom--reduced.js +1 -2
  154. package/bpk-component-icon/sm/logout.js +1 -2
  155. package/bpk-component-icon/sm/mail.js +1 -2
  156. package/bpk-component-icon/sm/mileage.js +1 -2
  157. package/bpk-component-icon/sm/new-window.js +1 -2
  158. package/bpk-component-icon/sm/onsen.js +1 -2
  159. package/bpk-component-icon/sm/plane-seat.js +1 -2
  160. package/bpk-component-icon/sm/return.js +1 -2
  161. package/bpk-component-icon/sm/share--ios.js +1 -2
  162. package/bpk-component-icon/sm/social-distancing.js +1 -2
  163. package/bpk-component-icon/sm/taxi.js +1 -2
  164. package/bpk-component-icon/sm/unmute.js +1 -2
  165. package/bpk-component-icon/sm/weather--cloudy.js +1 -2
  166. package/bpk-component-icon/sm/weather--rain.js +1 -2
  167. package/bpk-component-icon/sm/weather--thunderstorm.js +1 -2
  168. package/bpk-component-icon/sm/weather--wind.js +1 -2
  169. package/bpk-component-icon/sm/window--reduce.js +1 -2
  170. package/bpk-component-icon/src/classNameModifierHOCFactory.js +3 -0
  171. package/bpk-component-icon/src/withDescription.js +1 -2
  172. package/bpk-component-icon/src/withRtlSupport.js +1 -1
  173. package/bpk-component-image/index.js +2 -2
  174. package/bpk-component-image/src/BpkBackgroundImage.js +4 -3
  175. package/bpk-component-image/src/BpkImage.js +6 -4
  176. package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +4 -5
  177. package/bpk-component-info-banner/src/AnimateAndFade.js +37 -35
  178. package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
  179. package/bpk-component-info-banner/src/BpkInfoBannerInner.js +17 -14
  180. package/bpk-component-input/index.js +1 -1
  181. package/bpk-component-input/src/BpkClearButton.js +3 -1
  182. package/bpk-component-input/src/BpkInput.js +6 -4
  183. package/bpk-component-input/src/withOpenEvents.js +4 -1
  184. package/bpk-component-label/src/BpkLabel.js +1 -2
  185. package/bpk-component-link/index.js +2 -2
  186. package/bpk-component-list/src/BpkList.js +4 -1
  187. package/bpk-component-loading-button/src/BpkLoadingButton.js +7 -5
  188. package/bpk-component-map/index.js +4 -4
  189. package/bpk-component-map/src/BpkIconMarker.js +2 -3
  190. package/bpk-component-map/src/BpkMap.js +2 -2
  191. package/bpk-component-map/src/BpkPriceMarker.js +8 -7
  192. package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.js +2 -3
  193. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +5 -2
  194. package/bpk-component-modal/index.js +4 -3
  195. package/bpk-component-modal/src/BpkModal.d.ts +2 -1
  196. package/bpk-component-modal/src/BpkModal.js +8 -3
  197. package/bpk-component-modal/src/BpkModalInner.d.ts +2 -0
  198. package/bpk-component-modal/src/BpkModalInner.js +25 -10
  199. package/bpk-component-modal/src/BpkModalInner.module.css +1 -1
  200. package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +1 -1
  201. package/bpk-component-modal/src/BpkModalV2/BpkModal.d.ts +2 -0
  202. package/bpk-component-modal/src/BpkModalV2/BpkModal.js +20 -10
  203. package/bpk-component-navigation-bar/index.js +1 -1
  204. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +8 -7
  205. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +5 -2
  206. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +5 -2
  207. package/bpk-component-nudger/index.js +1 -1
  208. package/bpk-component-nudger/src/BpkConfigurableNudger.js +17 -6
  209. package/bpk-component-nudger/src/BpkNudger.js +17 -7
  210. package/bpk-component-overlay/src/BpkOverlay.js +1 -2
  211. package/bpk-component-page-indicator/src/BpkPageIndicator.js +1 -2
  212. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +1 -1
  213. package/bpk-component-page-indicator/src/NavButton.js +1 -1
  214. package/bpk-component-pagination/src/BpkPagination.js +1 -2
  215. package/bpk-component-pagination/src/BpkPaginationList.js +1 -1
  216. package/bpk-component-pagination/src/BpkPaginationNudger.js +14 -6
  217. package/bpk-component-pagination/src/BpkPaginationPage.js +4 -1
  218. package/bpk-component-phone-input/src/BpkPhoneInput.js +16 -6
  219. package/bpk-component-popover/src/BpkPopover.js +106 -63
  220. package/bpk-component-popover/src/BpkPopoverPortal.js +123 -119
  221. package/bpk-component-popover/src/keyboardFocusScope.js +1 -1
  222. package/bpk-component-price/src/BpkPrice.js +19 -8
  223. package/bpk-component-progress/src/BpkProgress.js +1 -2
  224. package/bpk-component-radio/src/BpkRadio.js +1 -2
  225. package/bpk-component-rating/src/BpkRating.js +19 -8
  226. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +4 -1
  227. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +7 -5
  228. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +7 -4
  229. package/bpk-component-section-header/src/BpkSectionHeader.js +10 -5
  230. package/bpk-component-section-list/index.js +1 -1
  231. package/bpk-component-section-list/src/BpkSectionListItem.js +11 -6
  232. package/bpk-component-section-list/src/BpkSectionListSection.js +2 -3
  233. package/bpk-component-select/src/BpkSelect.js +1 -2
  234. package/bpk-component-slider/src/BpkSlider.js +6 -2
  235. package/bpk-component-spinner/index.js +3 -3
  236. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +9 -7
  237. package/bpk-component-spinner/src/BpkLargeSpinner.js +9 -7
  238. package/bpk-component-spinner/src/BpkSpinner.js +9 -7
  239. package/bpk-component-split-input/src/BpkInputField.js +2 -2
  240. package/bpk-component-split-input/src/BpkSplitInput.js +3 -3
  241. package/bpk-component-star-rating/index.js +4 -4
  242. package/bpk-component-star-rating/src/BpkInteractiveStar.js +6 -2
  243. package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
  244. package/bpk-component-star-rating/src/BpkStar.js +22 -15
  245. package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
  246. package/bpk-component-switch/src/BpkSwitch.js +1 -2
  247. package/bpk-component-table/index.js +2 -2
  248. package/bpk-component-text/src/BpkText.js +10 -5
  249. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +6 -4
  250. package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
  251. package/bpk-component-tooltip/src/BpkTooltip.js +2 -3
  252. package/bpk-component-tooltip/src/BpkTooltipPortal.js +7 -6
  253. package/bpk-mixins/_chips.scss +9 -0
  254. package/bpk-react-utils/index.js +3 -3
  255. package/bpk-react-utils/src/BpkDialogWrapper/BpkDialogWrapper.js +2 -2
  256. package/bpk-react-utils/src/Portal.js +1 -0
  257. package/bpk-react-utils/src/withDefaultProps.js +4 -1
  258. package/bpk-scrim-utils/src/withScrim.js +3 -3
  259. package/bpk-scrim-utils/src/withScrimmedPortal.js +1 -1
  260. package/bpk-theming/src/BpkThemeProvider.js +1 -1
  261. package/package.json +5 -3
  262. package/unstable__bpk-mixins/_chips.scss +9 -0
  263. package/bpk-component-button/src/commonButtonTests.js +0 -133
@@ -18,22 +18,22 @@
18
18
 
19
19
  import { Component } from 'react';
20
20
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
21
- import { durationSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
22
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
23
21
  import { TransitionGroup, CSSTransition } from 'react-transition-group';
24
- import { cssModules } from "../../bpk-react-utils";
22
+
23
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
+ import { durationSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
25
+
25
26
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
26
27
  import BpkAnimateHeight from "../../bpk-animate-height";
28
+ import { cssModules } from "../../bpk-react-utils";
27
29
  import STYLES from "./BpkAnimateAndFade.module.css";
28
- import { jsx as _jsx } from "react/jsx-runtime";
29
- import { jsxs as _jsxs } from "react/jsx-runtime";
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
31
  const getClassName = cssModules(STYLES);
31
32
  const ANIMATION_DURATION = parseInt(durationSm, 10);
32
33
  class AnimateAndFade extends Component {
33
34
  static defaultProps = {
34
35
  animateOnEnter: false,
35
- animateOnLeave: false,
36
- className: null
36
+ animateOnLeave: false
37
37
  };
38
38
  constructor(props) {
39
39
  super(props);
@@ -110,37 +110,39 @@ class AnimateAndFade extends Component {
110
110
  // While the expanding animation takes place, we render the child element
111
111
  // close to invisible. If we don't do this, the animate-height container
112
112
  // will take on height 0, and will never expand to allow the children to fade in
113
- return this.state.inDom ? /*#__PURE__*/_jsxs(BpkAnimateHeight, {
113
+ return this.state.inDom ? /*#__PURE__*/_jsx("div", {
114
114
  className: className,
115
- onAnimationComplete: this.onAnimateHeightComplete,
116
- duration: ANIMATION_DURATION,
117
- height: this.state.isExpanded ? 'auto' : 0,
118
- children: [showPlaceholder && /*#__PURE__*/_jsx("div", {
119
- style: {
120
- opacity: 0.35
121
- },
122
- children: children
123
- }), /*#__PURE__*/_jsx(TransitionGroup, {
124
- exit: animateOnLeave,
125
- enter: animateOnEnter,
126
- appear: animateOnEnter,
127
- onTransitionEnd: this.onFadeComplete,
128
- children: this.state.visible && /*#__PURE__*/_jsx(CSSTransition, {
129
- classNames: {
130
- exit: getClassName('bpk-animate-and-fade--leave'),
131
- exitActive: getClassName('bpk-animate-and-fade--leave-active'),
132
- enter: getClassName('bpk-animate-and-fade--enter'),
133
- enterActive: getClassName('bpk-animate-and-fade--enter-active'),
134
- appear: getClassName('bpk-animate-and-fade--appear'),
135
- appearActive: getClassName('bpk-animate-and-fade--appear-active')
136
- },
137
- timeout: {
138
- enter: ANIMATION_DURATION * 2,
139
- exit: ANIMATION_DURATION * 2
115
+ children: /*#__PURE__*/_jsxs(BpkAnimateHeight, {
116
+ onAnimationComplete: this.onAnimateHeightComplete,
117
+ duration: ANIMATION_DURATION,
118
+ height: this.state.isExpanded ? 'auto' : 0,
119
+ children: [showPlaceholder && /*#__PURE__*/_jsx("div", {
120
+ style: {
121
+ opacity: 0.35
140
122
  },
141
123
  children: children
142
- })
143
- })]
124
+ }), /*#__PURE__*/_jsx(TransitionGroup, {
125
+ exit: animateOnLeave,
126
+ enter: animateOnEnter,
127
+ appear: animateOnEnter,
128
+ onTransitionEnd: this.onFadeComplete,
129
+ children: this.state.visible && /*#__PURE__*/_jsx(CSSTransition, {
130
+ classNames: {
131
+ exit: getClassName('bpk-animate-and-fade--leave'),
132
+ exitActive: getClassName('bpk-animate-and-fade--leave-active'),
133
+ enter: getClassName('bpk-animate-and-fade--enter'),
134
+ enterActive: getClassName('bpk-animate-and-fade--enter-active'),
135
+ appear: getClassName('bpk-animate-and-fade--appear'),
136
+ appearActive: getClassName('bpk-animate-and-fade--appear-active')
137
+ },
138
+ timeout: {
139
+ enter: ANIMATION_DURATION * 2,
140
+ exit: ANIMATION_DURATION * 2
141
+ },
142
+ children: children
143
+ })
144
+ })]
145
+ })
144
146
  }) : null;
145
147
  }
146
148
  }
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- .bpk-info-banner{padding:.5rem 1rem;overflow:hidden;border-radius:.5rem;margin:0;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner--style-default{background-color:#eff3f8}.bpk-info-banner--style-onContrast{background-color:#fff}.bpk-info-banner__header{display:flex;flex-direction:row;align-items:flex-start}.bpk-info-banner__header--expandable{cursor:pointer}.bpk-info-banner__icon,.bpk-info-banner__toggle{padding:.125rem 0}.bpk-info-banner__message{padding:.25rem .5rem;flex-grow:1}.bpk-info-banner__success-icon{fill:#0c838a}.bpk-info-banner__warning-icon{fill:#f55d42}.bpk-info-banner__error-icon{fill:#e70866}.bpk-info-banner__info-icon{fill:#626971}.bpk-info-banner__toggle-button{padding:0;border:0;background-color:rgba(0,0,0,0);cursor:pointer;appearance:none}.bpk-info-banner__expand-icon{fill:#626971}.bpk-info-banner__expand-icon--flipped{transform:scaleY(-1)}.bpk-info-banner__children-container{color:#161616;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner__children-container--with-action{padding:.25rem 0 .25rem}.bpk-info-banner__children-container--no-action{padding:.25rem 0 .5rem}.bpk-info-banner__expandable-action{padding-bottom:.25rem}
18
+ .bpk-info-banner{padding:.5rem 1rem;overflow:hidden;border-radius:.5rem;margin:0;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner--style-default{background-color:#eff3f8}.bpk-info-banner--style-onContrast{background-color:#fff}.bpk-info-banner__header{display:flex;flex-direction:row;align-items:flex-start}.bpk-info-banner__header--expandable{cursor:pointer}.bpk-info-banner__icon,.bpk-info-banner__toggle{padding:.125rem 0}.bpk-info-banner__message{padding:.25rem .5rem;flex-grow:1}.bpk-info-banner__success-icon{fill:#0c838a}.bpk-info-banner__warning-icon{fill:#f55d42}.bpk-info-banner__error-icon{fill:#e70866}.bpk-info-banner__info-icon{fill:#626971}.bpk-info-banner__toggle-button{padding:0;border:0;background-color:rgba(0,0,0,0);cursor:pointer;appearance:none}.bpk-info-banner__expand-icon{fill:#626971}.bpk-info-banner__children-container{color:#161616;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-info-banner__children-container--with-action{padding:.25rem 0 .25rem}.bpk-info-banner__children-container--no-action{padding:.25rem 0 .5rem}
@@ -22,27 +22,30 @@
22
22
 
23
23
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
24
  import { durationSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
25
- import { withButtonAlignment } from "../../bpk-component-icon";
26
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
27
- import BpkLink from "../../bpk-component-link";
25
+
28
26
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
29
27
  import BpkAnimateHeight from "../../bpk-animate-height";
30
28
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
31
29
  import BpkCloseButton from "../../bpk-component-close-button";
32
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
33
- import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
30
+ import { withButtonAlignment } from "../../bpk-component-icon";
34
31
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
35
32
  import ChevronDownIcon from "../../bpk-component-icon/sm/chevron-down";
36
33
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
34
+ import ChevronUpIcon from "../../bpk-component-icon/sm/chevron-up";
35
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
37
36
  import InfoCircleIcon from "../../bpk-component-icon/sm/information-circle";
37
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
38
+ import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
39
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
40
+ import BpkLink from "../../bpk-component-link";
38
41
  import { cssModules } from "../../bpk-react-utils";
39
42
  import AnimateAndFade from "./AnimateAndFade";
40
43
  import { ALERT_TYPES, STYLE_TYPES } from "./common-types";
41
44
  import STYLES from "./BpkInfoBanner.module.css";
42
- import { jsx as _jsx } from "react/jsx-runtime";
43
- import { jsxs as _jsxs } from "react/jsx-runtime";
45
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
44
46
  const getClassName = cssModules(STYLES);
45
47
  const ExpandIcon = withButtonAlignment(ChevronDownIcon);
48
+ const CollapseIcon = withButtonAlignment(ChevronUpIcon);
46
49
  export const CONFIGURATION = {
47
50
  NONE: 'none',
48
51
  DISMISSABLE: 'dismissable',
@@ -64,20 +67,22 @@ const getIconForType = (type, CustomIcon) => {
64
67
  };
65
68
  const Icon = CustomIcon || componentMap[type];
66
69
  const AlignedIcon = withButtonAlignment(Icon);
67
- return /*#__PURE__*/_jsx(AlignedIcon, {
68
- className: className
70
+ return /*#__PURE__*/_jsx("div", {
71
+ className: className,
72
+ children: /*#__PURE__*/_jsx(AlignedIcon, {})
69
73
  });
70
74
  };
71
75
  const ToggleButton = props => {
72
- const classNames = getClassName('bpk-info-banner__expand-icon', props.expanded && 'bpk-info-banner__expand-icon--flipped');
76
+ const classNames = getClassName('bpk-info-banner__expand-icon');
73
77
  return /*#__PURE__*/_jsx("button", {
74
78
  type: "button",
75
79
  className: getClassName('bpk-info-banner__toggle-button'),
76
80
  "aria-label": props.label,
77
81
  "aria-expanded": props.expanded,
78
82
  title: props.label,
79
- children: /*#__PURE__*/_jsx(ExpandIcon, {
80
- className: classNames
83
+ children: /*#__PURE__*/_jsx("div", {
84
+ className: classNames,
85
+ children: props.expanded ? /*#__PURE__*/_jsx(CollapseIcon, {}) : /*#__PURE__*/_jsx(ExpandIcon, {})
81
86
  })
82
87
  });
83
88
  };
@@ -150,7 +155,6 @@ const BpkInfoBannerInner = ({
150
155
  }), dismissable && /*#__PURE__*/_jsx("span", {
151
156
  className: getClassName('bpk-info-banner__toggle'),
152
157
  children: /*#__PURE__*/_jsx(BpkCloseButton, {
153
- className: getClassName('bpk-info-banner__toggle-button'),
154
158
  onClick: onBannerDismiss,
155
159
  "aria-label": dismissButtonLabel,
156
160
  label: dismissButtonLabel
@@ -163,7 +167,6 @@ const BpkInfoBannerInner = ({
163
167
  className: childrenContainerClassName,
164
168
  children: children
165
169
  }), isExpandable && action && /*#__PURE__*/_jsx(BpkLink, {
166
- className: getClassName('bpk-info-banner__expandable-action'),
167
170
  onClick: action.callback,
168
171
  children: action.title
169
172
  })]
@@ -17,8 +17,8 @@
17
17
  */
18
18
 
19
19
  import BpkInput from "./src/BpkInput";
20
- import withOpenEvents from "./src/withOpenEvents";
21
20
  import { propTypes, defaultProps, CLEAR_BUTTON_MODES, INPUT_TYPES } from "./src/common-types";
22
21
  import themeAttributes from "./src/themeAttributes";
22
+ import withOpenEvents from "./src/withOpenEvents";
23
23
  export default BpkInput;
24
24
  export { propTypes, defaultProps, withOpenEvents, INPUT_TYPES, CLEAR_BUTTON_MODES, themeAttributes };
@@ -16,9 +16,9 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
+ import { withButtonAlignment } from "../../bpk-component-icon";
19
20
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
21
  import ClearIcon from "../../bpk-component-icon/sm/close-circle";
21
- import { withButtonAlignment } from "../../bpk-component-icon";
22
22
  import { cssModules } from "../../bpk-react-utils";
23
23
  import STYLES from "./BpkClearButton.module.css";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -43,6 +43,8 @@ const BpkClearButton = ({
43
43
  ...rest,
44
44
  children: /*#__PURE__*/_jsx(ClearButtonIcon, {
45
45
  focusable: "false" // prevents focus on IE11
46
+ // TODO: className to be removed
47
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
46
48
  ,
47
49
  className: getClassName('bpk-clear-button__icon')
48
50
  })
@@ -19,10 +19,9 @@
19
19
  import { Component } from 'react';
20
20
  import { cssModules } from "../../bpk-react-utils";
21
21
  import BpkClearButton from "./BpkClearButton";
22
- import STYLES from "./BpkInput.module.css";
23
22
  import { CLEAR_BUTTON_MODES, defaultProps } from "./common-types";
24
- import { jsx as _jsx } from "react/jsx-runtime";
25
- import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import STYLES from "./BpkInput.module.css";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
26
25
  const getClassName = cssModules(STYLES);
27
26
  class BpkInput extends Component {
28
27
  static defaultProps = defaultProps;
@@ -139,7 +138,10 @@ class BpkInput extends Component {
139
138
  persistClearButton: false
140
139
  });
141
140
  }
142
- },
141
+ }
142
+ // TODO: className to be removed
143
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
144
+ ,
143
145
  className: clearButtonClassNames.join(' ')
144
146
  })]
145
147
  }) : renderedInput;
@@ -122,7 +122,10 @@ const withOpenEvents = InputComponent => {
122
122
  // Needed on mobile as some Android devices do not trigger onClick or onTouch when TalkBack is active but do trigger onFocus
123
123
  eventHandlers.onFocus = withEventHandler(this.handleFocus, onFocus);
124
124
  eventHandlers.onBlur = withEventHandler(this.handleBlur, onBlur);
125
- return /*#__PURE__*/_jsx(InputComponent, {
125
+ return /*#__PURE__*/_jsx(InputComponent
126
+ // TODO: className to be removed
127
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
128
+ , {
126
129
  className: classNames.join(' '),
127
130
  ...eventHandlers,
128
131
  ...rest
@@ -17,8 +17,7 @@
17
17
  */import PropTypes from 'prop-types';
18
18
  import { cssModules } from "../../bpk-react-utils";
19
19
  import STYLES from "./BpkLabel.module.css";
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- import { jsxs as _jsxs } from "react/jsx-runtime";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
21
  const getClassName = cssModules(STYLES);
23
22
  const BpkLabel = props => {
24
23
  const {
@@ -14,8 +14,8 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import BpkLink from "./src/BpkLink";
18
- import BpkButtonLink from "./src/BpkButtonLink";
17
+ */import BpkButtonLink from "./src/BpkButtonLink";
18
+ import BpkLink from "./src/BpkLink";
19
19
  import themeAttributes, { linkAlternateThemeAttributes } from "./src/themeAttributes";
20
20
  export default BpkLink;
21
21
  export { BpkButtonLink, themeAttributes, linkAlternateThemeAttributes };
@@ -33,7 +33,10 @@ const BpkList = props => {
33
33
  return /*#__PURE__*/_jsx(TagName, {
34
34
  "aria-label": ariaLabel,
35
35
  "aria-labelledby": ariaLabelledby,
36
- title: title,
36
+ title: title
37
+ // TODO: className to be removed
38
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
39
+ ,
37
40
  className: classNames,
38
41
  children: children
39
42
  });
@@ -16,14 +16,13 @@
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
18
  import BpkButton from "../../bpk-component-button";
19
- import { BpkSpinner, BpkLargeSpinner } from "../../bpk-component-spinner";
20
19
  import { withButtonAlignment, withLargeButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
21
- import ArrowIconSm from "../../bpk-component-icon/sm/long-arrow-right";
22
20
  import ArrowIconLg from "../../bpk-component-icon/lg/long-arrow-right";
21
+ import ArrowIconSm from "../../bpk-component-icon/sm/long-arrow-right";
22
+ import { BpkSpinner, BpkLargeSpinner } from "../../bpk-component-spinner";
23
23
  import { cssModules } from "../../bpk-react-utils";
24
24
  import STYLES from "./BpkLoadingButton.module.css";
25
- import { jsx as _jsx } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
26
  const getClassName = cssModules(STYLES);
28
27
  export const ICON_POSITION = {
29
28
  LEADING: 'leading',
@@ -85,7 +84,10 @@ const BpkLoadingButton = props => {
85
84
  _jsxs(BpkButton, {
86
85
  iconOnly: iconOnly,
87
86
  disabled: showBtnDisabled,
88
- large: large,
87
+ large: large
88
+ // TODO: className to be removed
89
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
90
+ ,
89
91
  className: classNames,
90
92
  link: link,
91
93
  linkOnDark: linkOnDark,
@@ -14,12 +14,12 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import BpkMap from "./src/BpkMap";
18
- import BpkIconMarker from "./src/BpkIconMarker";
17
+ */import BpkIconMarker from "./src/BpkIconMarker";
18
+ import BpkMap from "./src/BpkMap";
19
+ import BpkOverlayView from "./src/BpkOverlayView";
19
20
  import BpkPriceMarker, { PRICE_MARKER_STATUSES } from "./src/BpkPriceMarker";
20
21
  import { BpkPriceMarkerV2, MARKER_STATUSES } from "./src/BpkPriceMarkerV2/BpkPriceMarker";
21
- import BpkOverlayView from "./src/BpkOverlayView";
22
- import withGoogleMapsScript from "./src/withGoogleMapsScript";
23
22
  import { defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes } from "./src/themeAttributes";
23
+ import withGoogleMapsScript from "./src/withGoogleMapsScript";
24
24
  export default BpkMap;
25
25
  export { BpkIconMarker, BpkPriceMarker, BpkPriceMarkerV2, BpkOverlayView, withGoogleMapsScript, defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes, PRICE_MARKER_STATUSES, MARKER_STATUSES };
@@ -16,12 +16,11 @@
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
18
  import { cssModules } from "../../bpk-react-utils";
19
+ import BpkBasicMapMarker from "./BpkBasicMapMarker";
19
20
  import BpkIconMarkerBackground from "./BpkIconMarkerBackground";
20
21
  import { LatLongPropType } from "./common-types";
21
- import BpkBasicMapMarker from "./BpkBasicMapMarker";
22
22
  import STYLES from "./BpkIconMarker.module.css";
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
24
  const getClassName = cssModules(STYLES);
26
25
  const BpkIconMarker = props => {
27
26
  const {
@@ -14,8 +14,8 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import { useCallback, useRef } from 'react';
18
- import PropTypes from 'prop-types';
17
+ */import PropTypes from 'prop-types';
18
+ import { useCallback, useRef } from 'react';
19
19
  import { GoogleMap } from '@react-google-maps/api';
20
20
  import { cssModules } from "../../bpk-react-utils";
21
21
  import { LatLongPropType } from "./common-types";
@@ -15,13 +15,12 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
- import { cssModules } from "../../bpk-react-utils";
19
18
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
20
- import { LatLongPropType } from "./common-types";
19
+ import { cssModules } from "../../bpk-react-utils";
21
20
  import BpkBasicMapMarker from "./BpkBasicMapMarker";
21
+ import { LatLongPropType } from "./common-types";
22
22
  import STYLES from "./BpkPriceMarker.module.css";
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
24
  const getClassName = cssModules(STYLES);
26
25
  export const PRICE_MARKER_STATUSES = {
27
26
  default: 'default',
@@ -55,10 +54,12 @@ const BpkPriceMarker = props => {
55
54
  onClick: onClick,
56
55
  disabled: disabled,
57
56
  ...buttonProps,
58
- children: [/*#__PURE__*/_jsx(BpkText, {
57
+ children: [/*#__PURE__*/_jsx("span", {
59
58
  className: classNames,
60
- textStyle: status === PRICE_MARKER_STATUSES.focused ? TEXT_STYLES.label1 : TEXT_STYLES.label2,
61
- children: label
59
+ children: /*#__PURE__*/_jsx(BpkText, {
60
+ textStyle: status === PRICE_MARKER_STATUSES.focused ? TEXT_STYLES.label1 : TEXT_STYLES.label2,
61
+ children: label
62
+ })
62
63
  }), /*#__PURE__*/_jsx("div", {
63
64
  className: arrowClassNames
64
65
  })]
@@ -16,12 +16,11 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { cssModules } from "../../../bpk-react-utils";
20
19
  import BpkText, { TEXT_STYLES } from "../../../bpk-component-text";
20
+ import { cssModules } from "../../../bpk-react-utils";
21
21
  import BpkBasicMapMarker from "../BpkBasicMapMarker";
22
22
  import STYLES from "./BpkPriceMarker.module.css";
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
24
  const getClassName = cssModules(STYLES);
26
25
  export const MARKER_STATUSES = {
27
26
  unselected: 'unselected',
@@ -15,8 +15,8 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
- import debounce from 'lodash.debounce';
19
18
  import { Component } from 'react';
19
+ import debounce from 'lodash.debounce';
20
20
  import { cssModules, isRTL } from "../../bpk-react-utils";
21
21
  import STYLES from "./BpkMobileScrollContainer.module.css";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -162,7 +162,10 @@ class BpkMobileScrollContainer extends Component {
162
162
  "aria-label": ariaLabel,
163
163
  ref: el => {
164
164
  this.innerEl = el;
165
- },
165
+ }
166
+ // TODO: className to be removed
167
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
168
+ ,
166
169
  className: getClassName('bpk-mobile-scroll-container__inner'),
167
170
  children: children
168
171
  })
@@ -16,10 +16,11 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { BpkModalV2 } from "./src/BpkModalV2/BpkModal";
20
- import themeAttributes from "./src/themeAttributes";
21
19
  import BpkModal from "./src/BpkModal";
20
+ import { MODAL_STYLING } from "./src/BpkModalInner";
21
+ import { BpkModalV2 } from "./src/BpkModalV2/BpkModal";
22
22
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
23
23
  import { propTypes, defaultProps } from "./src/legacy-prop-types";
24
+ import themeAttributes from "./src/themeAttributes";
24
25
  export default BpkModal;
25
- export { propTypes, defaultProps, themeAttributes, BpkModalV2 };
26
+ export { propTypes, defaultProps, themeAttributes, BpkModalV2, MODAL_STYLING };
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import type { ReactNode } from 'react';
20
- import type { Props as ModalDialogProps } from './BpkModalInner';
20
+ import type { Props as ModalDialogProps, ModalStyle } from './BpkModalInner';
21
21
  export type Props = Partial<ModalDialogProps> & {
22
22
  id: string;
23
23
  children: ReactNode;
@@ -25,6 +25,7 @@ export type Props = Partial<ModalDialogProps> & {
25
25
  isOpen: boolean;
26
26
  closeOnScrimClick?: boolean;
27
27
  closeOnEscPressed?: boolean;
28
+ modalStyle?: ModalStyle;
28
29
  renderTarget?: null | HTMLElement | (() => null | HTMLElement);
29
30
  onClose?: (arg0?: TouchEvent | MouseEvent | KeyboardEvent, arg1?: {
30
31
  source: 'ESCAPE' | 'DOCUMENT_CLICK';
@@ -16,10 +16,10 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { withScrim } from "../../bpk-scrim-utils";
20
19
  import { Portal, cssModules, isDeviceIphone } from "../../bpk-react-utils";
20
+ import { withScrim } from "../../bpk-scrim-utils";
21
+ import BpkModalInner, { MODAL_STYLING } from "./BpkModalInner";
21
22
  import STYLES from "./BpkModal.module.css";
22
- import BpkModalInner from "./BpkModalInner";
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  const getClassName = cssModules(STYLES);
25
25
  const ScrimBpkModalInner = withScrim(BpkModalInner);
@@ -36,6 +36,7 @@ const BpkModal = ({
36
36
  fullScreenOnMobile = true,
37
37
  isIphone = isDeviceIphone(),
38
38
  isOpen,
39
+ modalStyle = MODAL_STYLING.default,
39
40
  onClose = () => null,
40
41
  padded = true,
41
42
  renderTarget = null,
@@ -62,7 +63,10 @@ const BpkModal = ({
62
63
  closeOnScrimClick: closeOnScrimClick,
63
64
  containerClassName: containerClass.join(' '),
64
65
  isIphone: isIphone,
65
- title: title,
66
+ title: title
67
+ // TODO: className to be removed
68
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
69
+ ,
66
70
  className: className,
67
71
  contentClassName: contentClassName,
68
72
  closeLabel: closeLabel,
@@ -72,6 +76,7 @@ const BpkModal = ({
72
76
  padded: padded,
73
77
  accessoryView: accessoryView,
74
78
  dialogRef: dialogRef,
79
+ modalStyle: modalStyle,
75
80
  ...rest
76
81
  })
77
82
  });
@@ -17,6 +17,7 @@
17
17
  */
18
18
 
19
19
  import type { ReactNode } from 'react';
20
+ import { ModalStyle } from './BpkModalInner';
20
21
  export type Props = {
21
22
  id: string;
22
23
  children: ReactNode;
@@ -33,6 +34,7 @@ export type Props = {
33
34
  title?: string | null;
34
35
  closeLabel?: string;
35
36
  closeText?: string | null;
37
+ modalStyle?: ModalStyle;
36
38
  /**
37
39
  * The accessory view allows for icons and actions to be placed in front of the main title inside the modal header. To be used with `BpkNavigationBarButtonLink`
38
40
  */
@@ -16,16 +16,19 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
- import { BpkButtonLink } from "../../bpk-component-link";
21
19
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
20
  import BpkCloseButton from "../../bpk-component-close-button";
23
- import BpkNavigationBar from "../../bpk-component-navigation-bar";
21
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
+ import { BpkButtonLink } from "../../bpk-component-link";
23
+ import BpkNavigationBar, { BAR_STYLES } from "../../bpk-component-navigation-bar";
24
24
  import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
25
25
  import STYLES from "./BpkModalInner.module.css";
26
- import { jsx as _jsx } from "react/jsx-runtime";
27
- import { jsxs as _jsxs } from "react/jsx-runtime";
26
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
27
  const getClassName = cssModules(STYLES);
28
+ export const MODAL_STYLING = {
29
+ default: 'default',
30
+ surfaceContrast: 'surface-contrast'
31
+ };
29
32
  const BpkModalInner = ({
30
33
  accessoryView = null,
31
34
  children,
@@ -38,6 +41,7 @@ const BpkModalInner = ({
38
41
  fullScreenOnMobile = true,
39
42
  id,
40
43
  isIphone,
44
+ modalStyle = MODAL_STYLING.default,
41
45
  onClose = () => null,
42
46
  padded = true,
43
47
  showHeader = true,
@@ -47,6 +51,7 @@ const BpkModalInner = ({
47
51
  const classNames = [getClassName('bpk-modal')];
48
52
  const contentClassNames = [getClassName('bpk-modal__content')];
49
53
  const navigationStyles = [getClassName('bpk-modal__navigation')];
54
+ classNames.push(getClassName(`bpk-modal__modal-style--${modalStyle}`));
50
55
  if (wide) {
51
56
  classNames.push(getClassName('bpk-modal--wide'));
52
57
  }
@@ -83,7 +88,11 @@ const BpkModalInner = ({
83
88
  children: [showHeader && /*#__PURE__*/_jsx("header", {
84
89
  className: getClassName('bpk-modal__header'),
85
90
  children: /*#__PURE__*/_jsx(BpkNavigationBar, {
86
- id: headingId,
91
+ barStyle: modalStyle === MODAL_STYLING.surfaceContrast ? BAR_STYLES.onDark : BAR_STYLES.default,
92
+ id: headingId
93
+ // TODO: className to be removed
94
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
95
+ ,
87
96
  className: navigationStyles.join(' '),
88
97
  title: /*#__PURE__*/_jsx("h2", {
89
98
  id: headingId,
@@ -91,12 +100,18 @@ const BpkModalInner = ({
91
100
  children: title
92
101
  }),
93
102
  leadingButton: accessoryViewFinal,
94
- trailingButton: closeText ? /*#__PURE__*/_jsx(BpkButtonLink, {
95
- className: getClassName('bpk-modal__close-button'),
103
+ trailingButton: closeText ? /*#__PURE__*/_jsx(BpkButtonLink
104
+ // TODO: className to be removed
105
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
106
+ , {
107
+ className: [getClassName('bpk-modal__close-button'), getClassName(`bpk-modal__close-button-style--${modalStyle}`)].join(' '),
96
108
  onClick: onClose,
97
109
  children: closeText
98
- }) : /*#__PURE__*/_jsx(BpkCloseButton, {
99
- className: getClassName('bpk-modal__close-button'),
110
+ }) : /*#__PURE__*/_jsx(BpkCloseButton
111
+ // TODO: className to be removed
112
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
113
+ , {
114
+ className: [getClassName('bpk-modal__close-button'), getClassName(`bpk-modal__close-button-style--${modalStyle}`)].join(' '),
100
115
  label: closeLabel,
101
116
  onClick: onClose
102
117
  })
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- .bpk-modal{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-modal--full-screen-mobile{display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}}.bpk-modal--full-screen{max-width:none;display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}@media(min-width: 32.0625rem){.bpk-modal--wide{max-width:64rem}}.bpk-modal--appear{transform:scale(0.9);opacity:0}.bpk-modal--appear-active{transform:scale(1);opacity:1}.bpk-modal__header{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-modal__navigation{display:flex;justify-content:space-between;background-color:#fff}.bpk-modal__heading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-modal__close-button{position:relative;right:auto;margin-left:1rem;margin-right:0}html[dir=rtl] .bpk-modal__close-button{margin-left:0;margin-right:1rem}html[dir=rtl] .bpk-modal__close-button{left:auto}.bpk-modal__accessory-view{position:relative;left:auto;margin-right:1rem}html[dir=rtl] .bpk-modal__accessory-view{right:auto;margin-left:1rem}.bpk-modal__content{flex:1;overflow-y:auto}.bpk-modal__content--padded{padding:1rem}
18
+ .bpk-modal{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-modal--full-screen-mobile{display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}}.bpk-modal--full-screen{max-width:none;display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}@media(min-width: 32.0625rem){.bpk-modal--wide{max-width:64rem}}.bpk-modal--appear{transform:scale(0.9);opacity:0}.bpk-modal--appear-active{transform:scale(1);opacity:1}.bpk-modal__modal-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__header{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-modal__navigation{display:flex;justify-content:space-between}.bpk-modal__heading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-modal__close-button{position:relative;right:auto;margin-left:1rem;margin-right:0}html[dir=rtl] .bpk-modal__close-button{margin-left:0;margin-right:1rem}html[dir=rtl] .bpk-modal__close-button{left:auto}.bpk-modal__close-button-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-no-touch-support .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}.bpk-modal__accessory-view{position:relative;left:auto;margin-right:1rem}html[dir=rtl] .bpk-modal__accessory-view{right:auto;margin-left:1rem}.bpk-modal__content{flex:1;overflow-y:auto}.bpk-modal__content--padded{padding:1rem}