@skyscanner/backpack-web 33.4.0 → 33.6.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-component-accordion/index.js +1 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +12 -12
- package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +4 -1
- package/bpk-component-banner-alert/index.js +1 -1
- package/bpk-component-banner-alert/src/AnimateAndFade.js +33 -31
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +11 -4
- package/bpk-component-barchart/src/BpkBarchart.js +8 -8
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +3 -3
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +17 -12
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +20 -4
- package/bpk-component-breakpoint/src/useMediaQuery.js +10 -7
- 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 +2 -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 +5 -2
- package/bpk-component-calendar/src/BpkCalendarNav.js +9 -3
- package/bpk-component-calendar/src/Week.js +6 -3
- package/bpk-component-calendar/src/composeCalendar.js +8 -2
- package/bpk-component-calendar/src/date-utils.js +14 -14
- package/bpk-component-card/src/BpkDividedCard.js +18 -13
- package/bpk-component-card-button/src/BpkSaveButton.js +13 -4
- package/bpk-component-chip/index.d.ts +3 -5
- package/bpk-component-chip/index.js +3 -2
- package/bpk-component-chip/src/BpkDismissibleChip.js +5 -3
- 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 +4 -3
- 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 +7 -4
- package/bpk-component-close-button/src/BpkCloseButton.module.css +1 -1
- package/bpk-component-content-cards/src/BpkContentCard.js +8 -2
- package/bpk-component-datatable/src/BpkDataTable.js +1 -1
- package/bpk-component-datatable/src/BpkDataTableHeader.js +12 -8
- package/bpk-component-datatable/src/BpkDataTableHeader.module.css +1 -1
- package/bpk-component-datepicker/src/BpkDatepicker.js +2 -7
- 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 +6 -4
- package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
- package/bpk-component-dialog/src/BpkDialogInner.js +6 -3
- package/bpk-component-drawer/src/BpkDrawer.js +1 -4
- package/bpk-component-drawer/src/BpkDrawerContent.js +7 -5
- package/bpk-component-fieldset/src/BpkFieldset.js +9 -7
- package/bpk-component-flare/index.js +2 -2
- package/bpk-component-flare/src/BpkContentBubble.js +4 -1
- package/bpk-component-flare/src/BpkFlareBar.js +13 -4
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +8 -2
- package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +1 -1
- package/bpk-component-form-validation/src/BpkFormValidation.js +5 -4
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +9 -11
- 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/ai.js +1 -2
- package/bpk-component-icon/lg/dot.js +20 -0
- package/bpk-component-icon/sm/ai.js +1 -2
- package/bpk-component-icon/sm/dot.js +20 -0
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +3 -0
- package/bpk-component-image/index.js +2 -2
- package/bpk-component-image/src/BpkBackgroundImage.js +2 -1
- package/bpk-component-image/src/BpkImage.js +2 -1
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +3 -3
- package/bpk-component-info-banner/src/AnimateAndFade.js +33 -31
- package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
- package/bpk-component-info-banner/src/BpkInfoBannerInner.js +16 -12
- package/bpk-component-input/index.js +1 -1
- package/bpk-component-input/src/BpkClearButton.js +3 -1
- package/bpk-component-input/src/BpkInput.js +4 -1
- package/bpk-component-input/src/withOpenEvents.js +4 -1
- package/bpk-component-link/index.js +2 -2
- package/bpk-component-list/src/BpkList.js +2 -2
- package/bpk-component-loading-button/src/BpkLoadingButton.js +6 -3
- package/bpk-component-map/index.js +4 -4
- package/bpk-component-map/src/BpkIconMarker.js +1 -1
- package/bpk-component-map/src/BpkMap.js +4 -3
- package/bpk-component-map/src/BpkPriceMarker.js +7 -5
- package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.js +1 -1
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +0 -8
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.css +1 -1
- 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 +4 -2
- package/bpk-component-modal/src/BpkModalInner.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalInner.js +24 -8
- 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 +19 -8
- package/bpk-component-navigation-bar/index.js +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +7 -5
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +7 -7
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +8 -8
- package/bpk-component-nudger/index.js +1 -1
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +16 -4
- package/bpk-component-nudger/src/BpkNudger.js +15 -8
- package/bpk-component-nudger/src/BpkNudger.module.css +1 -1
- 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/BpkPaginationList.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +13 -4
- package/bpk-component-pagination/src/BpkPaginationPage.js +4 -1
- package/bpk-component-phone-input/src/BpkPhoneInput.js +19 -10
- package/bpk-component-popover/src/BpkPopover.js +6 -3
- package/bpk-component-popover/src/BpkPopoverPortal.js +5 -2
- package/bpk-component-popover/src/keyboardFocusScope.js +1 -1
- package/bpk-component-price/src/BpkPrice.js +17 -5
- package/bpk-component-rating/src/BpkRating.js +17 -5
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +0 -4
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +6 -3
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +6 -3
- package/bpk-component-section-header/src/BpkSectionHeader.js +6 -5
- package/bpk-component-section-header/src/BpkSectionHeader.module.css +1 -1
- package/bpk-component-section-list/index.js +1 -1
- package/bpk-component-section-list/src/BpkSectionListItem.js +8 -6
- package/bpk-component-section-list/src/BpkSectionListItem.module.css +1 -1
- package/bpk-component-section-list/src/BpkSectionListSection.js +1 -1
- package/{bpk-component-datepicker/src/BpkDatepicker.module.css → bpk-component-skeleton/index.js} +8 -5
- package/bpk-component-skeleton/src/BpkBaseSkeleton.js +30 -0
- package/bpk-component-skeleton/src/BpkBaseSkeleton.module.css +18 -0
- package/bpk-component-skeleton/src/BpkSkeleton.js +38 -0
- package/bpk-component-skeleton/src/BpkSkeleton.module.css +18 -0
- package/bpk-component-skeleton/src/common-types.js +33 -0
- package/bpk-component-spinner/index.js +3 -3
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +6 -4
- package/bpk-component-spinner/src/BpkLargeSpinner.js +6 -4
- package/bpk-component-spinner/src/BpkSpinner.js +6 -4
- package/bpk-component-spinner/src/BpkSpinner.module.css +1 -1
- 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 -3
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
- package/bpk-component-star-rating/src/BpkStar.js +18 -18
- package/bpk-component-star-rating/src/BpkStar.module.css +1 -1
- package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
- 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 +5 -3
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +4 -1
- package/bpk-mixins/_chips.scss +9 -0
- package/bpk-react-utils/index.js +3 -3
- package/bpk-react-utils/src/withDefaultProps.js +4 -1
- package/bpk-scrim-utils/src/withScrimmedPortal.js +1 -1
- package/bpk-theming/src/BpkThemeProvider.js +1 -1
- package/package.json +2 -2
- package/unstable__bpk-mixins/_chips.scss +9 -0
- package/bpk-component-button/src/commonButtonTests.js +0 -133
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.css +0 -18
|
@@ -16,33 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import PropTypes from 'prop-types';
|
|
20
19
|
export const CHIP_TYPES = {
|
|
21
20
|
default: 'default',
|
|
22
21
|
onDark: 'on-dark',
|
|
23
22
|
onImage: 'on-image'
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
// onClick
|
|
27
|
-
|
|
28
|
-
// TODO: Remove once chip examples have been migrated to TS
|
|
29
|
-
export const COMMON_PROP_TYPES = {
|
|
30
|
-
accessibilityLabel: PropTypes.string.isRequired,
|
|
31
|
-
children: PropTypes.node.isRequired,
|
|
32
|
-
onClick: PropTypes.func.isRequired,
|
|
33
|
-
className: PropTypes.string,
|
|
34
|
-
disabled: PropTypes.bool,
|
|
35
|
-
leadingAccessoryView: PropTypes.node,
|
|
36
|
-
selected: PropTypes.bool,
|
|
37
|
-
trailingAccessoryView: PropTypes.node,
|
|
38
|
-
type: PropTypes.oneOf(Object.values(CHIP_TYPES))
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
// TODO: Remove once chip examples have been migrated to TS
|
|
42
|
-
export const COMMON_DEFAULT_PROPS = {
|
|
43
|
-
disabled: false,
|
|
44
|
-
leadingAccessoryView: null,
|
|
45
|
-
selected: false,
|
|
46
|
-
trailingAccessoryView: null,
|
|
47
|
-
type: CHIP_TYPES.default
|
|
48
|
-
};
|
|
25
|
+
// onClick is already part of the button props, but we need to specify that they are required
|
|
@@ -21,14 +21,15 @@ import STYLES from "./BpkCloseButton.module.css";
|
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const getClassName = cssModules(STYLES);
|
|
23
23
|
const BpkCloseButton = props => {
|
|
24
|
-
const classNames = [getClassName('bpk-close-button')];
|
|
25
24
|
const {
|
|
26
25
|
className,
|
|
27
26
|
customIcon,
|
|
28
27
|
label,
|
|
29
28
|
onClick,
|
|
29
|
+
onDark,
|
|
30
30
|
...rest
|
|
31
31
|
} = props;
|
|
32
|
+
const classNames = [onDark ? getClassName('bpk-close-button__onDark') : getClassName('bpk-close-button__default')];
|
|
32
33
|
const Icon = customIcon || CloseIcon;
|
|
33
34
|
if (className) {
|
|
34
35
|
classNames.push(className);
|
|
@@ -44,7 +45,7 @@ const BpkCloseButton = props => {
|
|
|
44
45
|
className: classNames.join(' '),
|
|
45
46
|
...rest,
|
|
46
47
|
children: /*#__PURE__*/_jsx("span", {
|
|
47
|
-
className: getClassName('bpk-close-
|
|
48
|
+
className: getClassName('bpk-close-button-icon'),
|
|
48
49
|
children: /*#__PURE__*/_jsx(Icon, {})
|
|
49
50
|
})
|
|
50
51
|
})
|
|
@@ -54,10 +55,12 @@ BpkCloseButton.propTypes = {
|
|
|
54
55
|
label: PropTypes.string.isRequired,
|
|
55
56
|
onClick: PropTypes.func.isRequired,
|
|
56
57
|
className: PropTypes.string,
|
|
57
|
-
customIcon: PropTypes.func
|
|
58
|
+
customIcon: PropTypes.func,
|
|
59
|
+
onDark: PropTypes.Boolean
|
|
58
60
|
};
|
|
59
61
|
BpkCloseButton.defaultProps = {
|
|
60
62
|
className: null,
|
|
61
|
-
customIcon: null
|
|
63
|
+
customIcon: null,
|
|
64
|
+
onDark: false
|
|
62
65
|
};
|
|
63
66
|
export default BpkCloseButton;
|
|
@@ -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-close-button{width:1.5rem;height:1.5rem;margin-right:-0.125rem;margin-left:-0.125rem;padding:0;border:0;background-color:rgba(0,0,0,0);
|
|
18
|
+
.bpk-close-button{width:1.5rem;height:1.5rem;margin-right:-0.125rem;margin-left:-0.125rem;padding:0;border:0;background-color:rgba(0,0,0,0);font-size:1.5rem;cursor:pointer;appearance:none;position:relative}.bpk-close-button::before{position:absolute;top:calc(-2.75rem/2 + 50%);left:calc(-2.75rem/2 + 50%);content:"";width:2.75rem;height:2.75rem}.bpk-close-button__default{color:#161616;composes:bpk-close-button}.bpk-no-touch-support .bpk-close-button__default:hover:not(:active):not(:disabled){color:#161616}:global(.bpk-no-touch-support) .bpk-close-button__default:hover:not(:active):not(:disabled){color:#161616}.bpk-close-button__default:active{color:#161616}.bpk-close-button__onDark{color:#fff;composes:bpk-close-button}.bpk-no-touch-support .bpk-close-button__onDark:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-close-button__onDark:hover:not(:active):not(:disabled){color:#fff}.bpk-close-button__onDark:active{color:#fff}.bpk-close-button-icon{fill:currentcolor}
|
|
@@ -40,11 +40,17 @@ const BpkContentCard = ({
|
|
|
40
40
|
loading: "lazy"
|
|
41
41
|
})
|
|
42
42
|
}), /*#__PURE__*/_jsxs("div", {
|
|
43
|
-
children: [/*#__PURE__*/_jsx(BpkText
|
|
43
|
+
children: [/*#__PURE__*/_jsx(BpkText
|
|
44
|
+
// TODO: className to be removed.
|
|
45
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
46
|
+
, {
|
|
44
47
|
className: getClassName('bpk-content-card--headline'),
|
|
45
48
|
tagName: "h3",
|
|
46
49
|
children: card.headline
|
|
47
|
-
}), /*#__PURE__*/_jsx(BpkText
|
|
50
|
+
}), /*#__PURE__*/_jsx(BpkText
|
|
51
|
+
// TODO: className to be removed.
|
|
52
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
53
|
+
, {
|
|
48
54
|
className: getClassName('bpk-content-card--description'),
|
|
49
55
|
tagName: "p",
|
|
50
56
|
children: card.description
|
|
@@ -21,8 +21,8 @@ import { useMemo, useState } from 'react';
|
|
|
21
21
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
22
|
import { useTable, useSortBy } from 'react-table';
|
|
23
23
|
import { cssModules } from "../../bpk-react-utils";
|
|
24
|
-
import { SORT_DIRECTION_TYPES } from "./common-types";
|
|
25
24
|
import BpkDataTableHeader from "./BpkDataTableHeader";
|
|
25
|
+
import { SORT_DIRECTION_TYPES } from "./common-types";
|
|
26
26
|
import { createColumnsSchema } from "./utils";
|
|
27
27
|
import STYLES from "./BpkDataTable.module.css";
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import { withRtlSupport } from "../../bpk-component-icon";
|
|
20
20
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
21
21
|
import BpkSmallArrowDownIcon from "../../bpk-component-icon/sm/arrow-down";
|
|
22
22
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
23
23
|
import BpkSmallArrowUpIcon from "../../bpk-component-icon/sm/arrow-up";
|
|
24
|
-
import {
|
|
24
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
25
25
|
import { SORT_DIRECTION_TYPES } from "./common-types";
|
|
26
26
|
import STYLES from "./BpkDataTableHeader.module.css";
|
|
27
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -110,12 +110,16 @@ const BpkDataTableHeader = ({
|
|
|
110
110
|
}), !disableSortBy && /*#__PURE__*/_jsxs("div", {
|
|
111
111
|
className: getClassName('bpk-data-table-column__sort-icons'),
|
|
112
112
|
"aria-hidden": true,
|
|
113
|
-
children: [/*#__PURE__*/_jsx(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
114
|
+
className: upIconClassNames,
|
|
115
|
+
children: /*#__PURE__*/_jsx(UpIcon, {
|
|
116
|
+
onClick: () => column.toggleSortBy(false)
|
|
117
|
+
})
|
|
118
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
119
|
+
className: downIconClassNames,
|
|
120
|
+
children: /*#__PURE__*/_jsx(DownIcon, {
|
|
121
|
+
onClick: () => column.toggleSortBy(true)
|
|
122
|
+
})
|
|
119
123
|
})]
|
|
120
124
|
}, "sort")]
|
|
121
125
|
});
|
|
@@ -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-data-table-column__header{display:flex;height:100%;margin:1rem;flex-direction:row;align-items:center;outline-offset:-0.25rem;font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-data-table-column__header:hover{cursor:pointer}.bpk-data-table-column__sort-icons{margin:0 0 0 .75rem}html[dir=rtl] .bpk-data-table-column__sort-icons{margin:0 .75rem 0 0}.bpk-data-table-column__sort-icon{display:block;fill:#c1c7cf}.bpk-data-table-column__sort-icon:hover{fill:#c1c7cf}.bpk-data-table-column__sort-icon--selected,.bpk-data-table-column__sort-icon--selected:hover{fill:#0062e3}.bpk-data-table-column__sort-icon--up{margin-bottom:-0.25rem}
|
|
18
|
+
.bpk-data-table-column__header{display:flex;height:100%;margin:1rem;flex-direction:row;align-items:center;outline-offset:-0.25rem;font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-data-table-column__header:hover{cursor:pointer}.bpk-data-table-column__sort-icons{margin:0 0 0 .75rem}html[dir=rtl] .bpk-data-table-column__sort-icons{margin:0 .75rem 0 0}.bpk-data-table-column__sort-icon{display:block;line-height:.5rem;fill:#c1c7cf}.bpk-data-table-column__sort-icon:hover{fill:#c1c7cf}.bpk-data-table-column__sort-icon--selected,.bpk-data-table-column__sort-icon--selected:hover{fill:#0062e3}.bpk-data-table-column__sort-icon--up{margin-bottom:-0.25rem}
|
|
@@ -17,16 +17,13 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { createRef, Component } from 'react';
|
|
20
|
+
import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
|
|
21
|
+
import { composeCalendar, BpkCalendarGridHeader, BpkCalendarGrid, BpkCalendarDate, withCalendarState, CALENDAR_SELECTION_TYPE, DateUtils, BpkCalendarNav } from "../../bpk-component-calendar";
|
|
20
22
|
import BpkInput, { withOpenEvents } from "../../bpk-component-input";
|
|
21
23
|
import BpkModal from "../../bpk-component-modal";
|
|
22
24
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
23
25
|
import BpkPopover from "../../bpk-component-popover";
|
|
24
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
25
|
-
import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
|
|
26
|
-
import { composeCalendar, BpkCalendarGridHeader, BpkCalendarGrid, BpkCalendarDate, withCalendarState, CALENDAR_SELECTION_TYPE, DateUtils, BpkCalendarNav } from "../../bpk-component-calendar";
|
|
27
|
-
import STYLES from "./BpkDatepicker.module.css";
|
|
28
26
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
const getClassName = cssModules(STYLES);
|
|
30
27
|
const Input = withOpenEvents(BpkInput);
|
|
31
28
|
const DefaultCalendar = withCalendarState(composeCalendar(BpkCalendarNav, BpkCalendarGridHeader, BpkCalendarGrid, BpkCalendarDate));
|
|
32
29
|
class BpkDatepicker extends Component {
|
|
@@ -192,7 +189,6 @@ class BpkDatepicker extends Component {
|
|
|
192
189
|
delete rest.onOpenChange;
|
|
193
190
|
delete rest.isOpen;
|
|
194
191
|
const input = inputComponent || /*#__PURE__*/_jsx("div", {
|
|
195
|
-
className: getClassName('bpk-datepicker__input'),
|
|
196
192
|
ref: this.inputRef,
|
|
197
193
|
children: /*#__PURE__*/_jsx(Input, {
|
|
198
194
|
id: id,
|
|
@@ -210,7 +206,6 @@ class BpkDatepicker extends Component {
|
|
|
210
206
|
});
|
|
211
207
|
const calendarProps = {
|
|
212
208
|
id: `${id}-calendar`,
|
|
213
|
-
className: getClassName('bpk-datepicker__calendar'),
|
|
214
209
|
changeMonthLabel,
|
|
215
210
|
dateModifiers,
|
|
216
211
|
daysOfWeek,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
import BpkDescriptionDetails from "./src/BpkDescriptionDetails";
|
|
19
20
|
import BpkDescriptionList from "./src/BpkDescriptionList";
|
|
20
21
|
import BpkDescriptionTerm from "./src/BpkDescriptionTerm";
|
|
21
|
-
import BpkDescriptionDetails from "./src/BpkDescriptionDetails";
|
|
22
22
|
export { BpkDescriptionList, BpkDescriptionTerm, BpkDescriptionDetails };
|
|
@@ -31,11 +31,16 @@ const buildComponent = (TagName, baseClassName) => {
|
|
|
31
31
|
if (className) {
|
|
32
32
|
classNames.push(className);
|
|
33
33
|
}
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
return (
|
|
35
|
+
/*#__PURE__*/
|
|
36
|
+
// TODO: className to be removed
|
|
37
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
38
|
+
_jsx(TagName, {
|
|
39
|
+
className: classNames.join(' '),
|
|
40
|
+
...rest,
|
|
41
|
+
children: children
|
|
42
|
+
})
|
|
43
|
+
);
|
|
39
44
|
};
|
|
40
45
|
Component.propTypes = {
|
|
41
46
|
children: PropTypes.node.isRequired,
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules, Portal } from "../../bpk-react-utils";
|
|
20
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
21
20
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
21
|
+
import { cssModules, Portal } from "../../bpk-react-utils";
|
|
22
22
|
import BpkDialogInner from "./BpkDialogInner";
|
|
23
23
|
import { HEADER_ICON_TYPES } from "./common-types";
|
|
24
24
|
import STYLES from "./BpkDialog.module.css";
|
|
@@ -55,10 +55,12 @@ const BpkDialog = ({
|
|
|
55
55
|
children: [headerIcon && /*#__PURE__*/_jsx("div", {
|
|
56
56
|
className: headerIconClassNames,
|
|
57
57
|
children: headerIcon
|
|
58
|
-
}), dismissible && /*#__PURE__*/_jsx(
|
|
58
|
+
}), dismissible && /*#__PURE__*/_jsx("span", {
|
|
59
59
|
className: closeButtonClassNames,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
children: /*#__PURE__*/_jsx(BpkCloseButton, {
|
|
61
|
+
label: closeLabel,
|
|
62
|
+
onClick: onClose
|
|
63
|
+
})
|
|
62
64
|
}), children]
|
|
63
65
|
})
|
|
64
66
|
});
|
|
@@ -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-dialog__container{display:flex;padding:1.5rem}@media screen\0 {.bpk-dialog__container{display:block}}.bpk-dialog__close-button{float:right;margin:0
|
|
18
|
+
.bpk-dialog__container{display:flex;padding:1.5rem}@media screen\0 {.bpk-dialog__container{display:block}}.bpk-dialog__close-button{float:right;margin:0 .125rem 1rem 1rem}html[dir=rtl] .bpk-dialog__close-button{float:left;margin:0 1rem 1rem .125rem}.bpk-dialog--with-icon{margin-top:2rem}.bpk-dialog__icon{position:absolute;top:0;left:50%;display:flex;width:3.5rem;height:3.5rem;margin-top:-1.75rem;margin-left:-1.75rem;justify-content:center;align-items:center;border:4px #fff solid;border-radius:50%}.bpk-dialog__icon--primary{background-color:#0062e3}.bpk-dialog__icon--warning{background-color:#f55d42}.bpk-dialog__icon--destructive{background-color:#e70866}.bpk-dialog__icon>svg{fill:#fff}
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
20
|
-
import { withScrim } from "../../bpk-scrim-utils";
|
|
21
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
20
|
import { BpkContentBubble } from "../../bpk-component-flare";
|
|
21
|
+
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
22
|
+
import { withScrim } from "../../bpk-scrim-utils";
|
|
23
23
|
import STYLES from "./BpkDialogInner.module.css";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
@@ -48,7 +48,10 @@ const BpkDialogInner = props => {
|
|
|
48
48
|
"aria-label": ariaLabel,
|
|
49
49
|
className: classNames,
|
|
50
50
|
ref: dialogRef,
|
|
51
|
-
children: [flare && /*#__PURE__*/_jsx(BpkContentBubble
|
|
51
|
+
children: [flare && /*#__PURE__*/_jsx(BpkContentBubble
|
|
52
|
+
// TODO: className to be removed
|
|
53
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
54
|
+
, {
|
|
52
55
|
className: flareClassNames
|
|
53
56
|
}), /*#__PURE__*/_jsx("div", {
|
|
54
57
|
className: contentClassNames,
|
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
18
|
import { Component } from 'react';
|
|
19
|
-
import { Portal
|
|
19
|
+
import { Portal } from "../../bpk-react-utils";
|
|
20
20
|
import { withScrim } from "../../bpk-scrim-utils";
|
|
21
21
|
import BpkDrawerContent from "./BpkDrawerContent";
|
|
22
|
-
import STYLES from "./BpkDrawer.module.css";
|
|
23
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
const getClassName = cssModules(STYLES);
|
|
25
23
|
const BpkScrimDrawerContent = withScrim(BpkDrawerContent);
|
|
26
24
|
class BpkDrawer extends Component {
|
|
27
25
|
constructor() {
|
|
@@ -63,7 +61,6 @@ class BpkDrawer extends Component {
|
|
|
63
61
|
isDrawerShown: isDrawerShown,
|
|
64
62
|
onClose: this.hide,
|
|
65
63
|
onCloseAnimationComplete: this.onCloseAnimationComplete,
|
|
66
|
-
containerClassName: getClassName('bpk-drawer__container'),
|
|
67
64
|
...rest
|
|
68
65
|
})
|
|
69
66
|
});
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
18
|
import Transition from 'react-transition-group/Transition';
|
|
19
19
|
import { animations } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
21
|
-
import { BpkButtonLink } from "../../bpk-component-link";
|
|
22
20
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
21
|
+
import { BpkButtonLink } from "../../bpk-component-link";
|
|
22
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
23
23
|
import STYLES from "./BpkDrawerContent.module.css";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
@@ -88,10 +88,12 @@ const BpkDrawerContent = props => {
|
|
|
88
88
|
}), "\xA0", closeText ? /*#__PURE__*/_jsx(BpkButtonLink, {
|
|
89
89
|
onClick: onClose,
|
|
90
90
|
children: closeText
|
|
91
|
-
}) : /*#__PURE__*/_jsx(
|
|
91
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
92
92
|
className: getClassName('bpk-drawer__close-button'),
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
children: /*#__PURE__*/_jsx(BpkCloseButton, {
|
|
94
|
+
label: closeLabel,
|
|
95
|
+
onClick: onClose
|
|
96
|
+
})
|
|
95
97
|
})]
|
|
96
98
|
}), /*#__PURE__*/_jsx("div", {
|
|
97
99
|
className: contentClassNames.join(' '),
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
18
|
import { cloneElement } from 'react';
|
|
19
|
-
import BpkLabel from "../../bpk-component-label";
|
|
20
19
|
import BpkFormValidation from "../../bpk-component-form-validation";
|
|
20
|
+
import BpkLabel from "../../bpk-component-label";
|
|
21
21
|
import { cssModules } from "../../bpk-react-utils";
|
|
22
22
|
import STYLES from "./BpkFieldset.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -82,13 +82,15 @@ const BpkFieldset = props => {
|
|
|
82
82
|
_jsxs("fieldset", {
|
|
83
83
|
className: classNames.join(' '),
|
|
84
84
|
...rest,
|
|
85
|
-
children: [!isCheckbox && /*#__PURE__*/_jsx(
|
|
85
|
+
children: [!isCheckbox && /*#__PURE__*/_jsx("div", {
|
|
86
86
|
className: getClassName('bpk-fieldset__label'),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
children: /*#__PURE__*/_jsx(BpkLabel, {
|
|
88
|
+
htmlFor: childId,
|
|
89
|
+
required: required,
|
|
90
|
+
disabled: disabled,
|
|
91
|
+
valid: isValid,
|
|
92
|
+
children: label
|
|
93
|
+
})
|
|
92
94
|
}), clonedChildren, description && /*#__PURE__*/_jsx("span", {
|
|
93
95
|
className: getClassName('bpk-fieldset__description'),
|
|
94
96
|
id: descriptionId,
|
|
@@ -14,7 +14,7 @@
|
|
|
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
|
|
17
|
+
*/import BpkContentBubble from "./src/BpkContentBubble";
|
|
18
|
+
import BpkFlareBar from "./src/BpkFlareBar";
|
|
19
19
|
export default BpkFlareBar;
|
|
20
20
|
export { BpkFlareBar, BpkContentBubble };
|
|
@@ -58,7 +58,10 @@ const BpkContentBubble = props => {
|
|
|
58
58
|
className: contentClassNames.join(' '),
|
|
59
59
|
children: content && content
|
|
60
60
|
}), showPointer && /*#__PURE__*/_jsx(BpkFlareBar, {
|
|
61
|
-
rounded: rounded
|
|
61
|
+
rounded: rounded
|
|
62
|
+
// TODO: className to be removed
|
|
63
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
64
|
+
,
|
|
62
65
|
className: getClassName('bpk-content-bubble__pointer'),
|
|
63
66
|
...flareProps
|
|
64
67
|
})]
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import { cssModules } from "../../bpk-react-utils";
|
|
21
|
-
import Pointer from "./__generated__/js/pointer";
|
|
22
21
|
import CornerRadius from "./__generated__/js/corner-radius";
|
|
22
|
+
import Pointer from "./__generated__/js/pointer";
|
|
23
23
|
import STYLES from "./bpk-flare-bar.module.css";
|
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
@@ -45,11 +45,20 @@ const BpkFlareBar = props => {
|
|
|
45
45
|
return /*#__PURE__*/_jsxs("div", {
|
|
46
46
|
className: classNames.join(' '),
|
|
47
47
|
...rest,
|
|
48
|
-
children: [/*#__PURE__*/_jsx(Pointer
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Pointer
|
|
49
|
+
// TODO: className to be removed
|
|
50
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
51
|
+
, {
|
|
49
52
|
className: curveClassNames.join(' ')
|
|
50
|
-
}), rounded && /*#__PURE__*/_jsx(CornerRadius
|
|
53
|
+
}), rounded && /*#__PURE__*/_jsx(CornerRadius
|
|
54
|
+
// TODO: className to be removed
|
|
55
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
56
|
+
, {
|
|
51
57
|
className: leftCornerRadiusClassNames.join(' ')
|
|
52
|
-
}), rounded && /*#__PURE__*/_jsx(CornerRadius
|
|
58
|
+
}), rounded && /*#__PURE__*/_jsx(CornerRadius
|
|
59
|
+
// TODO: className to be removed
|
|
60
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
61
|
+
, {
|
|
53
62
|
className: rightCornerRadiusClassNames.join(' ')
|
|
54
63
|
})]
|
|
55
64
|
});
|
|
@@ -70,7 +70,10 @@ const BpkFloatingNotification = props => {
|
|
|
70
70
|
})
|
|
71
71
|
}), /*#__PURE__*/_jsx(BpkText, {
|
|
72
72
|
tagName: "p",
|
|
73
|
-
textStyle: TEXT_STYLES.bodyDefault
|
|
73
|
+
textStyle: TEXT_STYLES.bodyDefault
|
|
74
|
+
// TODO: className to be removed
|
|
75
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
76
|
+
,
|
|
74
77
|
className: getClassName('bpk-floating-notification__text'),
|
|
75
78
|
children: text
|
|
76
79
|
}), /*#__PURE__*/_jsx(BpkAriaLive, {
|
|
@@ -78,7 +81,10 @@ const BpkFloatingNotification = props => {
|
|
|
78
81
|
children: text
|
|
79
82
|
}), ctaText && /*#__PURE__*/_jsx(BpkButtonV2, {
|
|
80
83
|
type: BUTTON_TYPES.linkOnDark,
|
|
81
|
-
onClick: onClick
|
|
84
|
+
onClick: onClick
|
|
85
|
+
// TODO: className to be removed
|
|
86
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
87
|
+
,
|
|
82
88
|
className: getClassName('bpk-floating-notification__button'),
|
|
83
89
|
children: ctaText
|
|
84
90
|
})]
|
|
@@ -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-floating-notification{position:absolute;right:0;bottom:2rem;left:0;display:flex;max-width:25rem;margin:auto;padding:1.5rem;transition:opacity 400ms ease-in-out,transform 400ms ease-in-out;border-radius:.75rem;background:#05203c;color:#fff;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25),0px 4px 14px 0px rgba(37,32,31,.25)}@media(max-width: 32rem){.bpk-floating-notification{max-width:100%;padding:1rem}}.bpk-floating-notification--leave{transform:translateY(0);opacity:1}.bpk-floating-notification--leave-active{transform:translateY(2rem);opacity:0}.bpk-floating-notification--leave-done{opacity:0}.bpk-floating-notification--appear{transform:translateY(2rem);opacity:0}.bpk-floating-notification--appear-active{transform:translateY(0);opacity:1}.bpk-floating-notification__button{min-height:0;padding:0;color:#fff;margin-inline-start:auto;word-break:keep-all}.bpk-floating-notification__icon{margin-right:.5rem;margin-left:.25rem;flex-shrink:0;transform:translateY(0.25rem);text-align:bottom;fill:#fff}.bpk-floating-notification__text{margin-inline-end:.5rem}
|
|
18
|
+
.bpk-floating-notification{position:absolute;right:0;bottom:2rem;left:0;display:flex;z-index:2;max-width:25rem;margin:auto;padding:1.5rem;transition:opacity 400ms ease-in-out,transform 400ms ease-in-out;border-radius:.75rem;background:#05203c;color:#fff;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25),0px 4px 14px 0px rgba(37,32,31,.25)}@media(max-width: 32rem){.bpk-floating-notification{max-width:100%;padding:1rem}}.bpk-floating-notification--leave{transform:translateY(0);opacity:1}.bpk-floating-notification--leave-active{transform:translateY(2rem);opacity:0}.bpk-floating-notification--leave-done{opacity:0}.bpk-floating-notification--appear{transform:translateY(2rem);opacity:0}.bpk-floating-notification--appear-active{transform:translateY(0);opacity:1}.bpk-floating-notification__button{min-height:0;padding:0;color:#fff;margin-inline-start:auto;word-break:keep-all}.bpk-floating-notification__icon{margin-right:.5rem;margin-left:.25rem;flex-shrink:0;transform:translateY(0.25rem);text-align:bottom;fill:#fff}.bpk-floating-notification__text{margin-inline-end:.5rem}
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import { lineHeightSm, iconSizeSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
21
21
|
import AnimateHeight from "../../bpk-animate-height";
|
|
22
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
23
|
-
import BpkSmallExclamationIcon from "../../bpk-component-icon/sm/exclamation-circle";
|
|
24
22
|
import { withAlignment } from "../../bpk-component-icon";
|
|
23
|
+
import BpkSmallExclamationIcon from "../../bpk-component-icon/sm/exclamation-circle";
|
|
24
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
25
25
|
import STYLES from "./BpkFormValidation.module.css";
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const getClassName = cssModules(STYLES);
|
|
@@ -46,8 +46,9 @@ const BpkFormValidation = props => {
|
|
|
46
46
|
children: /*#__PURE__*/_jsxs("div", {
|
|
47
47
|
className: classNames,
|
|
48
48
|
...rest,
|
|
49
|
-
children: [/*#__PURE__*/_jsx(
|
|
50
|
-
className: getClassName('bpk-form-validation__icon')
|
|
49
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
50
|
+
className: getClassName('bpk-form-validation__icon'),
|
|
51
|
+
children: /*#__PURE__*/_jsx(AlignedExclamationIcon, {})
|
|
51
52
|
}), children]
|
|
52
53
|
})
|
|
53
54
|
})
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
-
import BpkText from "../../bpk-component-text";
|
|
21
19
|
import { BpkButtonV2, BUTTON_TYPES } from "../../bpk-component-button";
|
|
20
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
22
21
|
import STYLES from "./BpkGraphicPromo.module.css";
|
|
23
22
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
23
|
const getClassName = cssModules(STYLES);
|
|
@@ -101,8 +100,7 @@ const BpkGraphicPromo = ({
|
|
|
101
100
|
children: [/*#__PURE__*/_jsx("div", {
|
|
102
101
|
className: getTextClasses('bpk-graphic-promo__sponsor-content'),
|
|
103
102
|
children: sponsor && /*#__PURE__*/_jsxs(_Fragment, {
|
|
104
|
-
children: [/*#__PURE__*/_jsx(
|
|
105
|
-
tagName: "span",
|
|
103
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
106
104
|
className: getClassName('bpk-graphic-promo__sponsor-label'),
|
|
107
105
|
children: sponsor.label
|
|
108
106
|
}), /*#__PURE__*/_jsx("img", {
|
|
@@ -113,20 +111,20 @@ const BpkGraphicPromo = ({
|
|
|
113
111
|
})
|
|
114
112
|
}), /*#__PURE__*/_jsxs("div", {
|
|
115
113
|
className: getTextClasses('bpk-graphic-promo__promo-content'),
|
|
116
|
-
children: [!sponsor && tagline && /*#__PURE__*/_jsx(
|
|
117
|
-
tagName: "span",
|
|
114
|
+
children: [!sponsor && tagline && /*#__PURE__*/_jsx("span", {
|
|
118
115
|
className: getClassName('bpk-graphic-promo__tagline'),
|
|
119
116
|
children: tagline
|
|
120
|
-
}), /*#__PURE__*/_jsx(
|
|
121
|
-
tagName: "h2",
|
|
117
|
+
}), /*#__PURE__*/_jsx("h2", {
|
|
122
118
|
className: getClassName('bpk-graphic-promo__headline'),
|
|
123
119
|
children: headline
|
|
124
|
-
}), subheading && /*#__PURE__*/_jsx(
|
|
125
|
-
tagName: "p",
|
|
120
|
+
}), subheading && /*#__PURE__*/_jsx("p", {
|
|
126
121
|
className: getClassName('bpk-graphic-promo__subheading'),
|
|
127
122
|
children: subheading
|
|
128
123
|
}), /*#__PURE__*/_jsx(BpkButtonV2, {
|
|
129
|
-
type: BUTTON_TYPES.primaryOnDark
|
|
124
|
+
type: BUTTON_TYPES.primaryOnDark
|
|
125
|
+
// TODO: className to be removed
|
|
126
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
127
|
+
,
|
|
130
128
|
className: getClassName('bpk-graphic-promo__cta'),
|
|
131
129
|
onClick: onClickWrapper,
|
|
132
130
|
tabIndex: -1 /* button is not focusable for accessibility */,
|
|
@@ -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-card{position:relative;display:block;background-color:#fff;color:#161616;text-decoration:none;cursor:pointer;box-shadow:0px 1px 3px 0px rgba(37,32,31,.3);border-radius:.75rem}.bpk-no-touch-support .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}:global(.bpk-no-touch-support) .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}.bpk-card::after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";transition:opacity 200ms ease-in-out;opacity:0;pointer-events:none;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25);border-radius:.75rem}@media screen\0 {.bpk-card::after{z-index:-1}}.bpk-card:active::after{box-shadow:none}.bpk-graphic-promo{max-width:76.5rem;margin-right:auto;margin-left:auto;background-color:#05203c;background-position:center;background-size:cover;color:#fff;box-shadow:none}@media(max-width: 48rem){.bpk-graphic-promo{padding-top:133%;box-sizing:border-box}}.bpk-graphic-promo::after{display:none}.bpk-graphic-promo__container{display:flex;flex-direction:column;justify-content:center}.bpk-graphic-promo__container--start{align-items:start}.bpk-graphic-promo__container--center{align-items:center}.bpk-graphic-promo__container--end{align-items:end}@media(min-width: 64.0625rem){.bpk-graphic-promo__container{height:28.75rem;margin-left:4rem;margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:4rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2.5rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:1.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:1.5rem;margin-right:0}}@media(max-width: 64rem){.bpk-graphic-promo__container{height:22.5rem;margin-left:2.5rem;margin-right:2rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:.5rem;margin-right:0}}@media(max-width: 48rem){.bpk-graphic-promo__container{padding:2rem;justify-content:space-between;align-items:start;text-align:start;margin-left:0;margin-right:0;position:absolute;top:0;right:0;left:0;height:100%}html[dir=rtl] .bpk-graphic-promo__container{margin-left:0;margin-right:0}.bpk-graphic-promo__container--inverted{flex-direction:column-reverse}.bpk-graphic-promo__container>*{margin-left:0;margin-right:0}html[dir=rtl] .bpk-graphic-promo__container>*{margin-left:0;margin-right:0}}@media(max-width: 22.4375rem){.bpk-graphic-promo__container{padding:1.5rem}}.bpk-graphic-promo__tagline{margin-bottom:.5rem;font-size:1rem;line-height:1.25rem;font-weight:700}@media(max-width: 64rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__tagline{font-size:1.5rem;line-height:2rem;font-weight:400}}@media(max-width: 22.4375rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}@media(min-width: 64.0625rem){.bpk-graphic-promo__headline{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__headline{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 48rem){.bpk-graphic-promo__headline{margin-bottom:.5rem}}@media(max-width: 32rem){.bpk-graphic-promo__headline{font-size:2rem;line-height:2.5rem;font-weight:700}}.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.5rem;font-weight:400}@media(max-width: 64rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__subheading{font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 32rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{display:flex;flex-direction:column}.bpk-graphic-promo__promo-content--start,.bpk-graphic-promo__sponsor-content--start{align-items:start;text-align:start}.bpk-graphic-promo__promo-content--center,.bpk-graphic-promo__sponsor-content--center{align-items:center;text-align:center}.bpk-graphic-promo__promo-content--end,.bpk-graphic-promo__sponsor-content--end{align-items:start;text-align:start}@media(min-width: 64.0625rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:22.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:20rem}}@media(max-width: 48rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:initial;align-items:start;text-align:start}}.bpk-graphic-promo__sponsor-content{display:flex;margin-bottom:1rem;flex-direction:column}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-content{margin-bottom:initial}}.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.5rem;font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 22.4375rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__sponsor-logo{width:auto;max-width:9.25rem;height:auto;max-height:3.75rem}.bpk-graphic-promo__cta{margin-top:2rem}@media(max-width: 48rem){.bpk-graphic-promo__cta{display:none}}
|
|
18
|
+
.bpk-card{position:relative;display:block;background-color:#fff;color:#161616;text-decoration:none;cursor:pointer;box-shadow:0px 1px 3px 0px rgba(37,32,31,.3);border-radius:.75rem}.bpk-no-touch-support .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}:global(.bpk-no-touch-support) .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}.bpk-card::after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";transition:opacity 200ms ease-in-out;opacity:0;pointer-events:none;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25);border-radius:.75rem}@media screen\0 {.bpk-card::after{z-index:-1}}.bpk-card:active::after{box-shadow:none}.bpk-graphic-promo{max-width:76.5rem;margin-right:auto;margin-left:auto;background-color:#05203c;background-position:center;background-size:cover;color:#fff;box-shadow:none}@media(max-width: 48rem){.bpk-graphic-promo{padding-top:133%;box-sizing:border-box}}.bpk-graphic-promo::after{display:none}.bpk-graphic-promo__container{display:flex;flex-direction:column;justify-content:center}.bpk-graphic-promo__container--start{align-items:start}.bpk-graphic-promo__container--center{align-items:center}.bpk-graphic-promo__container--end{align-items:end}@media(min-width: 64.0625rem){.bpk-graphic-promo__container{height:28.75rem;margin-left:4rem;margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:4rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2.5rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:1.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:1.5rem;margin-right:0}}@media(max-width: 64rem){.bpk-graphic-promo__container{height:22.5rem;margin-left:2.5rem;margin-right:2rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:.5rem;margin-right:0}}@media(max-width: 48rem){.bpk-graphic-promo__container{padding:2rem;justify-content:space-between;align-items:start;text-align:start;margin-left:0;margin-right:0;position:absolute;top:0;right:0;left:0;height:100%}html[dir=rtl] .bpk-graphic-promo__container{margin-left:0;margin-right:0}.bpk-graphic-promo__container--inverted{flex-direction:column-reverse}.bpk-graphic-promo__container>*{margin-left:0;margin-right:0}html[dir=rtl] .bpk-graphic-promo__container>*{margin-left:0;margin-right:0}}@media(max-width: 22.4375rem){.bpk-graphic-promo__container{padding:1.5rem}}.bpk-graphic-promo__tagline{margin-bottom:.5rem;font-size:1rem;line-height:1.25rem;font-weight:700}@media(max-width: 64rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__tagline{font-size:1.5rem;line-height:2rem;font-weight:400}}@media(max-width: 22.4375rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__headline{margin:0}@media(min-width: 64.0625rem){.bpk-graphic-promo__headline{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__headline{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 48rem){.bpk-graphic-promo__headline{margin-bottom:.5rem}}@media(max-width: 32rem){.bpk-graphic-promo__headline{font-size:2rem;line-height:2.5rem;font-weight:700}}.bpk-graphic-promo__subheading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:400}@media(max-width: 64rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__subheading{font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 32rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{display:flex;flex-direction:column}.bpk-graphic-promo__promo-content--start,.bpk-graphic-promo__sponsor-content--start{align-items:start;text-align:start}.bpk-graphic-promo__promo-content--center,.bpk-graphic-promo__sponsor-content--center{align-items:center;text-align:center}.bpk-graphic-promo__promo-content--end,.bpk-graphic-promo__sponsor-content--end{align-items:start;text-align:start}@media(min-width: 64.0625rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:22.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:20rem}}@media(max-width: 48rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:initial;align-items:start;text-align:start}}.bpk-graphic-promo__sponsor-content{display:flex;margin-bottom:1rem;flex-direction:column}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-content{margin-bottom:initial}}.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.5rem;font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 22.4375rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__sponsor-logo{width:auto;max-width:9.25rem;height:auto;max-height:3.75rem}.bpk-graphic-promo__cta{margin-top:2rem}@media(max-width: 48rem){.bpk-graphic-promo__cta{display:none}}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import { Component } from 'react';
|
|
21
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
22
21
|
import { BpkButtonLink } from "../../bpk-component-link";
|
|
22
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
23
23
|
import STYLES from "./BpkGridToggle.module.css";
|
|
24
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
26
26
|
const GRID_CLASS_NAME = getClassName('bpk-vertical-grid--on');
|
|
27
27
|
class BpkGridToggle extends Component {
|
|
@@ -58,11 +58,13 @@ class BpkGridToggle extends Component {
|
|
|
58
58
|
gridEnabled
|
|
59
59
|
} = this.state;
|
|
60
60
|
const onOrOff = gridEnabled ? 'off' : 'on';
|
|
61
|
-
return /*#__PURE__*/
|
|
62
|
-
title: "Keyboard Shortcut: ctrl + cmd + g",
|
|
63
|
-
onClick: this.toggleGrid,
|
|
61
|
+
return /*#__PURE__*/_jsx("span", {
|
|
64
62
|
className: className,
|
|
65
|
-
children:
|
|
63
|
+
children: /*#__PURE__*/_jsxs(BpkButtonLink, {
|
|
64
|
+
title: "Keyboard Shortcut: ctrl + cmd + g",
|
|
65
|
+
onClick: this.toggleGrid,
|
|
66
|
+
children: ["Baseline grid ", onOrOff]
|
|
67
|
+
})
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
}
|