@skyscanner/backpack-web 33.4.0 → 34.0.0-premajor.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 (153) hide show
  1. package/bpk-component-accordion/index.js +1 -1
  2. package/bpk-component-accordion/src/BpkAccordionItem.js +12 -12
  3. package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
  4. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +4 -1
  5. package/bpk-component-banner-alert/index.js +1 -1
  6. package/bpk-component-banner-alert/src/AnimateAndFade.js +33 -31
  7. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +11 -4
  8. package/bpk-component-barchart/src/BpkBarchart.js +8 -8
  9. package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +3 -3
  10. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +17 -12
  11. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
  12. package/bpk-component-button/index.js +5 -5
  13. package/bpk-component-button/src/BpkButtonDestructive.js +10 -9
  14. package/bpk-component-button/src/BpkButtonFeatured.js +10 -9
  15. package/bpk-component-button/src/BpkButtonLink.js +11 -10
  16. package/bpk-component-button/src/BpkButtonLinkOnDark.js +11 -10
  17. package/bpk-component-button/src/BpkButtonPrimary.js +2 -2
  18. package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +10 -9
  19. package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +10 -9
  20. package/bpk-component-button/src/BpkButtonSecondary.js +10 -10
  21. package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +10 -9
  22. package/bpk-component-calendar/index.js +1 -1
  23. package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -3
  24. package/bpk-component-calendar/src/BpkCalendarGrid.js +2 -2
  25. package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
  26. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +4 -1
  27. package/bpk-component-calendar/src/BpkCalendarGridTransition.js +5 -2
  28. package/bpk-component-calendar/src/BpkCalendarNav.js +9 -3
  29. package/bpk-component-calendar/src/Week.js +6 -3
  30. package/bpk-component-calendar/src/composeCalendar.js +8 -2
  31. package/bpk-component-calendar/src/date-utils.js +14 -14
  32. package/bpk-component-card/src/BpkDividedCard.js +18 -13
  33. package/bpk-component-card-button/src/BpkSaveButton.js +13 -4
  34. package/bpk-component-chip/index.d.ts +3 -5
  35. package/bpk-component-chip/index.js +3 -2
  36. package/bpk-component-chip/src/BpkDismissibleChip.js +7 -2
  37. package/bpk-component-chip/src/BpkIconChip.d.ts +25 -0
  38. package/bpk-component-chip/src/BpkIconChip.js +31 -0
  39. package/bpk-component-chip/src/BpkSelectableChip.d.ts +0 -2
  40. package/bpk-component-chip/src/BpkSelectableChip.js +3 -3
  41. package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
  42. package/bpk-component-chip/src/commonTypes.d.ts +1 -1
  43. package/bpk-component-chip/src/commonTypes.js +1 -24
  44. package/bpk-component-content-cards/src/BpkContentCard.js +8 -2
  45. package/bpk-component-datatable/src/BpkDataTable.js +1 -1
  46. package/bpk-component-datatable/src/BpkDataTableHeader.js +12 -8
  47. package/bpk-component-datatable/src/BpkDataTableHeader.module.css +1 -1
  48. package/bpk-component-datepicker/src/BpkDatepicker.js +2 -2
  49. package/bpk-component-description-list/index.js +1 -1
  50. package/bpk-component-description-list/src/ComponentFactory.js +10 -5
  51. package/bpk-component-dialog/src/BpkDialog.js +6 -4
  52. package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
  53. package/bpk-component-dialog/src/BpkDialogInner.js +6 -3
  54. package/bpk-component-drawer/src/BpkDrawer.js +1 -4
  55. package/bpk-component-drawer/src/BpkDrawerContent.js +7 -5
  56. package/bpk-component-fieldset/src/BpkFieldset.js +9 -7
  57. package/bpk-component-flare/index.js +2 -2
  58. package/bpk-component-flare/src/BpkContentBubble.js +4 -1
  59. package/bpk-component-flare/src/BpkFlareBar.js +13 -4
  60. package/bpk-component-flare/src/__generated__/corner-radius.d.ts +6 -0
  61. package/bpk-component-flare/src/__generated__/pointer.d.ts +6 -0
  62. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +8 -2
  63. package/bpk-component-form-validation/src/BpkFormValidation.js +5 -4
  64. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +9 -11
  65. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +1 -1
  66. package/bpk-component-grid-toggle/src/BpkGridToggle.js +8 -6
  67. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +16 -14
  68. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +1 -1
  69. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -2
  70. package/bpk-component-icon/index.js +1 -1
  71. package/bpk-component-icon/src/classNameModifierHOCFactory.js +3 -0
  72. package/bpk-component-image/index.js +2 -2
  73. package/bpk-component-image/src/BpkBackgroundImage.js +2 -1
  74. package/bpk-component-image/src/BpkImage.js +2 -1
  75. package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +3 -3
  76. package/bpk-component-info-banner/src/AnimateAndFade.js +33 -31
  77. package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
  78. package/bpk-component-info-banner/src/BpkInfoBannerInner.js +16 -12
  79. package/bpk-component-input/index.js +1 -1
  80. package/bpk-component-input/src/BpkClearButton.js +3 -1
  81. package/bpk-component-input/src/BpkInput.js +4 -1
  82. package/bpk-component-input/src/withOpenEvents.js +4 -1
  83. package/bpk-component-link/index.js +2 -2
  84. package/bpk-component-list/src/BpkList.js +4 -1
  85. package/bpk-component-loading-button/src/BpkLoadingButton.js +6 -3
  86. package/bpk-component-map/index.js +4 -4
  87. package/bpk-component-map/src/BpkIconMarker.js +1 -1
  88. package/bpk-component-map/src/BpkMap.js +2 -2
  89. package/bpk-component-map/src/BpkPriceMarker.js +7 -5
  90. package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.js +1 -1
  91. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +4 -1
  92. package/bpk-component-modal/index.js +4 -3
  93. package/bpk-component-modal/src/BpkModal.d.ts +2 -1
  94. package/bpk-component-modal/src/BpkModal.js +8 -3
  95. package/bpk-component-modal/src/BpkModalInner.d.ts +2 -0
  96. package/bpk-component-modal/src/BpkModalInner.js +24 -8
  97. package/bpk-component-modal/src/BpkModalInner.module.css +1 -1
  98. package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +1 -1
  99. package/bpk-component-modal/src/BpkModalV2/BpkModal.d.ts +2 -0
  100. package/bpk-component-modal/src/BpkModalV2/BpkModal.js +19 -8
  101. package/bpk-component-navigation-bar/index.js +1 -1
  102. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +7 -5
  103. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +4 -1
  104. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +4 -1
  105. package/bpk-component-nudger/index.js +1 -1
  106. package/bpk-component-nudger/src/BpkConfigurableNudger.js +16 -4
  107. package/bpk-component-nudger/src/BpkNudger.js +16 -5
  108. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +1 -1
  109. package/bpk-component-page-indicator/src/NavButton.js +1 -1
  110. package/bpk-component-pagination/src/BpkPaginationList.js +1 -1
  111. package/bpk-component-pagination/src/BpkPaginationNudger.js +13 -4
  112. package/bpk-component-pagination/src/BpkPaginationPage.js +4 -1
  113. package/bpk-component-phone-input/src/BpkPhoneInput.js +15 -4
  114. package/bpk-component-popover/index.js +3 -3
  115. package/bpk-component-popover/src/BpkPopover.js +131 -101
  116. package/bpk-component-popover/src/BpkPopover.module.css +1 -1
  117. package/bpk-component-popover/src/themeAttributes.js +4 -1
  118. package/bpk-component-price/src/BpkPrice.js +17 -5
  119. package/bpk-component-rating/src/BpkRating.js +17 -5
  120. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +4 -1
  121. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +6 -3
  122. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +6 -3
  123. package/bpk-component-section-header/src/BpkSectionHeader.js +9 -3
  124. package/bpk-component-section-list/index.js +1 -1
  125. package/bpk-component-section-list/src/BpkSectionListItem.js +10 -4
  126. package/bpk-component-section-list/src/BpkSectionListSection.js +1 -1
  127. package/bpk-component-slider/src/BpkSlider.js +4 -1
  128. package/bpk-component-spinner/index.js +3 -3
  129. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +7 -4
  130. package/bpk-component-spinner/src/BpkLargeSpinner.js +7 -4
  131. package/bpk-component-spinner/src/BpkSpinner.js +7 -4
  132. package/bpk-component-split-input/src/BpkInputField.js +2 -2
  133. package/bpk-component-split-input/src/BpkSplitInput.js +3 -3
  134. package/bpk-component-star-rating/index.js +4 -4
  135. package/bpk-component-star-rating/src/BpkInteractiveStar.js +6 -2
  136. package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
  137. package/bpk-component-star-rating/src/BpkStar.js +22 -15
  138. package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
  139. package/bpk-component-table/index.js +2 -2
  140. package/bpk-component-text/src/BpkText.js +10 -5
  141. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +4 -1
  142. package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
  143. package/bpk-component-tooltip/src/BpkTooltipPortal.js +4 -1
  144. package/bpk-mixins/_chips.scss +9 -0
  145. package/bpk-react-utils/index.js +3 -3
  146. package/bpk-react-utils/src/withDefaultProps.js +4 -1
  147. package/bpk-scrim-utils/src/withScrimmedPortal.js +1 -1
  148. package/bpk-theming/src/BpkThemeProvider.js +1 -1
  149. package/package.json +4 -3
  150. package/unstable__bpk-mixins/_chips.scss +9 -0
  151. package/bpk-component-button/src/commonButtonTests.js +0 -133
  152. package/bpk-component-popover/src/BpkPopoverPortal.js +0 -216
  153. package/bpk-component-popover/src/keyboardFocusScope.js +0 -76
