@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
@@ -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-popover-portal{z-index:900}@media(max-width: 32rem){.bpk-popover-portal{margin-right:1rem;margin-left:1rem}}.bpk-popover{transition:opacity 200ms ease-in-out;outline:0;opacity:1;border:.0625rem solid #e0e4e9;background-color:#fff;border-radius:.5rem;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-popover{max-width:32rem;transition:opacity 50ms ease-in-out}}.bpk-popover--appear{opacity:0}.bpk-popover--appear-active{opacity:1}.bpk-popover__arrow{position:absolute;width:1.5rem;height:1.5rem;transform:rotate(45deg);border:.0625rem solid rgba(0,0,0,0);background:inherit}.bpk-popover-portal[data-popper-placement=top] .bpk-popover__arrow{bottom:-0.6875rem;border-right-color:#e0e4e9;border-bottom-color:#e0e4e9}.bpk-popover-portal[data-popper-placement=right] .bpk-popover__arrow{left:-0.6875rem;border-bottom-color:#e0e4e9;border-left-color:#e0e4e9}.bpk-popover-portal[data-popper-placement=bottom] .bpk-popover__arrow{top:-0.6875rem;border-top-color:#e0e4e9;border-left-color:#e0e4e9}.bpk-popover-portal[data-popper-placement=left] .bpk-popover__arrow{right:-0.6875rem;border-top-color:#e0e4e9;border-right-color:#e0e4e9}.bpk-popover__arrow[data-hide]{visibility:hidden}.bpk-popover__body--padded{padding:1rem}.bpk-popover__header{display:flex;padding:1rem;justify-content:space-between;box-shadow:0 -1px 0 0 #e0e4e9 inset}.bpk-popover__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}.bpk-popover__close-button{float:right}html[dir=rtl] .bpk-popover__close-button{float:left}.bpk-popover__footer{padding:.5rem 1rem;text-align:right;box-shadow:0 1px 0 0 #e0e4e9 inset}html[dir=rtl] .bpk-popover__footer{text-align:left}
18
+ .bpk-popover-portal{z-index:900}@media(max-width: 32rem){.bpk-popover-portal{margin-right:1rem;margin-left:1rem}}.bpk-popover{transition:opacity 200ms ease-in-out;outline:0;opacity:1;border:.0625rem solid #e0e4e9;background-color:#fff;border-radius:.5rem;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-popover{max-width:32rem;transition:opacity 50ms ease-in-out}}.bpk-popover--appear{opacity:0}.bpk-popover--appear-active{opacity:1}.bpk-popover__arrow{width:1.5rem;height:1.5rem;fill:#fff}.bpk-popover__arrow[data-hide]{visibility:hidden}.bpk-popover__body--padded{padding:1rem}.bpk-popover__header{display:flex;padding:1rem;justify-content:space-between;box-shadow:0 -1px 0 0 #e0e4e9 inset}.bpk-popover__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}.bpk-popover__footer{padding:.5rem 1rem;text-align:right;box-shadow:0 1px 0 0 #e0e4e9 inset}html[dir=rtl] .bpk-popover__footer{text-align:left}
@@ -14,5 +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 { themeAttributes as linkAttributes } from "../../bpk-component-link";
17
+ */
18
+
19
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
+ import { themeAttributes as linkAttributes } from "../../bpk-component-link";
18
21
  export default [...linkAttributes];
@@ -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 { cssModules } from "../../bpk-react-utils";
19
18
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
19
+ import { cssModules } from "../../bpk-react-utils";
20
20
  import { SIZES, ALIGNS } from "./common-types";
21
21
  import STYLES from "./BpkPrice.module.css";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -42,14 +42,20 @@ const BpkPrice = props => {
42
42
  ...rest,
43
43
  children: [/*#__PURE__*/_jsxs("div", {
44
44
  className: getClassName(previousPrice && 'bpk-price__leading', isAlignRight && 'bpk-price__leading--right', leadingClassName),
45
- children: [previousPrice && /*#__PURE__*/_jsx(BpkText, {
45
+ children: [previousPrice && /*#__PURE__*/_jsx(BpkText
46
+ // TODO: className to be removed
47
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
48
+ , {
46
49
  className: getClassName('bpk-price__previous-price'),
47
50
  textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
48
51
  tagName: "span",
49
52
  children: previousPrice
50
53
  }), previousPrice && leadingText && /*#__PURE__*/_jsx(BpkText, {
51
54
  textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
52
- tagName: "span",
55
+ tagName: "span"
56
+ // TODO: className to be removed
57
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
58
+ ,
53
59
  className: getClassName('bpk-price__separator'),
54
60
  children: "\uD802\uDD1F"
55
61
  }), leadingText && /*#__PURE__*/_jsx(BpkText, {
@@ -60,13 +66,19 @@ const BpkPrice = props => {
60
66
  }), /*#__PURE__*/_jsxs("div", {
61
67
  className: getClassName(isAlignRight && 'bpk-price__column-container'),
62
68
  children: [/*#__PURE__*/_jsx(BpkText, {
63
- textStyle: isSmall ? TEXT_STYLES.heading4 : TEXT_STYLES.xxl,
69
+ textStyle: isSmall ? TEXT_STYLES.heading4 : TEXT_STYLES.xxl
70
+ // TODO: className to be removed
71
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
72
+ ,
64
73
  className: getClassName('bpk-price__price', !isAlignRight && 'bpk-price__spacing'),
65
74
  tagName: "span",
66
75
  children: price
67
76
  }), trailingText && /*#__PURE__*/_jsx(BpkText, {
68
77
  textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
69
- tagName: "span",
78
+ tagName: "span"
79
+ // TODO: className to be removed
80
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
81
+ ,
70
82
  className: getClassName('bpk-price__trailing'),
71
83
  children: trailingText
72
84
  })]
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
18
  import clamp from 'lodash.clamp';
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 { RATING_SIZES, RATING_SCALES } from "./common-types";
22
22
  import STYLES from "./BpkRating.module.css";
23
23
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
@@ -79,11 +79,17 @@ const BpkRating = props => {
79
79
  ...rest,
80
80
  children: [/*#__PURE__*/_jsxs(BpkText, {
81
81
  textStyle: valueTextSize,
82
- tagName: "span",
82
+ tagName: "span"
83
+ // TODO: className to be removed
84
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
85
+ ,
83
86
  className: valueStyles,
84
87
  "aria-hidden": "true",
85
88
  children: [adjustedValue, showScale && /*#__PURE__*/_jsxs(BpkText, {
86
- textStyle: scaleTextSize,
89
+ textStyle: scaleTextSize
90
+ // TODO: className to be removed
91
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
92
+ ,
87
93
  className: scaleStyles,
88
94
  tagName: "span",
89
95
  "aria-hidden": "true",
@@ -92,12 +98,18 @@ const BpkRating = props => {
92
98
  }), /*#__PURE__*/_jsxs("div", {
93
99
  className: textWrapperStyles,
94
100
  children: [title && /*#__PURE__*/_jsx(BpkText, {
95
- textStyle: titleTextSize,
101
+ textStyle: titleTextSize
102
+ // TODO: className to be removed
103
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
104
+ ,
96
105
  className: titleStyles,
97
106
  tagName: "span",
98
107
  "aria-hidden": "true",
99
108
  children: title
100
- }), subtitle && /*#__PURE__*/_jsx(BpkText, {
109
+ }), subtitle && /*#__PURE__*/_jsx(BpkText
110
+ // TODO: className to be removed
111
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
112
+ , {
101
113
  className: subtitleStyles,
102
114
  textStyle: subtitleTextSize,
103
115
  tagName: "span",
@@ -66,7 +66,10 @@ class BpkRtlToggle extends Component {
66
66
  const onOrOff = this.state.direction === DIRECTIONS.RTL ? 'off' : 'on';
67
67
  return /*#__PURE__*/_jsxs(BpkButtonLink, {
68
68
  title: "Keyboard Shortcut: ctrl + cmd + r",
69
- onClick: this.toggleRtl,
69
+ onClick: this.toggleRtl
70
+ // TODO: className to be removed
71
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
72
+ ,
70
73
  className: className,
71
74
  children: ["RTL ", onOrOff]
72
75
  });
@@ -16,9 +16,9 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { cssModules } from "../../bpk-react-utils";
20
- import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
21
19
  import { BpkCalendarGrid } from "../../bpk-component-calendar";
20
+ import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
21
+ import { cssModules } from "../../bpk-react-utils";
22
22
  import STYLES from "./BpkScrollableCalendarGrid.module.css";
23
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
24
  const getClassName = cssModules(STYLES);
@@ -32,7 +32,10 @@ const BpkScrollableCalendarGrid = ({
32
32
  const classNames = getClassName('bpk-scrollable-calendar-grid', className);
33
33
  return /*#__PURE__*/_jsxs("div", {
34
34
  className: classNames,
35
- children: [/*#__PURE__*/_jsx(BpkText, {
35
+ children: [/*#__PURE__*/_jsx(BpkText
36
+ // TODO: className to be removed
37
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
38
+ , {
36
39
  className: getClassName('bpk-scrollable-calendar-grid__title'),
37
40
  tagName: "h1",
38
41
  textStyle: TEXT_STYLES.heading4,
@@ -18,10 +18,10 @@
18
18
 
19
19
  import { useRef, useState, useMemo, useEffect } from 'react';
20
20
  import { startOfDay, startOfMonth } from 'date-fns';
21
- import { VariableSizeList as List } from 'react-window';
22
21
  import AutoSizer from 'react-virtualized-auto-sizer';
23
- import { cssModules } from "../../bpk-react-utils";
22
+ import { VariableSizeList as List } from 'react-window';
24
23
  import { CALENDAR_SELECTION_TYPE, DateUtils } from "../../bpk-component-calendar";
24
+ import { cssModules } from "../../bpk-react-utils";
25
25
  import BpkScrollableCalendarGrid from "./BpkScrollableCalendarGrid";
26
26
  import { getMonthsArray, getMonthItemHeights } from "./utils";
27
27
  import STYLES from "./BpkScrollableCalendarGridList.module.css";
@@ -82,7 +82,10 @@ const BpkScrollableCalendarGridList = props => {
82
82
  month: months[index],
83
83
  focusedDate: focusedDate,
84
84
  preventKeyboardFocus: rest.preventKeyboardFocus,
85
- "aria-hidden": index !== 1,
85
+ "aria-hidden": index !== 1
86
+ // TODO: className to be removed
87
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
88
+ ,
86
89
  className: getClassName('bpk-scrollable-calendar-grid-list__item')
87
90
  })
88
91
  });
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { cssModules } from "../../bpk-react-utils";
20
19
  import BpkText from "../../bpk-component-text";
20
+ import { cssModules } from "../../bpk-react-utils";
21
21
  import STYLES from "./BpkSectionHeader.module.css";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  const getClassName = cssModules(STYLES);
@@ -35,10 +35,16 @@ const BpkSectionHeader = ({
35
35
  children: [/*#__PURE__*/_jsxs("div", {
36
36
  className: getClassName('bpk-section-header__title-description', `bpk-section-header__title-description--${type}`),
37
37
  children: [/*#__PURE__*/_jsx(BpkText, {
38
- tagName: "h2",
38
+ tagName: "h2"
39
+ // TODO: className to be removed
40
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
41
+ ,
39
42
  className: getClassName('bpk-section-header__title'),
40
43
  children: title
41
- }), description && /*#__PURE__*/_jsx(BpkText, {
44
+ }), description && /*#__PURE__*/_jsx(BpkText
45
+ // TODO: className to be removed
46
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
47
+ , {
42
48
  className: getClassName('bpk-section-header__description'),
43
49
  children: description
44
50
  })]
@@ -15,7 +15,7 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import BpkSectionList from "./src/BpkSectionList";
18
- import BpkSectionListSection from "./src/BpkSectionListSection";
19
18
  import BpkSectionListItem from "./src/BpkSectionListItem";
19
+ import BpkSectionListSection from "./src/BpkSectionListSection";
20
20
  export default BpkSectionList;
21
21
  export { BpkSectionListSection, BpkSectionListItem };
@@ -15,9 +15,9 @@
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
- import BpkLargeChevronRightIcon from "../../bpk-component-icon/lg/chevron-right";
20
18
  import { withRtlSupport } from "../../bpk-component-icon";
19
+ import BpkLargeChevronRightIcon from "../../bpk-component-icon/lg/chevron-right";
20
+ import { cssModules } from "../../bpk-react-utils";
21
21
  import STYLES from "./BpkSectionListItem.module.css";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  const BpkLargeChevronRightIconWithRtlSupport = withRtlSupport(BpkLargeChevronRightIcon);
@@ -43,7 +43,10 @@ const BpkSectionListItem = props => {
43
43
  onClick: onClick,
44
44
  className: classNames.join(' '),
45
45
  ...rest,
46
- children: [children, /*#__PURE__*/_jsx(BpkLargeChevronRightIconWithRtlSupport, {
46
+ children: [children, /*#__PURE__*/_jsx(BpkLargeChevronRightIconWithRtlSupport
47
+ // TODO: className to be removed
48
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
49
+ , {
47
50
  className: getClassName('bpk-section-list-item__chevron')
48
51
  })]
49
52
  })
@@ -58,7 +61,10 @@ const BpkSectionListItem = props => {
58
61
  onClick: onClick,
59
62
  className: classNames.join(' '),
60
63
  ...rest,
61
- children: [children, /*#__PURE__*/_jsx(BpkLargeChevronRightIconWithRtlSupport, {
64
+ children: [children, /*#__PURE__*/_jsx(BpkLargeChevronRightIconWithRtlSupport
65
+ // TODO: className to be removed
66
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
67
+ , {
62
68
  className: getClassName('bpk-section-list-item__chevron')
63
69
  })]
64
70
  })
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
18
  import { Children } from 'react';
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 STYLES from "./BpkSectionListSection.module.css";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  const getClassName = cssModules(STYLES);
@@ -44,7 +44,10 @@ const BpkSlider = props => {
44
44
  ...rest,
45
45
  withTracks: true,
46
46
  snapDragDisabled: false,
47
- invert: invert,
47
+ invert: invert
48
+ // TODO: className to be removed
49
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
50
+ ,
48
51
  className: classNames.join(' '),
49
52
  thumbClassName: thumbClassNames.join(' '),
50
53
  thumbActiveClassName: getClassName('bpk-slider__handle--active'),
@@ -14,9 +14,9 @@
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 BpkSpinner from "./src/BpkSpinner";
18
- import SPINNER_TYPES from "./src/spinnerTypes";
17
+ */import BpkExtraLargeSpinner from "./src/BpkExtraLargeSpinner";
19
18
  import BpkLargeSpinner from "./src/BpkLargeSpinner";
20
- import BpkExtraLargeSpinner from "./src/BpkExtraLargeSpinner";
19
+ import BpkSpinner from "./src/BpkSpinner";
20
+ import SPINNER_TYPES from "./src/spinnerTypes";
21
21
  import themeAttributes from "./src/themeAttributes";
22
22
  export { BpkSpinner, BpkLargeSpinner, BpkExtraLargeSpinner, SPINNER_TYPES, themeAttributes };
@@ -86,10 +86,13 @@ const BpkExtraLargeSpinner = props => {
86
86
  ...rest
87
87
  } = props;
88
88
  const classNames = getClassName('bpk-spinner', 'bpk-spinner--extra-large', `bpk-spinner--${type}`, className);
89
-
90
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
91
- return /*#__PURE__*/_jsx(XlSpinner, {
92
- className: classNames,
89
+ return /*#__PURE__*/_jsx(XlSpinner
90
+ // TODO: className to be removed
91
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
92
+ , {
93
+ className: classNames
94
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
95
+ ,
93
96
  ...rest
94
97
  });
95
98
  };
@@ -87,10 +87,13 @@ const BpkLargeSpinner = props => {
87
87
  ...rest
88
88
  } = props;
89
89
  const classNames = getClassName('bpk-spinner', 'bpk-spinner--large', `bpk-spinner--${type}`, alignToButton && 'bpk-spinner--align-to-large-button', className);
90
-
91
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
92
- return /*#__PURE__*/_jsx(LgSpinner, {
93
- className: classNames,
90
+ return /*#__PURE__*/_jsx(LgSpinner
91
+ // TODO: className to be removed
92
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
93
+ , {
94
+ className: classNames
95
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
96
+ ,
94
97
  ...rest
95
98
  });
96
99
  };
@@ -74,10 +74,13 @@ const BpkSpinner = props => {
74
74
  ...rest
75
75
  } = props;
76
76
  const classNames = getClassName('bpk-spinner', `bpk-spinner--${type}`, alignToButton && 'bpk-spinner--align-to-button', className);
77
-
78
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
79
- return /*#__PURE__*/_jsx(SmSpinner, {
80
- className: classNames,
77
+ return /*#__PURE__*/_jsx(SmSpinner
78
+ // TODO: className to be removed
79
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
80
+ , {
81
+ className: classNames
82
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
83
+ ,
81
84
  ...rest
82
85
  });
83
86
  };
@@ -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 { Component } from 'react';
18
- import PropTypes from 'prop-types';
17
+ */import PropTypes from 'prop-types';
18
+ import { Component } from 'react';
19
19
  import BpkInput from "../../bpk-component-input";
20
20
  import { cssModules } from "../../bpk-react-utils";
21
21
  import STYLES from "./BpkInputField.module.css";
@@ -14,10 +14,10 @@
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 { Component } from 'react';
18
- import PropTypes from 'prop-types';
19
- import { cssModules } from "../../bpk-react-utils";
17
+ */import PropTypes from 'prop-types';
18
+ import { Component } from 'react';
20
19
  import { INPUT_TYPES } from "../../bpk-component-input";
20
+ import { cssModules } from "../../bpk-react-utils";
21
21
  import InputField from "./BpkInputField";
22
22
  import STYLES from "./BpkSplitInput.module.css";
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -14,11 +14,11 @@
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 BpkStar, { BpkStarNonRtl, STAR_TYPES } from "./src/BpkStar";
18
- import BpkInteractiveStar from "./src/BpkInteractiveStar";
19
- import BpkStarRating, { ROUNDING_TYPES } from "./src/BpkStarRating";
17
+ */import BpkInteractiveStar from "./src/BpkInteractiveStar";
20
18
  import BpkInteractiveStarRating from "./src/BpkInteractiveStarRating";
21
- import withInteractiveStarRatingState from "./src/withInteractiveStarRatingState";
19
+ import BpkStar, { BpkStarNonRtl, STAR_TYPES } from "./src/BpkStar";
20
+ import BpkStarRating, { ROUNDING_TYPES } from "./src/BpkStarRating";
22
21
  import themeAttributes from "./src/themeAttributes";
22
+ import withInteractiveStarRatingState from "./src/withInteractiveStarRatingState";
23
23
  export { BpkStar, BpkStarNonRtl, STAR_TYPES, ROUNDING_TYPES, BpkInteractiveStar, BpkInteractiveStarRating, withInteractiveStarRatingState, themeAttributes };
24
24
  export default BpkStarRating;
@@ -44,9 +44,13 @@ const BpkInteractiveStar = props => {
44
44
  className: buttonClassNames,
45
45
  "aria-pressed": selected,
46
46
  type: "button",
47
- children: /*#__PURE__*/_jsx(BpkStarNonRtl, {
47
+ children: /*#__PURE__*/_jsx(BpkStarNonRtl
48
+ // TODO: className to be removed
49
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
50
+ , {
48
51
  className: iconClassNames,
49
- type: type,
52
+ type: type
53
+ /* $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md */,
50
54
  ...rest
51
55
  })
52
56
  });
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
18
  import { cssModules } from "../../bpk-react-utils";
19
- import { STAR_TYPES } from "./BpkStar";
20
19
  import BpkInteractiveStar from "./BpkInteractiveStar";
20
+ import { STAR_TYPES } from "./BpkStar";
21
21
  import STYLES from "./BpkStarRating.module.css";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
23
23
  const getClassName = cssModules(STYLES);
@@ -15,13 +15,13 @@
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 SmallIcon from "../../bpk-component-icon/sm/star";
18
+ import { withRtlSupport } from "../../bpk-component-icon";
19
19
  import LargeIcon from "../../bpk-component-icon/lg/star";
20
- import OutlineSmallIcon from "../../bpk-component-icon/sm/star-outline";
20
+ import HalfLargeIcon from "../../bpk-component-icon/lg/star-half";
21
21
  import OutlineLargeIcon from "../../bpk-component-icon/lg/star-outline";
22
+ import SmallIcon from "../../bpk-component-icon/sm/star";
22
23
  import HalfSmallIcon from "../../bpk-component-icon/sm/star-half";
23
- import HalfLargeIcon from "../../bpk-component-icon/lg/star-half";
24
- import { withRtlSupport } from "../../bpk-component-icon";
24
+ import OutlineSmallIcon from "../../bpk-component-icon/sm/star-outline";
25
25
  import { cssModules } from "../../bpk-react-utils";
26
26
  import STYLES from "./BpkStar.module.css";
27
27
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -56,23 +56,30 @@ const BpkStar = props => {
56
56
  _jsx("span", {
57
57
  className: containerClassNames,
58
58
  ...rest,
59
- children: /*#__PURE__*/_jsx(HalfIcon, {
59
+ children: /*#__PURE__*/_jsx(HalfIcon
60
+ // TODO: className to be removed
61
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
62
+ , {
60
63
  className: halfIconClassNames
61
64
  })
62
65
  })
63
66
  );
64
67
  }
65
- return type === STAR_TYPES.FULL ?
66
- /*#__PURE__*/
67
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
68
- _jsx(Icon, {
69
- className: iconClassNames,
68
+ return type === STAR_TYPES.FULL ? /*#__PURE__*/_jsx(Icon
69
+ // TODO: className to be removed
70
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
71
+ , {
72
+ className: iconClassNames
73
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
74
+ ,
70
75
  ...rest
71
- }) :
72
- /*#__PURE__*/
73
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
74
- _jsx(OutlineIcon, {
75
- className: iconClassNames,
76
+ }) : /*#__PURE__*/_jsx(OutlineIcon
77
+ // TODO: className to be removed
78
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
79
+ , {
80
+ className: iconClassNames
81
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
82
+ ,
76
83
  ...rest
77
84
  });
78
85
  };
@@ -17,9 +17,10 @@
17
17
  */
18
18
 
19
19
  import { useState } from 'react';
20
- import { cssModules } from "../../bpk-react-utils";
20
+
21
21
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
22
  import SwapVertical from "../../bpk-component-icon/sm/swap--vertical";
23
+ import { cssModules } from "../../bpk-react-utils";
23
24
  import STYLES from "./BpkSwapButton.module.css";
24
25
  import { jsx as _jsx } from "react/jsx-runtime";
25
26
  const getClassName = cssModules(STYLES);
@@ -15,9 +15,9 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import BpkTable from "./src/BpkTable";
18
- import BpkTableHead from "./src/BpkTableHead";
19
18
  import BpkTableBody from "./src/BpkTableBody";
20
- import BpkTableRow from "./src/BpkTableRow";
21
19
  import BpkTableCell from "./src/BpkTableCell";
20
+ import BpkTableHead from "./src/BpkTableHead";
22
21
  import BpkTableHeadCell from "./src/BpkTableHeadCell";
22
+ import BpkTableRow from "./src/BpkTableRow";
23
23
  export { BpkTable, BpkTableHead, BpkTableBody, BpkTableRow, BpkTableCell, BpkTableHeadCell };
@@ -57,10 +57,15 @@ const BpkText = ({
57
57
  ...rest
58
58
  }) => {
59
59
  const classNames = getClassName('bpk-text', `bpk-text--${textStyle}`, className);
60
- return /*#__PURE__*/_jsx(TagName, {
61
- className: classNames,
62
- ...rest,
63
- children: children
64
- });
60
+ return (
61
+ /*#__PURE__*/
62
+ // Allowed, TagName is always a dom element.
63
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
64
+ _jsx(TagName, {
65
+ className: classNames,
66
+ ...rest,
67
+ children: children
68
+ })
69
+ );
65
70
  };
66
71
  export default BpkText;
@@ -81,7 +81,10 @@ class BpkThemeToggle extends Component {
81
81
  } = this.props;
82
82
  return /*#__PURE__*/_jsxs("div", {
83
83
  ...rest,
84
- children: [/*#__PURE__*/_jsx(BpkLabel, {
84
+ children: [/*#__PURE__*/_jsx(BpkLabel
85
+ // TODO: className to be removed
86
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
87
+ , {
85
88
  className: getClassName('bpk-theme-toggle__label'),
86
89
  htmlFor: inputId,
87
90
  children: "Change theme"
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { Component } from 'react';
20
19
  import PropTypes from 'prop-types';
20
+ import { Component } from 'react';
21
21
  import { wrapDisplayName } from "../../bpk-react-utils";
22
22
  import { getHtmlElement, THEME_CHANGE_EVENT } from "./utils";
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -137,7 +137,10 @@ class BpkTooltipPortal extends Component {
137
137
  onOpen: this.onOpen,
138
138
  onClose: this.closeTooltip,
139
139
  style: portalStyle,
140
- renderTarget: renderTarget,
140
+ renderTarget: renderTarget
141
+ // TODO: className to be removed
142
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
143
+ ,
141
144
  className: classNames.join(' '),
142
145
  children: /*#__PURE__*/_jsx(BpkTooltip, {
143
146
  padded: padded,
@@ -237,4 +237,13 @@
237
237
  color: $bpk-text-disabled-day;
238
238
  cursor: not-allowed;
239
239
  }
240
+
241
+ &--icon-only {
242
+ padding-inline-end: bpk-spacing-md();
243
+ padding-inline-start: bpk-spacing-md();
244
+
245
+ &__leading-accessory-view {
246
+ @include bpk-margin-trailing(0);
247
+ }
248
+ }
240
249
  }
@@ -16,16 +16,16 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import wrapDisplayName from "./src/wrapDisplayName";
19
+ import { BpkDialogWrapper } from "./src/BpkDialogWrapper/BpkDialogWrapper";
20
20
  import Portal from "./src/Portal";
21
21
  import TransitionInitialMount from "./src/TransitionInitialMount";
22
22
  import cssModules from "./src/cssModules";
23
23
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
24
  import deprecated from "./src/deprecated";
25
25
  import { isDeviceIphone, isDeviceIpad, isDeviceIos } from "./src/deviceDetection";
26
- import withDefaultProps from "./src/withDefaultProps";
27
26
  import isRTL from "./src/isRTL";
28
- import { BpkDialogWrapper } from "./src/BpkDialogWrapper/BpkDialogWrapper";
27
+ import withDefaultProps from "./src/withDefaultProps";
28
+ import wrapDisplayName from "./src/wrapDisplayName";
29
29
  export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, BpkDialogWrapper };
30
30
  export default {
31
31
  Portal,
@@ -35,7 +35,10 @@ const withDefaultProps = (WrappedComponent, defaultProps) => {
35
35
  if (innerClassName) {
36
36
  classNames.push(innerClassName);
37
37
  }
38
- return /*#__PURE__*/_jsx(WrappedComponent, {
38
+ return /*#__PURE__*/_jsx(WrappedComponent
39
+ // General HOC difficult/impossible to remove
40
+ // eslint-disable-next-line @skyscanner/rules/forbid-component-props
41
+ , {
39
42
  className: classNames.join(' '),
40
43
  ...defaultRest,
41
44
  ...rest,