@skyscanner/backpack-web 33.3.1 → 34.0.0-premajor
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-component-accordion/index.js +1 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +12 -13
- package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +5 -3
- package/bpk-component-banner-alert/index.js +1 -1
- package/bpk-component-banner-alert/src/AnimateAndFade.js +37 -35
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +12 -6
- package/bpk-component-barchart/src/BpkBarchart.js +9 -10
- package/bpk-component-barchart/src/BpkBarchartBar.js +1 -2
- package/bpk-component-barchart/src/BpkBarchartBars.js +2 -2
- package/bpk-component-barchart/src/BpkBarchartDefs.js +1 -2
- package/bpk-component-barchart/src/BpkChartAxis.js +1 -2
- package/bpk-component-barchart/src/BpkChartDataTable.js +1 -2
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +4 -6
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +1 -2
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +18 -14
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
- package/bpk-component-breakpoint/index.d.ts +2 -1
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +5 -19
- package/bpk-component-breakpoint/src/useMediaQuery.js +10 -12
- package/bpk-component-button/index.js +5 -5
- package/bpk-component-button/src/BpkButtonDestructive.js +10 -9
- package/bpk-component-button/src/BpkButtonFeatured.js +10 -9
- package/bpk-component-button/src/BpkButtonLink.js +11 -10
- package/bpk-component-button/src/BpkButtonLinkOnDark.js +11 -10
- package/bpk-component-button/src/BpkButtonPrimary.js +2 -2
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +10 -9
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +10 -9
- package/bpk-component-button/src/BpkButtonSecondary.js +10 -10
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +10 -9
- package/bpk-component-calendar/index.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -3
- package/bpk-component-calendar/src/BpkCalendarGrid.js +3 -2
- package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +4 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +6 -4
- package/bpk-component-calendar/src/BpkCalendarNav.js +10 -5
- package/bpk-component-calendar/src/Week.js +6 -3
- package/bpk-component-calendar/src/composeCalendar.js +9 -4
- package/bpk-component-calendar/src/date-utils.js +14 -14
- package/bpk-component-card/src/BpkCardWrapper.js +1 -2
- package/bpk-component-card/src/BpkDividedCard.js +19 -15
- package/bpk-component-card-button/src/BpkSaveButton.js +14 -6
- package/bpk-component-checkbox/src/BpkCheckbox.js +1 -2
- package/bpk-component-chip/index.d.ts +3 -5
- package/bpk-component-chip/index.js +3 -2
- package/bpk-component-chip/src/BpkDismissibleChip.js +7 -2
- package/bpk-component-chip/src/BpkIconChip.d.ts +25 -0
- package/bpk-component-chip/src/BpkIconChip.js +31 -0
- package/bpk-component-chip/src/BpkSelectableChip.d.ts +0 -2
- package/bpk-component-chip/src/BpkSelectableChip.js +5 -6
- package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
- package/bpk-component-chip/src/commonTypes.d.ts +1 -1
- package/bpk-component-chip/src/commonTypes.js +1 -24
- package/bpk-component-close-button/src/BpkCloseButton.js +3 -2
- package/bpk-component-close-button/src/BpkCloseButton.module.css +1 -1
- package/bpk-component-content-cards/src/BpkContentCard.js +9 -4
- package/bpk-component-content-cards/src/BpkContentCards.js +2 -7
- package/bpk-component-content-cards/src/BpkContentCards.module.css +1 -1
- package/bpk-component-datatable/src/BpkDataTable.js +4 -4
- package/bpk-component-datatable/src/BpkDataTableHeader.js +14 -11
- package/bpk-component-datatable/src/BpkDataTableHeader.module.css +1 -1
- package/bpk-component-datepicker/src/BpkDatepicker.js +3 -5
- package/bpk-component-description-list/index.js +1 -1
- package/bpk-component-description-list/src/ComponentFactory.js +10 -5
- package/bpk-component-dialog/src/BpkDialog.js +7 -6
- package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
- package/bpk-component-dialog/src/BpkDialogInner.js +7 -5
- package/bpk-component-drawer/src/BpkDrawer.js +1 -4
- package/bpk-component-drawer/src/BpkDrawerContent.js +8 -7
- package/bpk-component-fieldset/src/BpkFieldset.js +10 -9
- package/bpk-component-flare/index.js +2 -2
- package/bpk-component-flare/src/BpkContentBubble.js +5 -3
- package/bpk-component-flare/src/BpkFlareBar.js +15 -7
- package/bpk-component-flare/src/__generated__/corner-radius.d.ts +6 -0
- package/bpk-component-flare/src/__generated__/pointer.d.ts +6 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +10 -4
- package/bpk-component-form-validation/src/BpkFormValidation.js +6 -6
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +10 -14
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +1 -1
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +8 -6
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +16 -14
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +1 -1
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -2
- package/bpk-component-icon/index.js +1 -1
- package/bpk-component-icon/lg/aircraft.js +1 -2
- package/bpk-component-icon/lg/beach.js +1 -2
- package/bpk-component-icon/lg/call-back.js +1 -2
- package/bpk-component-icon/lg/camper-van.js +1 -2
- package/bpk-component-icon/lg/car-wash.js +1 -2
- package/bpk-component-icon/lg/cars.js +1 -2
- package/bpk-component-icon/lg/clean.js +1 -2
- package/bpk-component-icon/lg/cloakroom.js +1 -2
- package/bpk-component-icon/lg/content--copy.js +1 -2
- package/bpk-component-icon/lg/data.js +1 -2
- package/bpk-component-icon/lg/depart.js +1 -2
- package/bpk-component-icon/lg/download.js +1 -2
- package/bpk-component-icon/lg/education.js +1 -2
- package/bpk-component-icon/lg/explore.js +1 -2
- package/bpk-component-icon/lg/fast-track.js +1 -2
- package/bpk-component-icon/lg/fast-train.js +1 -2
- package/bpk-component-icon/lg/flight-landing.js +1 -2
- package/bpk-component-icon/lg/flight-takeoff.js +1 -2
- package/bpk-component-icon/lg/flight.js +1 -2
- package/bpk-component-icon/lg/legroom--extra.js +1 -2
- package/bpk-component-icon/lg/legroom--normal.js +1 -2
- package/bpk-component-icon/lg/legroom--reduced.js +1 -2
- package/bpk-component-icon/lg/logout.js +1 -2
- package/bpk-component-icon/lg/lounge.js +1 -2
- package/bpk-component-icon/lg/mail.js +1 -2
- package/bpk-component-icon/lg/mileage.js +1 -2
- package/bpk-component-icon/lg/new-window.js +1 -2
- package/bpk-component-icon/lg/plane-seat.js +1 -2
- package/bpk-component-icon/lg/return.js +1 -2
- package/bpk-component-icon/lg/scales.js +1 -2
- package/bpk-component-icon/lg/share--ios.js +1 -2
- package/bpk-component-icon/lg/social-distancing.js +1 -2
- package/bpk-component-icon/lg/speaker.js +1 -2
- package/bpk-component-icon/lg/taxi.js +1 -2
- package/bpk-component-icon/lg/unmute.js +1 -2
- package/bpk-component-icon/lg/wallet.js +1 -2
- package/bpk-component-icon/lg/weather--cloudy.js +1 -2
- package/bpk-component-icon/lg/weather--partly-cloudy.js +1 -2
- package/bpk-component-icon/lg/weather--rain.js +1 -2
- package/bpk-component-icon/lg/weather--thunderstorm.js +1 -2
- package/bpk-component-icon/lg/window--reduce.js +1 -2
- package/bpk-component-icon/lg/world--emea.js +1 -2
- package/bpk-component-icon/sm/aircraft.js +1 -2
- package/bpk-component-icon/sm/beach.js +1 -2
- package/bpk-component-icon/sm/bus.js +1 -2
- package/bpk-component-icon/sm/call-back.js +1 -2
- package/bpk-component-icon/sm/camper-van.js +1 -2
- package/bpk-component-icon/sm/car-wash.js +1 -2
- package/bpk-component-icon/sm/cars.js +1 -2
- package/bpk-component-icon/sm/chauffeur.js +1 -2
- package/bpk-component-icon/sm/clean.js +1 -2
- package/bpk-component-icon/sm/content--copy.js +1 -2
- package/bpk-component-icon/sm/data.js +1 -2
- package/bpk-component-icon/sm/depart.js +1 -2
- package/bpk-component-icon/sm/direct.js +1 -2
- package/bpk-component-icon/sm/download.js +1 -2
- package/bpk-component-icon/sm/education.js +1 -2
- package/bpk-component-icon/sm/explore.js +1 -2
- package/bpk-component-icon/sm/fast-track.js +1 -2
- package/bpk-component-icon/sm/fast-train.js +1 -2
- package/bpk-component-icon/sm/flight-landing.js +1 -2
- package/bpk-component-icon/sm/flight-takeoff.js +1 -2
- package/bpk-component-icon/sm/flight.js +1 -2
- package/bpk-component-icon/sm/hotels--jacuzzi.js +1 -2
- package/bpk-component-icon/sm/infant.js +1 -2
- package/bpk-component-icon/sm/legroom--extra.js +1 -2
- package/bpk-component-icon/sm/legroom--normal.js +1 -2
- package/bpk-component-icon/sm/legroom--reduced.js +1 -2
- package/bpk-component-icon/sm/logout.js +1 -2
- package/bpk-component-icon/sm/mail.js +1 -2
- package/bpk-component-icon/sm/mileage.js +1 -2
- package/bpk-component-icon/sm/new-window.js +1 -2
- package/bpk-component-icon/sm/onsen.js +1 -2
- package/bpk-component-icon/sm/plane-seat.js +1 -2
- package/bpk-component-icon/sm/return.js +1 -2
- package/bpk-component-icon/sm/share--ios.js +1 -2
- package/bpk-component-icon/sm/social-distancing.js +1 -2
- package/bpk-component-icon/sm/taxi.js +1 -2
- package/bpk-component-icon/sm/unmute.js +1 -2
- package/bpk-component-icon/sm/weather--cloudy.js +1 -2
- package/bpk-component-icon/sm/weather--rain.js +1 -2
- package/bpk-component-icon/sm/weather--thunderstorm.js +1 -2
- package/bpk-component-icon/sm/weather--wind.js +1 -2
- package/bpk-component-icon/sm/window--reduce.js +1 -2
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +3 -0
- package/bpk-component-icon/src/withDescription.js +1 -2
- package/bpk-component-icon/src/withRtlSupport.js +1 -1
- package/bpk-component-image/index.js +2 -2
- package/bpk-component-image/src/BpkBackgroundImage.js +4 -3
- package/bpk-component-image/src/BpkImage.js +6 -4
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +4 -5
- package/bpk-component-info-banner/src/AnimateAndFade.js +37 -35
- package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
- package/bpk-component-info-banner/src/BpkInfoBannerInner.js +17 -14
- package/bpk-component-input/index.js +1 -1
- package/bpk-component-input/src/BpkClearButton.js +3 -1
- package/bpk-component-input/src/BpkInput.js +6 -4
- package/bpk-component-input/src/withOpenEvents.js +4 -1
- package/bpk-component-label/src/BpkLabel.js +1 -2
- package/bpk-component-link/index.js +2 -2
- package/bpk-component-list/src/BpkList.js +4 -1
- package/bpk-component-loading-button/src/BpkLoadingButton.js +7 -5
- package/bpk-component-map/index.js +4 -4
- package/bpk-component-map/src/BpkIconMarker.js +2 -3
- package/bpk-component-map/src/BpkMap.js +2 -2
- package/bpk-component-map/src/BpkPriceMarker.js +8 -7
- package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.js +2 -3
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +5 -2
- package/bpk-component-modal/index.js +4 -3
- package/bpk-component-modal/src/BpkModal.d.ts +2 -1
- package/bpk-component-modal/src/BpkModal.js +8 -3
- package/bpk-component-modal/src/BpkModalInner.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalInner.js +25 -10
- package/bpk-component-modal/src/BpkModalInner.module.css +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpkModal.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalV2/BpkModal.js +20 -10
- package/bpk-component-navigation-bar/index.js +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +8 -7
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +5 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +5 -2
- package/bpk-component-nudger/index.js +1 -1
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +17 -6
- package/bpk-component-nudger/src/BpkNudger.js +17 -7
- package/bpk-component-overlay/src/BpkOverlay.js +1 -2
- package/bpk-component-page-indicator/src/BpkPageIndicator.js +1 -2
- package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +1 -1
- package/bpk-component-page-indicator/src/NavButton.js +1 -1
- package/bpk-component-pagination/src/BpkPagination.js +1 -2
- package/bpk-component-pagination/src/BpkPaginationList.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +14 -6
- package/bpk-component-pagination/src/BpkPaginationPage.js +4 -1
- package/bpk-component-phone-input/src/BpkPhoneInput.js +16 -6
- package/bpk-component-popover/src/BpkPopover.js +106 -63
- package/bpk-component-popover/src/BpkPopoverPortal.js +123 -119
- package/bpk-component-popover/src/keyboardFocusScope.js +1 -1
- package/bpk-component-price/src/BpkPrice.js +19 -8
- package/bpk-component-progress/src/BpkProgress.js +1 -2
- package/bpk-component-radio/src/BpkRadio.js +1 -2
- package/bpk-component-rating/src/BpkRating.js +19 -8
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +4 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +7 -5
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +7 -4
- package/bpk-component-section-header/src/BpkSectionHeader.js +10 -5
- package/bpk-component-section-list/index.js +1 -1
- package/bpk-component-section-list/src/BpkSectionListItem.js +11 -6
- package/bpk-component-section-list/src/BpkSectionListSection.js +2 -3
- package/bpk-component-select/src/BpkSelect.js +1 -2
- package/bpk-component-slider/src/BpkSlider.js +6 -2
- package/bpk-component-spinner/index.js +3 -3
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +9 -7
- package/bpk-component-spinner/src/BpkLargeSpinner.js +9 -7
- package/bpk-component-spinner/src/BpkSpinner.js +9 -7
- package/bpk-component-split-input/src/BpkInputField.js +2 -2
- package/bpk-component-split-input/src/BpkSplitInput.js +3 -3
- package/bpk-component-star-rating/index.js +4 -4
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +6 -2
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
- package/bpk-component-star-rating/src/BpkStar.js +22 -15
- package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
- package/bpk-component-switch/src/BpkSwitch.js +1 -2
- package/bpk-component-table/index.js +2 -2
- package/bpk-component-text/src/BpkText.js +10 -5
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +6 -4
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
- package/bpk-component-tooltip/src/BpkTooltip.js +2 -3
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +7 -6
- package/bpk-mixins/_chips.scss +9 -0
- package/bpk-react-utils/index.js +3 -3
- package/bpk-react-utils/src/BpkDialogWrapper/BpkDialogWrapper.js +2 -2
- package/bpk-react-utils/src/Portal.js +1 -0
- package/bpk-react-utils/src/withDefaultProps.js +4 -1
- package/bpk-scrim-utils/src/withScrim.js +3 -3
- package/bpk-scrim-utils/src/withScrimmedPortal.js +1 -1
- package/bpk-theming/src/BpkThemeProvider.js +1 -1
- package/package.json +5 -3
- package/unstable__bpk-mixins/_chips.scss +9 -0
- package/bpk-component-button/src/commonButtonTests.js +0 -133
|
@@ -15,14 +15,15 @@
|
|
|
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
|
|
19
|
-
import {
|
|
18
|
+
import { useState, cloneElement } from 'react';
|
|
19
|
+
import { useFloating, autoUpdate, offset, flip, shift, useClick, useDismiss, useInteractions, FloatingFocusManager } from '@floating-ui/react';
|
|
20
20
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
21
|
+
import { BpkButtonLink } from "../../bpk-component-link";
|
|
22
|
+
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
21
23
|
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
22
|
-
import STYLES from "./BpkPopover.module.css";
|
|
23
24
|
import { ARROW_ID } from "./constants";
|
|
24
|
-
import
|
|
25
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import STYLES from "./BpkPopover.module.css";
|
|
26
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
26
27
|
const getClassName = cssModules(STYLES);
|
|
27
28
|
const EVENT_SOURCES = {
|
|
28
29
|
CLOSE_BUTTON: 'CLOSE_BUTTON',
|
|
@@ -44,74 +45,116 @@ const BpkPopover = props => {
|
|
|
44
45
|
closeButtonProps,
|
|
45
46
|
closeButtonText,
|
|
46
47
|
id,
|
|
48
|
+
isOpen,
|
|
47
49
|
label,
|
|
48
50
|
labelAsTitle,
|
|
49
51
|
onClose,
|
|
50
52
|
padded,
|
|
53
|
+
placement,
|
|
54
|
+
popperModifiers,
|
|
55
|
+
portalStyle,
|
|
56
|
+
renderTarget,
|
|
57
|
+
target,
|
|
51
58
|
...rest
|
|
52
59
|
} = props;
|
|
53
|
-
const
|
|
54
|
-
const
|
|
60
|
+
const [isOpenState, setIsOpenState] = useState(isOpen);
|
|
61
|
+
const {
|
|
62
|
+
context,
|
|
63
|
+
floatingStyles,
|
|
64
|
+
refs
|
|
65
|
+
} = useFloating({
|
|
66
|
+
open: isOpenState,
|
|
67
|
+
onOpenChange: setIsOpenState,
|
|
68
|
+
middleware: [offset(17), popperModifiers],
|
|
69
|
+
whileElementsMounted: autoUpdate
|
|
70
|
+
});
|
|
71
|
+
const click = useClick(context);
|
|
72
|
+
const dismiss = useDismiss(context);
|
|
55
73
|
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
74
|
+
// Merge all the interactions into prop getters
|
|
75
|
+
const {
|
|
76
|
+
getFloatingProps,
|
|
77
|
+
getReferenceProps
|
|
78
|
+
} = useInteractions([click, dismiss]);
|
|
60
79
|
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
80
|
+
// const getTargetElement = () => typeof target === 'function' ? target() : (target as JSXElementWithRefProps)?.ref.current
|
|
81
|
+
|
|
82
|
+
// const targetEl = cloneElement(getRenderTarget(renderTarget), { ...getReferenceProps(), ref: refs.setReference });
|
|
83
|
+
// console.error('renderTarget', renderTarget());
|
|
84
|
+
const targetEl = /*#__PURE__*/cloneElement(target, {
|
|
85
|
+
...getReferenceProps(),
|
|
86
|
+
ref: refs.setReference
|
|
87
|
+
});
|
|
88
|
+
const classNames = getClassName('bpk-popover', className);
|
|
89
|
+
const bodyClassNames = getClassName(padded && 'bpk-popover__body--padded');
|
|
65
90
|
const labelId = `bpk-popover-label-${id}`;
|
|
66
|
-
return /*#__PURE__*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
91
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
92
|
+
children: [targetEl, isOpenState && /*#__PURE__*/_jsx(FloatingFocusManager, {
|
|
93
|
+
context: context,
|
|
94
|
+
modal: false,
|
|
95
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
96
|
+
ref: refs.setFloating,
|
|
97
|
+
style: floatingStyles,
|
|
98
|
+
...getFloatingProps(),
|
|
99
|
+
children: /*#__PURE__*/_jsx(TransitionInitialMount, {
|
|
100
|
+
appearClassName: getClassName('bpk-popover--appear'),
|
|
101
|
+
appearActiveClassName: getClassName('bpk-popover--appear-active'),
|
|
102
|
+
transitionTimeout: 200,
|
|
103
|
+
children: /*#__PURE__*/_jsxs("section", {
|
|
104
|
+
id: id,
|
|
105
|
+
tabIndex: "-1",
|
|
106
|
+
role: "dialog",
|
|
107
|
+
"aria-labelledby": labelId,
|
|
108
|
+
className: classNames,
|
|
109
|
+
...rest,
|
|
110
|
+
children: [labelAsTitle ? /*#__PURE__*/_jsxs("header", {
|
|
111
|
+
className: getClassName('bpk-popover__header'),
|
|
112
|
+
children: [/*#__PURE__*/_jsx(BpkText, {
|
|
113
|
+
tagName: "h2",
|
|
114
|
+
id: labelId,
|
|
115
|
+
textStyle: TEXT_STYLES.label1,
|
|
116
|
+
children: label
|
|
117
|
+
}), "\xA0", closeButtonIcon ? /*#__PURE__*/_jsx(BpkCloseButton
|
|
118
|
+
// TODO: className to be removed
|
|
119
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
120
|
+
, {
|
|
121
|
+
className: getClassName('bpk-popover__close-button'),
|
|
122
|
+
label: closeButtonText,
|
|
123
|
+
onClick: () => {
|
|
124
|
+
bindEventSource(EVENT_SOURCES.CLOSE_BUTTON, props.onClose);
|
|
125
|
+
setIsOpenState(false);
|
|
126
|
+
},
|
|
127
|
+
...closeButtonProps
|
|
128
|
+
}) : /*#__PURE__*/_jsx(BpkButtonLink, {
|
|
129
|
+
onClick: () => {
|
|
130
|
+
bindEventSource(EVENT_SOURCES.CLOSE_LINK, props.onClose);
|
|
131
|
+
setIsOpenState(false);
|
|
132
|
+
},
|
|
133
|
+
...closeButtonProps,
|
|
134
|
+
children: closeButtonText
|
|
135
|
+
})]
|
|
136
|
+
}) : /*#__PURE__*/_jsx("span", {
|
|
137
|
+
id: labelId,
|
|
138
|
+
className: getClassName('bpk-popover__label'),
|
|
139
|
+
children: label
|
|
140
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
141
|
+
className: bodyClassNames,
|
|
142
|
+
children: children
|
|
143
|
+
}), !labelAsTitle && /*#__PURE__*/_jsx("footer", {
|
|
144
|
+
className: getClassName('bpk-popover__footer'),
|
|
145
|
+
children: /*#__PURE__*/_jsx(BpkButtonLink, {
|
|
146
|
+
onClick: () => {
|
|
147
|
+
bindEventSource(EVENT_SOURCES.CLOSE_LINK, props.onClose);
|
|
148
|
+
setIsOpenState(false);
|
|
149
|
+
},
|
|
150
|
+
...closeButtonProps,
|
|
151
|
+
children: closeButtonText
|
|
152
|
+
})
|
|
153
|
+
})]
|
|
154
|
+
})
|
|
112
155
|
})
|
|
113
|
-
})
|
|
114
|
-
})
|
|
156
|
+
})
|
|
157
|
+
})]
|
|
115
158
|
});
|
|
116
159
|
};
|
|
117
160
|
export const propTypes = {
|
|
@@ -14,17 +14,15 @@
|
|
|
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
|
|
18
|
-
import PropTypes from 'prop-types';
|
|
17
|
+
*/import PropTypes from 'prop-types';
|
|
19
18
|
import { Component } from 'react';
|
|
19
|
+
import { createPopper } from '@popperjs/core';
|
|
20
20
|
import focusStore from 'a11y-focus-store';
|
|
21
21
|
import { Portal, cssModules } from "../../bpk-react-utils";
|
|
22
|
+
import BpkPopover from "./BpkPopover";
|
|
22
23
|
import keyboardFocusScope from "./keyboardFocusScope";
|
|
23
24
|
import STYLES from "./BpkPopover.module.css";
|
|
24
|
-
import
|
|
25
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
27
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
28
26
|
const getClassName = cssModules(STYLES);
|
|
29
27
|
class BpkPopoverPortal extends Component {
|
|
30
28
|
constructor() {
|
|
@@ -32,9 +30,10 @@ class BpkPopoverPortal extends Component {
|
|
|
32
30
|
this.popper = null;
|
|
33
31
|
this.previousTargetElement = null;
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
// onRender = (popoverElement: HTMLElement, targetElement: ?HTMLElement) => {
|
|
35
|
+
// this.position(popoverElement, targetElement);
|
|
36
|
+
// };
|
|
38
37
|
|
|
39
38
|
// The order of events here is as follows:
|
|
40
39
|
// - `onClose` is called by `Portal`
|
|
@@ -44,125 +43,130 @@ class BpkPopoverPortal extends Component {
|
|
|
44
43
|
|
|
45
44
|
// `onClose` is called by the `Portal` to inform the consumer that `isOpen` should be made false.
|
|
46
45
|
// Before we pass this information to the consumer, we want to note if restoring focus should be suppressed
|
|
47
|
-
onClose = (event, information) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
46
|
+
// onClose = (event: Object, information: { source: string }) => {
|
|
47
|
+
// // If the user has clicked outside the popover then we don't want focus to be restored
|
|
48
|
+
// // otherwise it will be stolen back from the element they clicked on.
|
|
49
|
+
// // Here we suppress restoring focus before the consumer is told about the close and updates state.
|
|
50
|
+
// this.suppressRestoreFocus = information.source === 'DOCUMENT_CLICK';
|
|
51
|
+
|
|
52
|
+
// if (this.props.onClose) {
|
|
53
|
+
// this.props.onClose(event, information);
|
|
54
|
+
// }
|
|
55
|
+
// };
|
|
56
56
|
|
|
57
57
|
// `beforeClose` is called by the `Portal` when `isOpen` is changed to false.
|
|
58
58
|
// As a result, `onClose` is called first, followed by `beforeClose`.
|
|
59
|
-
beforeClose = done => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
59
|
+
// beforeClose = (done: () => void) => {
|
|
60
|
+
// if (this.popper) {
|
|
61
|
+
// this.popper.destroy();
|
|
62
|
+
// this.popper = null;
|
|
63
|
+
// this.previousTargetElement = null;
|
|
64
|
+
// }
|
|
65
|
+
|
|
66
|
+
// keyboardFocusScope.unscopeFocus();
|
|
67
|
+
// if (!this.suppressRestoreFocus) {
|
|
68
|
+
// focusStore.restoreFocus();
|
|
69
|
+
// this.suppressRestoreFocus = false;
|
|
70
|
+
// }
|
|
71
|
+
|
|
72
|
+
// done();
|
|
73
|
+
// };
|
|
74
|
+
|
|
75
|
+
// position(popoverElement: HTMLElement, targetElement: ?HTMLElement) {
|
|
76
|
+
// if (!targetElement) {
|
|
77
|
+
// return;
|
|
78
|
+
// }
|
|
79
|
+
|
|
80
|
+
// const targetElementHasChanged =
|
|
81
|
+
// targetElement !== this.previousTargetElement;
|
|
82
|
+
|
|
83
|
+
// if (targetElementHasChanged && this.popper) {
|
|
84
|
+
// this.popper.destroy();
|
|
85
|
+
// this.popper = null;
|
|
86
|
+
// }
|
|
87
|
+
|
|
88
|
+
// // Custom modifier that makes the arrow display at the edge of the target.
|
|
89
|
+
// const applyArrowHide = {
|
|
90
|
+
// name: 'applyArrowHide',
|
|
91
|
+
// enabled: true,
|
|
92
|
+
// phase: 'write',
|
|
93
|
+
// fn({ state }) {
|
|
94
|
+
// const { arrow } = state.elements;
|
|
95
|
+
// if (arrow) {
|
|
96
|
+
// if (state.modifiersData.arrow.centerOffset !== 0) {
|
|
97
|
+
// arrow.setAttribute('data-hide', '');
|
|
98
|
+
// } else {
|
|
99
|
+
// arrow.removeAttribute('data-hide');
|
|
100
|
+
// }
|
|
101
|
+
// }
|
|
102
|
+
// },
|
|
103
|
+
// };
|
|
104
|
+
|
|
105
|
+
// // The default modifiers for the popper
|
|
106
|
+
// // Note that GPU acceleration should be disabled otherwise Popper will use `translate3d`
|
|
107
|
+
// // which can cause blurriness in Safari and Chrome.
|
|
108
|
+
// const stdModifiers = [
|
|
109
|
+
// {
|
|
110
|
+
// name: 'computeStyles',
|
|
111
|
+
// options: {
|
|
112
|
+
// gpuAcceleration: false,
|
|
113
|
+
// },
|
|
114
|
+
// },
|
|
115
|
+
// {
|
|
116
|
+
// name: 'offset',
|
|
117
|
+
// options: {
|
|
118
|
+
// offset: [0, 17],
|
|
119
|
+
// },
|
|
120
|
+
// },
|
|
121
|
+
// applyArrowHide,
|
|
122
|
+
// ];
|
|
123
|
+
|
|
124
|
+
// if (!this.popper) {
|
|
125
|
+
// this.popper = createPopper(targetElement, popoverElement, {
|
|
126
|
+
// placement: this.props.placement,
|
|
127
|
+
// onFirstUpdate: () => {
|
|
128
|
+
// if (targetElement) {
|
|
129
|
+
// targetElement.focus();
|
|
130
|
+
// }
|
|
131
|
+
// focusStore.storeFocus();
|
|
132
|
+
// keyboardFocusScope.scopeFocus(popoverElement);
|
|
133
|
+
// },
|
|
134
|
+
// modifiers: this.props.popperModifiers
|
|
135
|
+
// ? [...this.props.popperModifiers, ...stdModifiers]
|
|
136
|
+
// : stdModifiers,
|
|
137
|
+
// });
|
|
138
|
+
// }
|
|
139
|
+
|
|
140
|
+
// this.previousTargetElement = targetElement;
|
|
141
|
+
// if (this.popper) {
|
|
142
|
+
// this.popper.update();
|
|
143
|
+
// }
|
|
144
|
+
// }
|
|
145
|
+
|
|
135
146
|
render() {
|
|
136
147
|
const {
|
|
137
|
-
isOpen,
|
|
138
|
-
onClose,
|
|
139
|
-
placement,
|
|
140
|
-
popperModifiers,
|
|
148
|
+
// isOpen,
|
|
149
|
+
// onClose,
|
|
150
|
+
// placement,
|
|
151
|
+
// popperModifiers,
|
|
141
152
|
portalClassName,
|
|
142
|
-
portalStyle,
|
|
143
|
-
renderTarget,
|
|
144
|
-
target,
|
|
153
|
+
// portalStyle,
|
|
154
|
+
// renderTarget,
|
|
155
|
+
// target,
|
|
145
156
|
...rest
|
|
146
157
|
} = this.props;
|
|
147
|
-
const classNames =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
const classNames = getClassName('bpk-popover-portal', portalClassName);
|
|
159
|
+
|
|
160
|
+
// if (portalClassName) {
|
|
161
|
+
// classNames.push(portalClassName);
|
|
162
|
+
// }
|
|
163
|
+
|
|
164
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
165
|
+
children: /*#__PURE__*/_jsx(BpkPopover, {
|
|
166
|
+
className: classNames,
|
|
156
167
|
onClose: this.onClose,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
renderTarget: renderTarget,
|
|
160
|
-
target: target,
|
|
161
|
-
children: /*#__PURE__*/_jsx(BpkPopover, {
|
|
162
|
-
onClose: this.onClose,
|
|
163
|
-
...rest
|
|
164
|
-
})
|
|
165
|
-
})]
|
|
168
|
+
...rest
|
|
169
|
+
})
|
|
166
170
|
});
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
// it only prevents it leaving due to keyboard events.
|
|
22
22
|
// Clicks outside the target element will move focus as normal.
|
|
23
23
|
|
|
24
|
-
import tabbable from 'tabbable';
|
|
25
24
|
import focusin from 'focusin';
|
|
25
|
+
import tabbable from 'tabbable';
|
|
26
26
|
let polyfilled = false;
|
|
27
27
|
let focusTrapped = false;
|
|
28
28
|
const init = element => {
|
|
@@ -15,12 +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 { cssModules } from "../../bpk-react-utils";
|
|
19
18
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
20
|
-
import
|
|
19
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
21
20
|
import { SIZES, ALIGNS } from "./common-types";
|
|
22
|
-
import
|
|
23
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
import STYLES from "./BpkPrice.module.css";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
23
|
const getClassName = cssModules(STYLES);
|
|
25
24
|
const BpkPrice = props => {
|
|
26
25
|
const {
|
|
@@ -43,14 +42,20 @@ const BpkPrice = props => {
|
|
|
43
42
|
...rest,
|
|
44
43
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
45
44
|
className: getClassName(previousPrice && 'bpk-price__leading', isAlignRight && 'bpk-price__leading--right', leadingClassName),
|
|
46
|
-
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
|
+
, {
|
|
47
49
|
className: getClassName('bpk-price__previous-price'),
|
|
48
50
|
textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
|
|
49
51
|
tagName: "span",
|
|
50
52
|
children: previousPrice
|
|
51
53
|
}), previousPrice && leadingText && /*#__PURE__*/_jsx(BpkText, {
|
|
52
54
|
textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
|
|
53
|
-
tagName: "span"
|
|
55
|
+
tagName: "span"
|
|
56
|
+
// TODO: className to be removed
|
|
57
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
58
|
+
,
|
|
54
59
|
className: getClassName('bpk-price__separator'),
|
|
55
60
|
children: "\uD802\uDD1F"
|
|
56
61
|
}), leadingText && /*#__PURE__*/_jsx(BpkText, {
|
|
@@ -61,13 +66,19 @@ const BpkPrice = props => {
|
|
|
61
66
|
}), /*#__PURE__*/_jsxs("div", {
|
|
62
67
|
className: getClassName(isAlignRight && 'bpk-price__column-container'),
|
|
63
68
|
children: [/*#__PURE__*/_jsx(BpkText, {
|
|
64
|
-
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
|
+
,
|
|
65
73
|
className: getClassName('bpk-price__price', !isAlignRight && 'bpk-price__spacing'),
|
|
66
74
|
tagName: "span",
|
|
67
75
|
children: price
|
|
68
76
|
}), trailingText && /*#__PURE__*/_jsx(BpkText, {
|
|
69
77
|
textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
|
|
70
|
-
tagName: "span"
|
|
78
|
+
tagName: "span"
|
|
79
|
+
// TODO: className to be removed
|
|
80
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
81
|
+
,
|
|
71
82
|
className: getClassName('bpk-price__trailing'),
|
|
72
83
|
children: trailingText
|
|
73
84
|
})]
|
|
@@ -19,8 +19,7 @@ import { Component } from 'react';
|
|
|
19
19
|
import clamp from 'lodash.clamp';
|
|
20
20
|
import { cssModules } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkProgress.module.css";
|
|
22
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
23
|
const getClassName = cssModules(STYLES);
|
|
25
24
|
const isTransitionEndSupported = () => !!(typeof window !== 'undefined' && 'TransitionEvent' in window);
|
|
26
25
|
const renderSteps = numberOfSteps => {
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
18
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
19
|
import STYLES from "./BpkRadio.module.css";
|
|
20
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
21
|
const getClassName = cssModules(STYLES);
|
|
23
22
|
const BpkRadio = props => {
|
|
24
23
|
const {
|
|
@@ -16,12 +16,11 @@
|
|
|
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";
|
|
21
|
-
import
|
|
20
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
22
21
|
import { RATING_SIZES, RATING_SCALES } from "./common-types";
|
|
23
|
-
import
|
|
24
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import STYLES from "./BpkRating.module.css";
|
|
23
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
25
24
|
const getClassName = cssModules(STYLES);
|
|
26
25
|
const getMinValue = () =>
|
|
27
26
|
// Currently the min value is zero no matter what scale is used.
|
|
@@ -80,11 +79,17 @@ const BpkRating = props => {
|
|
|
80
79
|
...rest,
|
|
81
80
|
children: [/*#__PURE__*/_jsxs(BpkText, {
|
|
82
81
|
textStyle: valueTextSize,
|
|
83
|
-
tagName: "span"
|
|
82
|
+
tagName: "span"
|
|
83
|
+
// TODO: className to be removed
|
|
84
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
85
|
+
,
|
|
84
86
|
className: valueStyles,
|
|
85
87
|
"aria-hidden": "true",
|
|
86
88
|
children: [adjustedValue, showScale && /*#__PURE__*/_jsxs(BpkText, {
|
|
87
|
-
textStyle: scaleTextSize
|
|
89
|
+
textStyle: scaleTextSize
|
|
90
|
+
// TODO: className to be removed
|
|
91
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
92
|
+
,
|
|
88
93
|
className: scaleStyles,
|
|
89
94
|
tagName: "span",
|
|
90
95
|
"aria-hidden": "true",
|
|
@@ -93,12 +98,18 @@ const BpkRating = props => {
|
|
|
93
98
|
}), /*#__PURE__*/_jsxs("div", {
|
|
94
99
|
className: textWrapperStyles,
|
|
95
100
|
children: [title && /*#__PURE__*/_jsx(BpkText, {
|
|
96
|
-
textStyle: titleTextSize
|
|
101
|
+
textStyle: titleTextSize
|
|
102
|
+
// TODO: className to be removed
|
|
103
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
104
|
+
,
|
|
97
105
|
className: titleStyles,
|
|
98
106
|
tagName: "span",
|
|
99
107
|
"aria-hidden": "true",
|
|
100
108
|
children: title
|
|
101
|
-
}), 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
|
+
, {
|
|
102
113
|
className: subtitleStyles,
|
|
103
114
|
textStyle: subtitleTextSize,
|
|
104
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
|
});
|