@@ -16,6 +16,6 @@
16
16
  * limitations under the License.
17
17
  */import BpkAccordion from "./src/BpkAccordion";
18
18
  import BpkAccordionItem from "./src/BpkAccordionItem";
19
- import withSingleItemAccordionState from "./src/withSingleItemAccordionState";
20
19
  import withAccordionItemState from "./src/withAccordionItemState";
20
+ import withSingleItemAccordionState from "./src/withSingleItemAccordionState";
21
21
  export { BpkAccordion, BpkAccordionItem, withSingleItemAccordionState, withAccordionItemState };
@@ -17,10 +17,10 @@
17
17
  */import PropTypes from 'prop-types';
18
18
  import { Node, Element, useContext, cloneElement } from 'react';
19
19
  import AnimateHeight from "../../bpk-animate-height";
20
+ import { withButtonAlignment } from "../../bpk-component-icon";
20
21
  import ChevronDownIcon from "../../bpk-component-icon/sm/chevron-down";
21
22
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
22
23
  import { cssModules } from "../../bpk-react-utils";
23
- import { withButtonAlignment } from "../../bpk-component-icon";
24
24
  import { BpkAccordionContext } from "./BpkAccordion";
25
25
  import STYLES from "./BpkAccordionItem.module.css";
26
26
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
@@ -94,18 +94,18 @@ const BpkAccordionItem = props => {
94
94
  "aria-controls": contentId,
95
95
  onClick: onClick,
96
96
  className: getClassName('bpk-accordion__toggle-button'),
97
- children: /*#__PURE__*/_jsxs("span", {
98
- className: getClassName('bpk-accordion__flex-container'),
99
- children: [/*#__PURE__*/_jsxs(BpkText, {
100
- textStyle: textStyle,
101
- tagName: tagName,
97
+ children: /*#__PURE__*/_jsxs("div", {
98
+ className: `${getClassName('bpk-accordion__flex-container')}`,
99
+ children: [/*#__PURE__*/_jsx("div", {
102
100
  className: titleTextClassNames.join(' '),
103
- children: [clonedIcon, title]
104
- }), /*#__PURE__*/_jsx("span", {
105
- className: getClassName('bpk-accordion__icon-wrapper'),
106
- children: /*#__PURE__*/_jsx(ExpandIcon, {
107
- className: iconClassNames.join(' ')
101
+ children: /*#__PURE__*/_jsxs(BpkText, {
102
+ textStyle: textStyle,
103
+ tagName: tagName,
104
+ children: [clonedIcon, title]
108
105
  })
106
+ }), /*#__PURE__*/_jsx("span", {
107
+ className: `${getClassName('bpk-accordion__icon-wrapper')} ${iconClassNames.join(' ')}`,
108
+ children: /*#__PURE__*/_jsx(ExpandIcon, {})
109
109
  })]
110
110
  })
111
111
  })
@@ -135,7 +135,7 @@ BpkAccordionItem.defaultProps = {
135
135
  expanded: false,
136
136
  icon: null,
137
137
  onClick: () => null,
138
- tagName: 'span',
138
+ tagName: 'h3',
139
139
  textStyle: TEXT_STYLES.bodyDefault
140
140
  };
141
141
  export default BpkAccordionItem;
@@ -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-accordion__title{height:auto}.bpk-accordion__title--collapsed{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-accordion__title--collapsed-on-dark{box-shadow:0 -1px 0 0 rgba(255,255,255,.5) inset}.bpk-accordion__toggle-button{width:100%;padding:0;border:0;background-color:rgba(0,0,0,0);color:#161616;text-align:left;cursor:pointer;appearance:none}html[dir=rtl] .bpk-accordion__toggle-button{text-align:right}.bpk-accordion__flex-container{display:inline-flex;width:100%;margin:1rem 0;flex-direction:row}.bpk-accordion__title-text{display:inline-block;flex-grow:1}.bpk-accordion__title-text--on-dark{color:#fff}.bpk-accordion__icon-wrapper{display:inline-block}.bpk-accordion__leading-icon{margin-left:0;margin-right:.5rem}html[dir=rtl] .bpk-accordion__leading-icon{margin-left:.5rem;margin-right:0}.bpk-accordion__item-expand-icon{fill:#161616}.bpk-accordion__item-expand-icon--flipped{transform:scaleY(-1)}.bpk-accordion__item-expand-icon--on-dark{fill:#fff}.bpk-accordion__content-container{margin:0}.bpk-accordion__content-container--expanded{padding-bottom:1rem;box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-accordion__content-container--expanded-on-dark{padding-bottom:1rem;box-shadow:0 -1px 0 0 rgba(255,255,255,.5) inset}
18
+ .bpk-accordion__title{height:auto}.bpk-accordion__title--collapsed{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-accordion__title--collapsed-on-dark{box-shadow:0 -1px 0 0 rgba(255,255,255,.5) inset}.bpk-accordion__toggle-button{width:100%;padding:0;border:0;background-color:rgba(0,0,0,0);color:#161616;text-align:left;cursor:pointer;appearance:none}html[dir=rtl] .bpk-accordion__toggle-button{text-align:right}.bpk-accordion__flex-container{display:inline-flex;width:100%;margin:1rem 0;flex-direction:row}.bpk-accordion__title-text{flex-grow:1}.bpk-accordion__title-text--on-dark{color:#fff}.bpk-accordion__icon-wrapper{display:inline-block}.bpk-accordion__leading-icon{margin-left:0;margin-right:.5rem}html[dir=rtl] .bpk-accordion__leading-icon{margin-left:.5rem;margin-right:0}.bpk-accordion__item-expand-icon{fill:#161616}.bpk-accordion__item-expand-icon--flipped{transform:scaleY(-1)}.bpk-accordion__item-expand-icon--on-dark{fill:#fff}.bpk-accordion__content-container{margin:0}.bpk-accordion__content-container--expanded{padding-bottom:1rem;box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-accordion__content-container--expanded-on-dark{padding-bottom:1rem;box-shadow:0 -1px 0 0 rgba(255,255,255,.5) inset}
@@ -43,7 +43,10 @@ const BpkAutosuggestSuggestion = props => {
43
43
  _jsxs("section", {
44
44
  className: classNames.join(' '),
45
45
  ...rest,
46
- children: [icon ? /*#__PURE__*/_jsx(Icon, {
46
+ children: [icon ? /*#__PURE__*/_jsx(Icon
47
+ // TODO: className to be removed
48
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
49
+ , {
47
50
  className: getClassName('bpk-autosuggest__suggestion-icon')
48
51
  }) : null, /*#__PURE__*/_jsx("div", {
49
52
  className: getClassName('bpk-autosuggest__suggestion-content'),
@@ -20,7 +20,7 @@ import BpkBannerAlert from "./src/BpkBannerAlert";
20
20
  import BpkBannerAlertDismissable from "./src/BpkBannerAlertDismissable";
21
21
  import BpkBannerAlertExpandable from "./src/BpkBannerAlertExpandable";
22
22
  import { ALERT_TYPES } from "./src/common-types";
23
- import withBannerAlertState from "./src/withBannerAlertState";
24
23
  import themeAttributes from "./src/themeAttributes";
24
+ import withBannerAlertState from "./src/withBannerAlertState";
25
25
  export { ALERT_TYPES, BpkBannerAlertDismissable, BpkBannerAlertExpandable, withBannerAlertState, themeAttributes };
26
26
  export default BpkBannerAlert;
@@ -22,9 +22,10 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group';
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 { cssModules } from "../../bpk-react-utils";
25
+
26
26
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
27
27
  import BpkAnimateHeight from "../../bpk-animate-height";
28
+ import { cssModules } from "../../bpk-react-utils";
28
29
  import STYLES from "./BpkAnimateAndFade.module.css";
29
30
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
30
31
  const getClassName = cssModules(STYLES);
@@ -32,8 +33,7 @@ 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
  }
@@ -22,17 +22,18 @@
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";
25
+
26
26
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
27
27
  import BpkAnimateHeight from "../../bpk-animate-height";
28
28
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
29
29
  import BpkCloseButton from "../../bpk-component-close-button";
30
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
31
- import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
30
+ import { withButtonAlignment } from "../../bpk-component-icon";
32
31
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
33
32
  import ChevronDownIcon from "../../bpk-component-icon/lg/chevron-down";
34
33
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
35
34
  import InfoCircleIcon from "../../bpk-component-icon/sm/information-circle";
35
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
36
+ import TickCircleIcon from "../../bpk-component-icon/sm/tick-circle";
36
37
  import { cssModules } from "../../bpk-react-utils";
37
38
  import AnimateAndFade from "./AnimateAndFade";
38
39
  import { ALERT_TYPES } from "./common-types";
@@ -63,6 +64,9 @@ const getIconForType = (type, CustomIcon) => {
63
64
  };
64
65
  const Icon = CustomIcon || componentMap[type];
65
66
  const AlignedIcon = withButtonAlignment(Icon);
67
+
68
+ // TODO: className to be removed
69
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
66
70
  return /*#__PURE__*/_jsx(AlignedIcon, {
67
71
  className: className
68
72
  });
@@ -78,7 +82,10 @@ const ToggleButton = props => {
78
82
  "aria-label": props.label,
79
83
  "aria-expanded": props.expanded,
80
84
  title: props.label,
81
- children: /*#__PURE__*/_jsx(ExpandIcon, {
85
+ children: /*#__PURE__*/_jsx(ExpandIcon
86
+ // TODO: className to be removed
87
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
88
+ , {
82
89
  className: classNames.join(' ')
83
90
  })
84
91
  });
@@ -16,22 +16,22 @@
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
18
  import { Component } from 'react';
19
- import debounce from 'lodash.debounce';
20
19
  import { scaleLinear, scaleBand } from 'd3-scale';
20
+ import debounce from 'lodash.debounce';
21
21
  import { lineHeightSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
22
- import { cssModules } from "../../bpk-react-utils";
23
22
  import BpkMobileScrollContainer from "../../bpk-component-mobile-scroll-container";
24
- import BpkBarchartDefs from "./BpkBarchartDefs";
23
+ import { cssModules } from "../../bpk-react-utils";
24
+ import BpkBarchartBar from "./BpkBarchartBar";
25
25
  import BpkBarchartBars from "./BpkBarchartBars";
26
- import BpkChartDataTable from "./BpkChartDataTable";
27
- import BpkChartMargin from "./BpkChartMargin";
26
+ import BpkBarchartDefs from "./BpkBarchartDefs";
28
27
  import BpkChartAxis from "./BpkChartAxis";
28
+ import BpkChartDataTable from "./BpkChartDataTable";
29
29
  import BpkChartGridLines from "./BpkChartGridLines";
30
- import BpkBarchartBar from "./BpkBarchartBar";
31
- import dataProp from "./customPropTypes";
32
- import { identity, remToPx } from "./utils";
30
+ import BpkChartMargin from "./BpkChartMargin";
33
31
  import { applyArrayRTLTransform, applyMarginRTLTransform } from "./RTLtransforms";
32
+ import dataProp from "./customPropTypes";
34
33
  import { ORIENTATION_X, ORIENTATION_Y } from "./orientation";
34
+ import { identity, remToPx } from "./utils";
35
35
  import STYLES from "./BpkBarchart.module.css";
36
36
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
37
37
  const getClassName = cssModules(STYLES);
@@ -19,12 +19,12 @@
19
19
  import { useState } from "react";
20
20
  import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
21
21
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
- import { BpkButtonLink } from "../../bpk-component-link";
23
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
22
  import BpkCloseButton from "../../bpk-component-close-button";
25
- import { BpkDialogWrapper, cssModules } from "../../bpk-react-utils";
23
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
+ import { BpkButtonLink } from "../../bpk-component-link";
26
25
  import BpkNavigationBar from "../../bpk-component-navigation-bar";
27
26
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
27
+ import { BpkDialogWrapper, cssModules } from "../../bpk-react-utils";
28
28
  import STYLES from "./BpkBottomSheet.module.css";
29
29
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
30
30
  const getClassName = cssModules(STYLES);
@@ -15,11 +15,11 @@
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 { withRtlSupport } from "../../bpk-component-icon";
19
+ import ArrowRight from "../../bpk-component-icon/sm/arrow-right";
18
20
  import BpkLink from "../../bpk-component-link";
19
21
  import BpkText from "../../bpk-component-text";
20
22
  import { cssModules } from "../../bpk-react-utils";
21
- import { withRtlSupport } from "../../bpk-component-icon";
22
- import ArrowRight from "../../bpk-component-icon/sm/arrow-right";
23
23
  import STYLES from "./BpkBreadcrumbItem.module.css";
24
24
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
25
  const getClassName = cssModules(STYLES);
@@ -42,21 +42,26 @@ const BpkBreadcrumbItem = props => {
42
42
  children: [active ?
43
43
  /*#__PURE__*/
44
44
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
45
- _jsx(BpkText, {
45
+ _jsx("div", {
46
46
  className: getClassName('bpk-breadcrumb-item__active-item'),
47
- "aria-current": "page",
48
- ...linkProps,
49
- children: children
47
+ children: /*#__PURE__*/_jsx(BpkText, {
48
+ "aria-current": "page",
49
+ ...linkProps,
50
+ children: children
51
+ })
50
52
  }) :
51
53
  /*#__PURE__*/
52
54
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
53
- _jsx(BpkLink, {
54
- href: href,
55
+ _jsx("div", {
55
56
  className: getClassName('bpk-breadcrumb-item__link'),
56
- ...linkProps,
57
- children: children
58
- }), !active && /*#__PURE__*/_jsx(RtlSupportedArrowRight, {
59
- className: getClassName('bpk-breadcrumb-item__arrow')
57
+ children: /*#__PURE__*/_jsx(BpkLink, {
58
+ href: href,
59
+ ...linkProps,
60
+ children: children
61
+ })
62
+ }), /*#__PURE__*/_jsx("div", {
63
+ className: getClassName('bpk-breadcrumb-item__arrow'),
64
+ children: !active && /*#__PURE__*/_jsx(RtlSupportedArrowRight, {})
60
65
  })]
61
66
  })
62
67
  );
@@ -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-breadcrumb-item{display:flex;align-items:center;white-space:nowrap}.bpk-breadcrumb-item__link{margin:0}.bpk-breadcrumb-item__active-item{color:#626971}.bpk-breadcrumb-item__arrow{margin:0 .25rem;fill:rgba(0,0,0,.2)}
18
+ .bpk-breadcrumb-item{display:flex;align-items:center;white-space:nowrap}.bpk-breadcrumb-item__link{margin:0}.bpk-breadcrumb-item__active-item{color:#626971}.bpk-breadcrumb-item__arrow{margin:0 .25rem;line-height:.5rem;fill:rgba(0,0,0,.2)}
@@ -15,16 +15,16 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import BpkButton from "./src/BpkButton"; // eslint-disable-line import/no-cycle
18
- import { BpkButtonV2 } from "./src/BpkButtonV2/BpkButton";
18
+ import BpkButtonDestructive from "./src/BpkButtonDestructive";
19
+ import BpkButtonFeatured from "./src/BpkButtonFeatured";
20
+ import BpkButtonLink from "./src/BpkButtonLink";
21
+ import BpkButtonLinkOnDark from "./src/BpkButtonLinkOnDark";
19
22
  import BpkButtonPrimary from "./src/BpkButtonPrimary";
20
23
  import BpkButtonPrimaryOnDark from "./src/BpkButtonPrimaryOnDark";
21
24
  import BpkButtonPrimaryOnLight from "./src/BpkButtonPrimaryOnLight";
22
25
  import BpkButtonSecondary from "./src/BpkButtonSecondary";
23
26
  import BpkButtonSecondaryOnDark from "./src/BpkButtonSecondaryOnDark";
24
- import BpkButtonDestructive from "./src/BpkButtonDestructive";
25
- import BpkButtonLink from "./src/BpkButtonLink";
26
- import BpkButtonLinkOnDark from "./src/BpkButtonLinkOnDark";
27
- import BpkButtonFeatured from "./src/BpkButtonFeatured";
27
+ import { BpkButtonV2 } from "./src/BpkButtonV2/BpkButton";
28
28
  export { BUTTON_TYPES, SIZE_TYPES } from "./src/BpkButtonV2/common-types";
29
29
  export { buttonThemeAttributes, primaryThemeAttributes, primaryOnDarkThemeAttributes, primaryOnLightThemeAttributes, secondaryThemeAttributes, secondaryOnDarkThemeAttributes, featuredThemeAttributes, destructiveThemeAttributes } from "./themeAttributes";
30
30
  export default BpkButton;
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonDestructive.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -29,14 +29,15 @@ const BpkButtonDestructive = props => {
29
29
  classNames.push(className);
30
30
  }
31
31
  const classNamesFinal = classNames.join(' ');
32
- return (
33
- /*#__PURE__*/
32
+ return /*#__PURE__*/_jsx(BpkButtonBase
33
+ // TODO: className to be removed
34
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
35
+ , {
36
+ className: classNamesFinal
34
37
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
35
- _jsx(BpkButtonBase, {
36
- className: classNamesFinal,
37
- ...rest
38
- })
39
- );
38
+ ,
39
+ ...rest
40
+ });
40
41
  };
41
42
  BpkButtonDestructive.propTypes = {
42
43
  ...propTypes
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonFeatured.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -29,14 +29,15 @@ const BpkButtonFeatured = props => {
29
29
  classNames.push(className);
30
30
  }
31
31
  const classNamesFinal = classNames.join(' ');
32
- return (
33
- /*#__PURE__*/
32
+ return /*#__PURE__*/_jsx(BpkButtonBase
33
+ // TODO: className to be removed
34
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
35
+ , {
36
+ className: classNamesFinal
34
37
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
35
- _jsx(BpkButtonBase, {
36
- className: classNamesFinal,
37
- ...rest
38
- })
39
- );
38
+ ,
39
+ ...rest
40
+ });
40
41
  };
41
42
  BpkButtonFeatured.propTypes = {
42
43
  ...propTypes
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonLink.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -33,15 +33,16 @@ const BpkButtonLink = props => {
33
33
  classNames.push(className);
34
34
  }
35
35
  const classNamesFinal = classNames.join(' ');
36
- return (
37
- /*#__PURE__*/
36
+ return /*#__PURE__*/_jsx(BpkButtonBase
37
+ // TODO: className to be removed
38
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
39
+ , {
40
+ className: classNamesFinal,
41
+ large: large
38
42
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
39
- _jsx(BpkButtonBase, {
40
- className: classNamesFinal,
41
- large: large,
42
- ...rest
43
- })
44
- );
43
+ ,
44
+ ...rest
45
+ });
45
46
  };
46
47
  BpkButtonLink.propTypes = {
47
48
  ...propTypes
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonLinkOnDark.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -33,15 +33,16 @@ const BpkButtonLinkOnDark = props => {
33
33
  classNames.push(className);
34
34
  }
35
35
  const classNamesFinal = classNames.join(' ');
36
- return (
37
- /*#__PURE__*/
36
+ return /*#__PURE__*/_jsx(BpkButtonBase
37
+ // TODO: className to be removed
38
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
39
+ , {
40
+ className: classNamesFinal,
41
+ large: large
38
42
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
39
- _jsx(BpkButtonBase, {
40
- className: classNamesFinal,
41
- large: large,
42
- ...rest
43
- })
44
- );
43
+ ,
44
+ ...rest
45
+ });
45
46
  };
46
47
  BpkButtonLinkOnDark.propTypes = {
47
48
  ...propTypes
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase from "./BpkButtonBase";
17
+ */import BpkButtonBase from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
 
20
20
  // TODO: BpkButtonBase has the primary button style as it wasn't removed to
21
21
  // avoid a breaking change in the mixin. Review after this is tested.
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonPrimaryOnDark.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -29,14 +29,15 @@ const BpkButtonPrimaryOnDark = props => {
29
29
  classNames.push(className);
30
30
  }
31
31
  const classNamesFinal = classNames.join(' ');
32
- return (
33
- /*#__PURE__*/
32
+ return /*#__PURE__*/_jsx(BpkButtonBase
33
+ // TODO: className to be removed
34
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
35
+ , {
36
+ className: classNamesFinal
34
37
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
35
- _jsx(BpkButtonBase, {
36
- className: classNamesFinal,
37
- ...rest
38
- })
39
- );
38
+ ,
39
+ ...rest
40
+ });
40
41
  };
41
42
  BpkButtonPrimaryOnDark.propTypes = {
42
43
  ...propTypes
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonPrimaryOnLight.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -29,14 +29,15 @@ const BpkButtonPrimaryOnLight = props => {
29
29
  classNames.push(className);
30
30
  }
31
31
  const classNamesFinal = classNames.join(' ');
32
- return (
33
- /*#__PURE__*/
32
+ return /*#__PURE__*/_jsx(BpkButtonBase
33
+ // TODO: className to be removed
34
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
35
+ , {
36
+ className: classNamesFinal
34
37
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
35
- _jsx(BpkButtonBase, {
36
- className: classNamesFinal,
37
- ...rest
38
- })
39
- );
38
+ ,
39
+ ...rest
40
+ });
40
41
  };
41
42
  BpkButtonPrimaryOnLight.propTypes = {
42
43
  ...propTypes
@@ -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 { defaultProps, propTypes } from "./common-types";
18
- import BpkButtonBase, { cssModules } from "./BpkButtonBase";
17
+ */import BpkButtonBase, { cssModules } from "./BpkButtonBase";
18
+ import { defaultProps, propTypes } from "./common-types";
19
19
  import STYLES from "./BpkButtonSecondary.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
@@ -29,14 +29,14 @@ const BpkButtonSecondary = props => {
29
29
  classNames.push(className);
30
30
  }
31
31
  const classNamesFinal = classNames.join(' ');
32
- return (
33
- /*#__PURE__*/
34
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
35
- _jsx(BpkButtonBase, {
36
- className: classNamesFinal,
37
- ...rest
38
- })
39
- );
32
+ return /*#__PURE__*/_jsx(BpkButtonBase
33
+ // TODO: className to be removed
34
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
35
+ , {
36
+ className: classNamesFinal // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
37
+ ,
38
+ ...rest
39
+ });
40
40
  };
41
41
  BpkButtonSecondary.propTypes = {
42
42
  ...propTypes