@skyscanner/backpack-web 18.2.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-animate-height/README.md +1 -1
- package/bpk-animate-height/src/AnimateHeight.js +1 -1
- package/bpk-component-accordion/README.md +0 -3
- package/bpk-component-accordion/src/BpkAccordion.js +1 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +3 -2
- package/bpk-component-accordion/src/withAccordionItemState.js +2 -1
- package/bpk-component-accordion/src/withSingleItemAccordionState.js +2 -8
- package/bpk-component-aria-live/README.md +0 -1
- package/bpk-component-aria-live/src/BpkAriaLive.js +0 -1
- package/bpk-component-autosuggest/README.md +1 -1
- package/bpk-component-autosuggest/src/BpkAutosuggest.js +0 -1
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +1 -1
- package/bpk-component-badge/README.md +0 -1
- package/bpk-component-badge/src/BpkBadge.js +0 -1
- package/bpk-component-banner-alert/README.md +2 -3
- package/bpk-component-banner-alert/src/AnimateAndFade.js +2 -1
- package/bpk-component-banner-alert/src/BpkBannerAlert.js +1 -3
- package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +0 -1
- package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +1 -1
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +1 -1
- package/bpk-component-banner-alert/src/withBannerAlertState.js +2 -1
- package/bpk-component-barchart/README.md +0 -1
- package/bpk-component-barchart/src/BpkBarchart.js +1 -1
- package/bpk-component-barchart/src/BpkBarchartBar.js +0 -1
- package/bpk-component-barchart/src/BpkBarchartBars.js +0 -1
- package/bpk-component-barchart/src/BpkBarchartDefs.js +0 -2
- package/bpk-component-barchart/src/BpkChartAxis.js +1 -1
- package/bpk-component-barchart/src/BpkChartDataTable.js +0 -1
- package/bpk-component-barchart/src/BpkChartGridLines.js +0 -1
- package/bpk-component-barchart/src/BpkChartMargin.js +1 -1
- package/bpk-component-blockquote/README.md +0 -1
- package/bpk-component-blockquote/src/BpkBlockquote.js +0 -1
- package/bpk-component-breadcrumb/README.md +1 -1
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +5 -4
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +1 -1
- package/bpk-component-breakpoint/README.md +0 -1
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +1 -1
- package/bpk-component-button/README.md +0 -1
- package/bpk-component-button/src/BpkButton.js +0 -1
- package/bpk-component-button/src/BpkButtonBase.js +1 -3
- package/bpk-component-button/src/BpkButtonDestructive.js +1 -3
- package/bpk-component-button/src/BpkButtonFeatured.js +1 -3
- package/bpk-component-button/src/BpkButtonLink.js +1 -7
- package/bpk-component-button/src/BpkButtonLinkOnDark.js +1 -7
- package/bpk-component-button/src/BpkButtonOutline.js +1 -3
- package/bpk-component-button/src/BpkButtonPrimary.js +1 -3
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +1 -3
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +1 -3
- package/bpk-component-button/src/BpkButtonSecondary.js +1 -3
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +1 -3
- package/bpk-component-button/src/commonButtonTests.js +0 -1
- package/bpk-component-calendar/README.md +1 -1
- package/bpk-component-calendar/src/BpkCalendarContainer.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarDate.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarNav.js +0 -1
- package/bpk-component-calendar/src/Week.js +1 -1
- package/bpk-component-calendar/src/composeCalendar.js +0 -1
- package/bpk-component-card/README.md +0 -2
- package/bpk-component-card/src/BpkCard.js +1 -1
- package/bpk-component-card/src/BpkDividedCard.js +0 -1
- package/bpk-component-checkbox/README.md +0 -1
- package/bpk-component-checkbox/src/BpkCheckbox.js +1 -1
- package/bpk-component-chip/README.md +0 -1
- package/bpk-component-chip/src/BpkDismissibleChip.js +0 -2
- package/bpk-component-chip/src/BpkDropdownChip.js +0 -2
- package/bpk-component-chip/src/BpkSelectableChip.js +1 -1
- package/bpk-component-close-button/README.md +0 -1
- package/bpk-component-close-button/src/BpkCloseButton.js +1 -1
- package/bpk-component-code/README.md +0 -1
- package/bpk-component-code/src/BpkCode.js +1 -1
- package/bpk-component-code/src/BpkCodeBlock.js +1 -1
- package/bpk-component-content-cards/README.md +0 -1
- package/bpk-component-content-cards/src/BpkContentCard.js +0 -2
- package/bpk-component-content-cards/src/BpkContentCards.js +0 -2
- package/bpk-component-datatable/README.md +3 -4
- package/bpk-component-datatable/src/BpkDataTable.js +3 -2
- package/bpk-component-datatable/src/BpkDataTableColumn.js +0 -1
- package/bpk-component-datatable/src/BpkDataTableHeader.js +2 -2
- package/bpk-component-datepicker/README.md +2 -2
- package/bpk-component-datepicker/src/BpkDatepicker.js +2 -2
- package/bpk-component-description-list/README.md +0 -1
- package/bpk-component-description-list/src/ComponentFactory.js +0 -1
- package/bpk-component-dialog/README.md +1 -1
- package/bpk-component-dialog/src/BpkDialog.js +0 -2
- package/bpk-component-dialog/src/BpkDialogInner.js +0 -2
- package/bpk-component-drawer/README.md +1 -1
- package/bpk-component-drawer/src/BpkDrawer.js +1 -1
- package/bpk-component-drawer/src/BpkDrawerContent.js +1 -1
- package/bpk-component-fieldset/README.md +1 -1
- package/bpk-component-fieldset/src/BpkFieldset.js +2 -1
- package/bpk-component-flare/README.md +0 -1
- package/bpk-component-flare/src/BpkContentBubble.js +0 -1
- package/bpk-component-flare/src/BpkFlareBar.js +0 -1
- package/bpk-component-floating-notification/README.md +0 -1
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +1 -1
- package/bpk-component-form-validation/README.md +0 -1
- package/bpk-component-form-validation/src/BpkFormValidation.js +0 -1
- package/bpk-component-graphic-promotion/README.md +0 -1
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +4 -4
- package/bpk-component-grid/README.md +0 -1
- package/bpk-component-grid/src/BpkGridColumn.js +0 -1
- package/bpk-component-grid/src/BpkGridContainer.js +0 -1
- package/bpk-component-grid/src/BpkGridRow.js +0 -1
- package/bpk-component-grid-toggle/README.md +0 -1
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +2 -2
- package/bpk-component-horizontal-nav/README.md +1 -1
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +4 -3
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -1
- package/bpk-component-icon/README.md +0 -3
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +0 -1
- package/bpk-component-icon/src/withAlignment.js +0 -2
- package/bpk-component-icon/src/withDescription.js +1 -1
- package/bpk-component-image/README.md +0 -1
- package/bpk-component-image/src/BpkBackgroundImage.js +2 -1
- package/bpk-component-image/src/BpkImage.js +2 -1
- package/bpk-component-image/src/withLazyLoading.js +9 -5
- package/bpk-component-image/src/withLoadingBehavior.js +6 -5
- package/bpk-component-infinite-scroll/README.md +0 -2
- package/bpk-component-infinite-scroll/src/withInfiniteScroll-test.flow.js +3 -3
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +2 -6
- package/bpk-component-input/README.md +0 -2
- package/bpk-component-input/src/BpkClearButton.js +0 -1
- package/bpk-component-input/src/BpkInput.js +1 -1
- package/bpk-component-input/src/withOpenEvents.js +2 -2
- package/bpk-component-label/README.md +0 -1
- package/bpk-component-label/src/BpkLabel.js +1 -1
- package/bpk-component-link/README.md +0 -1
- package/bpk-component-link/src/BpkButtonLink.js +1 -1
- package/bpk-component-link/src/BpkLink.js +1 -1
- package/bpk-component-list/README.md +0 -1
- package/bpk-component-list/src/BpkList.js +1 -1
- package/bpk-component-list/src/BpkListItem.js +1 -1
- package/bpk-component-loading-button/README.md +0 -1
- package/bpk-component-loading-button/src/BpkLoadingButton.js +1 -1
- package/bpk-component-map/README.md +0 -3
- package/bpk-component-map/src/BpkBasicMapMarker.js +1 -1
- package/bpk-component-map/src/BpkIconMarker.js +1 -1
- package/bpk-component-map/src/BpkIconMarkerBackground.js +0 -2
- package/bpk-component-map/src/BpkMap.js +2 -1
- package/bpk-component-map/src/BpkOverlayView.js +1 -1
- package/bpk-component-map/src/BpkPriceMarker.js +0 -1
- package/bpk-component-map/src/DefaultLoadingElement.js +0 -2
- package/bpk-component-map/src/withGoogleMapsScript.js +1 -1
- package/bpk-component-mobile-scroll-container/README.md +0 -1
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +2 -1
- package/bpk-component-modal/README.md +1 -1
- package/bpk-component-modal/src/BpkModal.js +0 -1
- package/bpk-component-modal/src/BpkModalInner.js +1 -1
- package/bpk-component-navigation-bar/README.md +0 -3
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +3 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +1 -1
- package/bpk-component-nudger/README.md +2 -2
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +0 -1
- package/bpk-component-nudger/src/BpkNudger.js +0 -1
- package/bpk-component-overlay/README.md +0 -1
- package/bpk-component-overlay/src/BpkOverlay.js +1 -1
- package/bpk-component-page-indicator/README.md +0 -1
- package/bpk-component-page-indicator/src/BpkPageIndicator.js +0 -1
- package/bpk-component-page-indicator/src/NavButton.js +0 -1
- package/bpk-component-pagination/README.md +0 -1
- package/bpk-component-pagination/src/BpkPagination.js +0 -1
- package/bpk-component-pagination/src/BpkPaginationBreak.js +0 -1
- package/bpk-component-pagination/src/BpkPaginationList.js +0 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +0 -1
- package/bpk-component-pagination/src/BpkPaginationPage.js +0 -1
- package/bpk-component-panel/README.md +0 -1
- package/bpk-component-panel/src/BpkPanel.js +0 -1
- package/bpk-component-phone-input/README.md +1 -1
- package/bpk-component-phone-input/src/BpkPhoneInput.js +0 -1
- package/bpk-component-popover/README.md +1 -1
- package/bpk-component-popover/src/BpkPopover.js +1 -1
- package/bpk-component-popover/src/BpkPopoverPortal.js +4 -3
- package/bpk-component-price/README.md +4 -4
- package/bpk-component-price/src/BpkPrice.js +60 -25
- package/bpk-component-price/src/BpkPrice.module.scss +18 -5
- package/bpk-component-progress/README.md +1 -1
- package/bpk-component-progress/src/BpkProgress.js +1 -1
- package/bpk-component-radio/README.md +0 -1
- package/bpk-component-radio/src/BpkRadio.js +1 -1
- package/bpk-component-rating/README.md +0 -1
- package/bpk-component-rating/src/BpkRating.js +1 -1
- package/bpk-component-rtl-toggle/README.md +0 -1
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +2 -2
- package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +1 -1
- package/bpk-component-scrollable-calendar/README.md +1 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +1 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +0 -2
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +2 -2
- package/bpk-component-section-list/README.md +0 -1
- package/bpk-component-section-list/src/BpkSectionList.js +1 -1
- package/bpk-component-section-list/src/BpkSectionListItem.js +1 -1
- package/bpk-component-section-list/src/BpkSectionListSection.js +3 -2
- package/bpk-component-select/README.md +0 -2
- package/bpk-component-select/src/BpkSelect.js +3 -2
- package/bpk-component-skip-link/README.md +0 -1
- package/bpk-component-skip-link/src/BpkSkipLink.js +0 -1
- package/bpk-component-slider/README.md +1 -1
- package/bpk-component-slider/src/BpkSlider.js +0 -1
- package/bpk-component-spinner/README.md +0 -1
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +0 -1
- package/bpk-component-spinner/src/BpkLargeSpinner.js +0 -1
- package/bpk-component-spinner/src/BpkSpinner.js +0 -1
- package/bpk-component-split-input/README.md +0 -1
- package/bpk-component-split-input/src/BpkInputField.js +1 -1
- package/bpk-component-split-input/src/BpkSplitInput.js +1 -1
- package/bpk-component-star-rating/README.md +0 -1
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +0 -1
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +0 -1
- package/bpk-component-star-rating/src/BpkStar.js +0 -1
- package/bpk-component-star-rating/src/BpkStarRating.js +0 -1
- package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +2 -1
- package/bpk-component-switch/README.md +0 -1
- package/bpk-component-switch/src/BpkSwitch.js +1 -1
- package/bpk-component-table/README.md +0 -1
- package/bpk-component-table/src/BpkTable.js +1 -1
- package/bpk-component-table/src/BpkTableBody.js +1 -1
- package/bpk-component-table/src/BpkTableCell.js +1 -1
- package/bpk-component-table/src/BpkTableHead.js +1 -1
- package/bpk-component-table/src/BpkTableHeadCell.js +1 -1
- package/bpk-component-table/src/BpkTableRow.js +1 -1
- package/bpk-component-text/README.md +0 -3
- package/bpk-component-text/src/BpkText.js +1 -1
- package/bpk-component-textarea/README.md +0 -1
- package/bpk-component-textarea/src/BpkTextarea.js +0 -1
- package/bpk-component-theme-toggle/README.md +0 -2
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +2 -2
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
- package/bpk-component-ticket/README.md +0 -1
- package/bpk-component-ticket/src/BpkTicket.js +1 -1
- package/bpk-component-tooltip/README.md +1 -1
- package/bpk-component-tooltip/src/BpkTooltip.js +1 -1
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +5 -4
- package/bpk-react-utils/README.md +1 -7
- package/bpk-react-utils/src/TransitionInitialMount.js +1 -1
- package/bpk-react-utils/src/withDefaultProps.js +1 -1
- package/bpk-scrim-utils/src/BpkScrim.js +0 -1
- package/bpk-scrim-utils/src/withScrim.js +1 -1
- package/bpk-theming/src/BpkThemeProvider.js +1 -1
- package/package.json +2 -2
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
/* @flow strict */
|
|
19
19
|
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
|
-
import
|
|
21
|
+
import type { Element } from 'react';
|
|
22
|
+
import { cloneElement } from 'react';
|
|
22
23
|
|
|
23
24
|
import { cssModules } from '../../bpk-react-utils';
|
|
24
25
|
|
|
@@ -85,7 +86,7 @@ const BpkSelect = (props: Props) => {
|
|
|
85
86
|
if (image) {
|
|
86
87
|
return (
|
|
87
88
|
<div className={getClassName('bpk-select-wrapper', wrapperClassName)}>
|
|
88
|
-
{
|
|
89
|
+
{cloneElement(image, {
|
|
89
90
|
'aria-hidden': true,
|
|
90
91
|
className: getClassName(
|
|
91
92
|
'bpk-select-wrapper__image',
|
|
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
import React from 'react';
|
|
13
12
|
import BpkSkipLink from '@skyscanner/backpack-web/bpk-component-skip-link';
|
|
14
13
|
|
|
15
14
|
export default () => <BpkSkipLink href="#main" label="Skip to main content" />;
|
|
@@ -9,7 +9,7 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
import
|
|
12
|
+
import { Component } from 'react';
|
|
13
13
|
import BpkSlider from '@skyscanner/backpack-web/bpk-component-slider';
|
|
14
14
|
|
|
15
15
|
const Slider = () => (
|
|
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
import React from 'react';
|
|
13
12
|
import { BpkSpinner, BpkLargeSpinner, BpkExtraLargeSpinner, SPINNER_TYPES } from '@skyscanner/backpack-web/bpk-component-spinner';
|
|
14
13
|
|
|
15
14
|
export default () => (
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
/* @flow strict */
|
|
20
20
|
|
|
21
21
|
import PropTypes from 'prop-types';
|
|
22
|
-
import
|
|
22
|
+
import type { ComponentType } from 'react';
|
|
23
|
+
import { Component } from 'react';
|
|
23
24
|
|
|
24
25
|
import { wrapDisplayName } from '../../bpk-react-utils';
|
|
25
26
|
|
|
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```javascript
|
|
12
|
-
import React from 'react';
|
|
13
12
|
import BpkText, { TEXT_STYLES } from '@skyscanner/backpack-web/bpk-component-text';
|
|
14
13
|
|
|
15
14
|
export default () => (
|
|
@@ -22,7 +21,6 @@ export default () => (
|
|
|
22
21
|
When using the same style in many places repeating the `textStyle` and `tagName` props can become tedious in this case you can use `withDefaultProps` from `bpk-react-utils`.
|
|
23
22
|
|
|
24
23
|
```javascript
|
|
25
|
-
import React from 'react';
|
|
26
24
|
import BpkText from '@skyscanner/backpack-web/bpk-component-text';
|
|
27
25
|
import { withDefaultProps } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
28
26
|
|
|
@@ -53,7 +51,6 @@ export default () => (
|
|
|
53
51
|
Heading `textStyle` should not be confused with heading `tagName` that provide structure for SEO and Accessibility. The weight which is normally applied using `tagName` will be overwritten by the weight defined in the `textStyle`.
|
|
54
52
|
|
|
55
53
|
```javascript
|
|
56
|
-
import React from 'react';
|
|
57
54
|
import BpkText, { TEXT_STYLES } from '@skyscanner/backpack-web/bpk-component-text';
|
|
58
55
|
|
|
59
56
|
export default () => (
|
|
@@ -9,7 +9,6 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
import React from 'react';
|
|
13
12
|
import BpkThemeToggle from '@skyscanner/backpack-web/bpk-component-theme-toggle';
|
|
14
13
|
|
|
15
14
|
export default () => (
|
|
@@ -20,7 +19,6 @@ export default () => (
|
|
|
20
19
|
## HOC usage
|
|
21
20
|
|
|
22
21
|
```js
|
|
23
|
-
import React from 'react';
|
|
24
22
|
import { updateOnThemeChange } from '@skyscanner/backpack-web/bpk-component-theme-toggle';
|
|
25
23
|
import BpkThemeProvider from '@skyscanner/backpack-web/bpk-theming';
|
|
26
24
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import
|
|
19
|
+
import { Component } from 'react';
|
|
20
20
|
|
|
21
21
|
import BpkLabel from '../../bpk-component-label';
|
|
22
22
|
import BpkSelect from '../../bpk-component-select';
|
|
@@ -37,7 +37,7 @@ const setTheme = (theme) => {
|
|
|
37
37
|
);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
class BpkThemeToggle extends
|
|
40
|
+
class BpkThemeToggle extends Component {
|
|
41
41
|
constructor(props) {
|
|
42
42
|
super(props);
|
|
43
43
|
this.state = {
|
|
@@ -9,7 +9,7 @@ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a comp
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```js
|
|
12
|
-
import
|
|
12
|
+
import { useRef } from 'react';
|
|
13
13
|
import BpkText from '@skyscanner/backpack-web/bpk-component-text';
|
|
14
14
|
import BpkTooltip from '@skyscanner/backpack-web/bpk-component-tooltip';
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ The actual component that developers create (i.e. the default export from this p
|
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
import PropTypes from 'prop-types';
|
|
28
|
-
import
|
|
28
|
+
import type { Node } from 'react';
|
|
29
29
|
|
|
30
30
|
import { TransitionInitialMount, cssModules } from '../../bpk-react-utils';
|
|
31
31
|
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
import { createPopper } from '@popperjs/core';
|
|
22
22
|
import PropTypes from 'prop-types';
|
|
23
|
-
import
|
|
23
|
+
import { cloneElement, Component } from 'react';
|
|
24
|
+
import type { Node, Element } from 'react';
|
|
24
25
|
|
|
25
26
|
import { Portal, cssModules } from '../../bpk-react-utils';
|
|
26
27
|
|
|
@@ -50,7 +51,7 @@ export type Props = {
|
|
|
50
51
|
portalStyle: ?Object,
|
|
51
52
|
portalClassName: ?string,
|
|
52
53
|
renderTarget: ?() => HTMLElement,
|
|
53
|
-
popperModifiers: ?Object
|
|
54
|
+
popperModifiers: ?Array<Object>,
|
|
54
55
|
};
|
|
55
56
|
|
|
56
57
|
type State = {
|
|
@@ -72,7 +73,7 @@ class BpkTooltipPortal extends Component<Props, State> {
|
|
|
72
73
|
portalStyle: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
|
73
74
|
portalClassName: PropTypes.string,
|
|
74
75
|
renderTarget: PropTypes.func,
|
|
75
|
-
popperModifiers: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
|
76
|
+
popperModifiers: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
static defaultProps = {
|
|
@@ -186,7 +187,7 @@ class BpkTooltipPortal extends Component<Props, State> {
|
|
|
186
187
|
const classNames = [getClassName('bpk-tooltip-portal')];
|
|
187
188
|
const renderPortal = !hasTouchSupport() || !hideOnTouchDevices;
|
|
188
189
|
|
|
189
|
-
const targetWithAccessibilityProps =
|
|
190
|
+
const targetWithAccessibilityProps = cloneElement(target, {
|
|
190
191
|
tabIndex: '0',
|
|
191
192
|
'aria-label': ariaLabel,
|
|
192
193
|
});
|
|
@@ -17,7 +17,7 @@ it's necessary in overcoming z-index issues when absolutely positioning elements
|
|
|
17
17
|
import { Portal } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
18
18
|
import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
|
|
19
19
|
import { BpkCode } from '@skyscanner/backpack-web/bpk-component-code';
|
|
20
|
-
import
|
|
20
|
+
import { Component } from 'react';
|
|
21
21
|
|
|
22
22
|
class MyComponent extends Component {
|
|
23
23
|
constructor() {
|
|
@@ -78,7 +78,6 @@ A helpful utility which permits backwards compatibility with hard coded classes
|
|
|
78
78
|
### Usage
|
|
79
79
|
|
|
80
80
|
```js
|
|
81
|
-
import React from 'react';
|
|
82
81
|
import { cssModules } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
83
82
|
|
|
84
83
|
import STYLES from './MyComponent.scss';
|
|
@@ -140,7 +139,6 @@ components initial mount. All you need to provide is two class names and a timeo
|
|
|
140
139
|
### Usage
|
|
141
140
|
|
|
142
141
|
```js
|
|
143
|
-
import React from 'react';
|
|
144
142
|
import { TransitionInitialMount } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
145
143
|
|
|
146
144
|
const MyComponent = (props) => (
|
|
@@ -187,7 +185,6 @@ Returns true if the browser is showing content right-to-left.
|
|
|
187
185
|
### Usage
|
|
188
186
|
|
|
189
187
|
```js
|
|
190
|
-
import React from 'react';
|
|
191
188
|
import { isRTL } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
192
189
|
|
|
193
190
|
if (isRTL()) {
|
|
@@ -204,7 +201,6 @@ Returns true if the device is an iPhone.
|
|
|
204
201
|
### Usage
|
|
205
202
|
|
|
206
203
|
```js
|
|
207
|
-
import React from 'react';
|
|
208
204
|
import { isDeviceIphone } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
209
205
|
|
|
210
206
|
if (isDeviceIphone()) {
|
|
@@ -221,7 +217,6 @@ Returns true if the device is an iPad.
|
|
|
221
217
|
### Usage
|
|
222
218
|
|
|
223
219
|
```js
|
|
224
|
-
import React from 'react';
|
|
225
220
|
import { isDeviceIpad } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
226
221
|
|
|
227
222
|
if (isDeviceIpad()) {
|
|
@@ -238,7 +233,6 @@ Returns true if the platform is iOS (iPhone/iPad).
|
|
|
238
233
|
### Usage
|
|
239
234
|
|
|
240
235
|
```js
|
|
241
|
-
import React from 'react';
|
|
242
236
|
import { isDeviceIos } from '@skyscanner/backpack-web/bpk-react-utils';
|
|
243
237
|
|
|
244
238
|
if (isDeviceIos()) {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
import assign from 'object-assign';
|
|
22
22
|
import PropTypes from 'prop-types';
|
|
23
|
-
import
|
|
23
|
+
import type { Node } from 'react';
|
|
24
24
|
import CSSTransition from 'react-transition-group/CSSTransition';
|
|
25
25
|
|
|
26
26
|
// Object.assign() is used unpolyfilled in react-transition-group.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyscanner/backpack-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0",
|
|
4
4
|
"description": "Backpack Design System web library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@skyscanner/bpk-svgs": "^16.2.0",
|
|
29
29
|
"a11y-focus-scope": "^1.1.3",
|
|
30
30
|
"a11y-focus-store": "^1.0.0",
|
|
31
|
-
"bpk-mixins": "^39.1.
|
|
31
|
+
"bpk-mixins": "^39.1.1",
|
|
32
32
|
"d3-path": "^2.0.0",
|
|
33
33
|
"d3-scale": "^4.0.2",
|
|
34
34
|
"date-fns": "^2.21.1",
|