@skyscanner/backpack-web 33.4.0 → 33.5.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 +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 +3 -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 -2
- 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-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 +2 -2
- 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 +15 -4
- 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-skeleton/index.js +21 -0
- 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-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,9 +16,9 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { withScrim } from "../../bpk-scrim-utils";
|
|
20
19
|
import { Portal, cssModules, isDeviceIphone } from "../../bpk-react-utils";
|
|
21
|
-
import
|
|
20
|
+
import { withScrim } from "../../bpk-scrim-utils";
|
|
21
|
+
import BpkModalInner, { MODAL_STYLING } from "./BpkModalInner";
|
|
22
22
|
import STYLES from "./BpkModal.module.css";
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
@@ -36,6 +36,7 @@ const BpkModal = ({
|
|
|
36
36
|
fullScreenOnMobile = true,
|
|
37
37
|
isIphone = isDeviceIphone(),
|
|
38
38
|
isOpen,
|
|
39
|
+
modalStyle = MODAL_STYLING.default,
|
|
39
40
|
onClose = () => null,
|
|
40
41
|
padded = true,
|
|
41
42
|
renderTarget = null,
|
|
@@ -72,6 +73,7 @@ const BpkModal = ({
|
|
|
72
73
|
padded: padded,
|
|
73
74
|
accessoryView: accessoryView,
|
|
74
75
|
dialogRef: dialogRef,
|
|
76
|
+
modalStyle: modalStyle,
|
|
75
77
|
...rest
|
|
76
78
|
})
|
|
77
79
|
});
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import type { ReactNode } from 'react';
|
|
20
|
+
import { ModalStyle } from './BpkModalInner';
|
|
20
21
|
export type Props = {
|
|
21
22
|
id: string;
|
|
22
23
|
children: ReactNode;
|
|
@@ -33,6 +34,7 @@ export type Props = {
|
|
|
33
34
|
title?: string | null;
|
|
34
35
|
closeLabel?: string;
|
|
35
36
|
closeText?: string | null;
|
|
37
|
+
modalStyle?: ModalStyle;
|
|
36
38
|
/**
|
|
37
39
|
* The accessory view allows for icons and actions to be placed in front of the main title inside the modal header. To be used with `BpkNavigationBarButtonLink`
|
|
38
40
|
*/
|
|
@@ -16,15 +16,19 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
|
-
import { BpkButtonLink } from "../../bpk-component-link";
|
|
21
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
20
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
23
|
-
import
|
|
21
|
+
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
|
+
import { BpkButtonLink } from "../../bpk-component-link";
|
|
23
|
+
import BpkNavigationBar, { BAR_STYLES } from "../../bpk-component-navigation-bar";
|
|
24
24
|
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
25
25
|
import STYLES from "./BpkModalInner.module.css";
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const getClassName = cssModules(STYLES);
|
|
28
|
+
export const MODAL_STYLING = {
|
|
29
|
+
default: 'default',
|
|
30
|
+
surfaceContrast: 'surface-contrast'
|
|
31
|
+
};
|
|
28
32
|
const BpkModalInner = ({
|
|
29
33
|
accessoryView = null,
|
|
30
34
|
children,
|
|
@@ -37,6 +41,7 @@ const BpkModalInner = ({
|
|
|
37
41
|
fullScreenOnMobile = true,
|
|
38
42
|
id,
|
|
39
43
|
isIphone,
|
|
44
|
+
modalStyle = MODAL_STYLING.default,
|
|
40
45
|
onClose = () => null,
|
|
41
46
|
padded = true,
|
|
42
47
|
showHeader = true,
|
|
@@ -46,6 +51,7 @@ const BpkModalInner = ({
|
|
|
46
51
|
const classNames = [getClassName('bpk-modal')];
|
|
47
52
|
const contentClassNames = [getClassName('bpk-modal__content')];
|
|
48
53
|
const navigationStyles = [getClassName('bpk-modal__navigation')];
|
|
54
|
+
classNames.push(getClassName(`bpk-modal__modal-style--${modalStyle}`));
|
|
49
55
|
if (wide) {
|
|
50
56
|
classNames.push(getClassName('bpk-modal--wide'));
|
|
51
57
|
}
|
|
@@ -82,7 +88,11 @@ const BpkModalInner = ({
|
|
|
82
88
|
children: [showHeader && /*#__PURE__*/_jsx("header", {
|
|
83
89
|
className: getClassName('bpk-modal__header'),
|
|
84
90
|
children: /*#__PURE__*/_jsx(BpkNavigationBar, {
|
|
85
|
-
|
|
91
|
+
barStyle: modalStyle === MODAL_STYLING.surfaceContrast ? BAR_STYLES.onDark : BAR_STYLES.default,
|
|
92
|
+
id: headingId
|
|
93
|
+
// TODO: className to be removed
|
|
94
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
95
|
+
,
|
|
86
96
|
className: navigationStyles.join(' '),
|
|
87
97
|
title: /*#__PURE__*/_jsx("h2", {
|
|
88
98
|
id: headingId,
|
|
@@ -90,12 +100,18 @@ const BpkModalInner = ({
|
|
|
90
100
|
children: title
|
|
91
101
|
}),
|
|
92
102
|
leadingButton: accessoryViewFinal,
|
|
93
|
-
trailingButton: closeText ? /*#__PURE__*/_jsx(BpkButtonLink
|
|
94
|
-
|
|
103
|
+
trailingButton: closeText ? /*#__PURE__*/_jsx(BpkButtonLink
|
|
104
|
+
// TODO: className to be removed
|
|
105
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
106
|
+
, {
|
|
107
|
+
className: [getClassName('bpk-modal__close-button'), getClassName(`bpk-modal__close-button-style--${modalStyle}`)].join(' '),
|
|
95
108
|
onClick: onClose,
|
|
96
109
|
children: closeText
|
|
97
|
-
}) : /*#__PURE__*/_jsx(BpkCloseButton
|
|
98
|
-
|
|
110
|
+
}) : /*#__PURE__*/_jsx(BpkCloseButton
|
|
111
|
+
// TODO: className to be removed
|
|
112
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
113
|
+
, {
|
|
114
|
+
className: [getClassName('bpk-modal__close-button'), getClassName(`bpk-modal__close-button-style--${modalStyle}`)].join(' '),
|
|
99
115
|
label: closeLabel,
|
|
100
116
|
onClick: onClose
|
|
101
117
|
})
|
|
@@ -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-modal{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-modal--full-screen-mobile{display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}}.bpk-modal--full-screen{max-width:none;display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}@media(min-width: 32.0625rem){.bpk-modal--wide{max-width:64rem}}.bpk-modal--appear{transform:scale(0.9);opacity:0}.bpk-modal--appear-active{transform:scale(1);opacity:1}.bpk-modal__header{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-modal__navigation{display:flex;justify-content:space-between
|
|
18
|
+
.bpk-modal{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-modal--full-screen-mobile{display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}}.bpk-modal--full-screen{max-width:none;display:flex;margin:0;flex-direction:column;border-radius:0;box-shadow:none}@media(min-width: 32.0625rem){.bpk-modal--wide{max-width:64rem}}.bpk-modal--appear{transform:scale(0.9);opacity:0}.bpk-modal--appear-active{transform:scale(1);opacity:1}.bpk-modal__modal-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__header{box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-modal__navigation{display:flex;justify-content:space-between}.bpk-modal__heading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-modal__close-button{position:relative;right:auto;margin-left:1rem;margin-right:0}html[dir=rtl] .bpk-modal__close-button{margin-left:0;margin-right:1rem}html[dir=rtl] .bpk-modal__close-button{left:auto}.bpk-modal__close-button-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-no-touch-support .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}.bpk-modal__accessory-view{position:relative;left:auto;margin-right:1rem}html[dir=rtl] .bpk-modal__accessory-view{right:auto;margin-left:1rem}.bpk-modal__content{flex:1;overflow-y:auto}.bpk-modal__content--padded{padding:1rem}
|
|
@@ -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
|
-
@keyframes bpk-modal-scrim{0%{opacity:0}100%{opacity:1}}@keyframes bpk-modal-scale{0%{transform:scale(0.9)}100%{transform:scale(1)}}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop{position:fixed;z-index:0;margin:0 auto;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal{position:fixed;top:50%;left:50%;display:block;z-index:1;transform:translate(-50%, -50%) scale(1);transition:transform 200ms ease-in-out 200ms}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal:not([data-open=true]),.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop:not([data-open=true]){display:none}.bpk-modal{width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:none;background:#fff;overflow-y:scroll;scrollbar-width:none;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-modal{width:32rem;max-width:none;height:fit-content;max-height:90%;border-radius:.75rem}.bpk-modal--full-screen-desktop{width:100%;height:100%;max-height:100%;border-radius:0}.bpk-modal--wide{width:64rem;max-width:100%}}.bpk-modal[open]{animation:bpk-modal-scale 200ms ease-in-out}.bpk-modal--no-full-screen-mobile{width:90%;max-width:none;height:fit-content;max-height:90%}@media(min-width: 32.0625rem){.bpk-modal--no-full-screen-mobile{width:32rem;max-width:none}}.bpk-modal::backdrop{position:fixed;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal::-webkit-scrollbar{display:none}.bpk-modal__header-title{padding:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__header-title-
|
|
18
|
+
@keyframes bpk-modal-scrim{0%{opacity:0}100%{opacity:1}}@keyframes bpk-modal-scale{0%{transform:scale(0.9)}100%{transform:scale(1)}}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop{position:fixed;z-index:0;margin:0 auto;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal{position:fixed;top:50%;left:50%;display:block;z-index:1;transform:translate(-50%, -50%) scale(1);transition:transform 200ms ease-in-out 200ms}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal:not([data-open=true]),.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop:not([data-open=true]){display:none}.bpk-modal{width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:none;background:#fff;overflow-y:scroll;scrollbar-width:none;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-modal{width:32rem;max-width:none;height:fit-content;max-height:90%;border-radius:.75rem}.bpk-modal--full-screen-desktop{width:100%;height:100%;max-height:100%;border-radius:0}.bpk-modal--wide{width:64rem;max-width:100%}}.bpk-modal[open]{animation:bpk-modal-scale 200ms ease-in-out}.bpk-modal--no-full-screen-mobile{width:90%;max-width:none;height:fit-content;max-height:90%}@media(min-width: 32.0625rem){.bpk-modal--no-full-screen-mobile{width:32rem;max-width:none}}.bpk-modal::backdrop{position:fixed;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal::-webkit-scrollbar{display:none}.bpk-modal__header-title{padding:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__header-title-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__close-button-style--surface-contrast{color:#fff}.bpk-no-touch-support .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}.bpk-modal__header-title-container{display:flex;width:100%;justify-content:flex-start}.bpk-modal__button-container{padding-block-start:1rem;padding-inline-end:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__button-container-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__container{min-height:100%;padding:1rem}.bpk-modal__container--padded{padding:0}.bpk-modal__container--full-screen-desktop{height:100%}.bpk-modal__container--surface-contrast{background-color:#05203c;color:#fff}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
/// <reference types="react" />
|
|
20
20
|
import type { ReactNode } from 'react';
|
|
21
|
+
import { ModalStyle } from '../BpkModalInner';
|
|
21
22
|
|
|
22
23
|
export type Props = {
|
|
23
24
|
id: string | undefined;
|
|
@@ -32,5 +33,6 @@ export type Props = {
|
|
|
32
33
|
showHeader?: boolean;
|
|
33
34
|
title?: string | null;
|
|
34
35
|
wide?: boolean;
|
|
36
|
+
modalStyle?: ModalStyle;
|
|
35
37
|
};
|
|
36
38
|
export declare const BpkModalV2: (props: Props) => JSX.Element | null;
|
|
@@ -22,33 +22,43 @@ import { useEffect, useRef } from 'react';
|
|
|
22
22
|
import BpkCloseButton from "../../../bpk-component-close-button";
|
|
23
23
|
import BpkText, { TEXT_STYLES } from "../../../bpk-component-text";
|
|
24
24
|
import { cssModules, withDefaultProps } from "../../../bpk-react-utils";
|
|
25
|
+
import { MODAL_STYLING } from "../BpkModalInner";
|
|
25
26
|
import STYLES from "./BpKModal.module.css";
|
|
26
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
28
|
const getClassName = cssModules(STYLES);
|
|
28
29
|
const Header = ({
|
|
29
30
|
closeLabel,
|
|
30
31
|
id,
|
|
32
|
+
modalStyle,
|
|
31
33
|
onClose,
|
|
32
34
|
title
|
|
33
35
|
}) => {
|
|
34
36
|
if (title) {
|
|
35
37
|
return /*#__PURE__*/_jsxs("div", {
|
|
36
38
|
id: id,
|
|
37
|
-
className: getClassName('bpk-modal__header-title'),
|
|
39
|
+
className: [getClassName('bpk-modal__header-title'), getClassName(`bpk-modal__header-title-style--${modalStyle}`)].join(' '),
|
|
38
40
|
children: [/*#__PURE__*/_jsx("div", {
|
|
39
41
|
className: getClassName('bpk-modal__header-title-container'),
|
|
40
42
|
children: /*#__PURE__*/_jsx(Heading, {
|
|
41
43
|
children: title
|
|
42
44
|
})
|
|
43
|
-
}), /*#__PURE__*/_jsx(BpkCloseButton
|
|
45
|
+
}), /*#__PURE__*/_jsx(BpkCloseButton
|
|
46
|
+
// TODO: className to be removed
|
|
47
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
48
|
+
, {
|
|
49
|
+
className: getClassName(`bpk-modal__close-button-style--${modalStyle}`),
|
|
44
50
|
label: closeLabel,
|
|
45
51
|
onClick: onClose
|
|
46
52
|
})]
|
|
47
53
|
});
|
|
48
54
|
}
|
|
49
55
|
return /*#__PURE__*/_jsx("div", {
|
|
50
|
-
className: getClassName('bpk-modal__button-container'),
|
|
51
|
-
children: /*#__PURE__*/_jsx(BpkCloseButton
|
|
56
|
+
className: [getClassName('bpk-modal__button-container'), getClassName(`bpk-modal__button-container-style--${modalStyle}`)].join(' '),
|
|
57
|
+
children: /*#__PURE__*/_jsx(BpkCloseButton
|
|
58
|
+
// TODO: className to be removed
|
|
59
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
60
|
+
, {
|
|
61
|
+
className: getClassName(`bpk-modal__close-button-style--${modalStyle}`),
|
|
52
62
|
label: closeLabel,
|
|
53
63
|
onClick: onClose
|
|
54
64
|
})
|
|
@@ -56,8 +66,7 @@ const Header = ({
|
|
|
56
66
|
};
|
|
57
67
|
const Heading = withDefaultProps(BpkText, {
|
|
58
68
|
textStyle: TEXT_STYLES.label1,
|
|
59
|
-
tagName: 'h2'
|
|
60
|
-
className: getClassName('bpk-modal__title')
|
|
69
|
+
tagName: 'h2'
|
|
61
70
|
});
|
|
62
71
|
// TODO: this check if the browser support the HTML dialog element. We can remove it once we drop support as a business for Safari 14
|
|
63
72
|
const dialogSupported = typeof HTMLDialogElement === 'function';
|
|
@@ -78,6 +87,7 @@ export const BpkModalV2 = props => {
|
|
|
78
87
|
fullScreenOnDesktop,
|
|
79
88
|
id,
|
|
80
89
|
isOpen,
|
|
90
|
+
modalStyle = MODAL_STYLING.default,
|
|
81
91
|
noFullScreenOnMobile,
|
|
82
92
|
onClose,
|
|
83
93
|
padded,
|
|
@@ -130,7 +140,7 @@ export const BpkModalV2 = props => {
|
|
|
130
140
|
};
|
|
131
141
|
}, [id, isOpen, onClose]);
|
|
132
142
|
const classNames = getClassName('bpk-modal', fullScreenOnDesktop && 'bpk-modal--full-screen-desktop', noFullScreenOnMobile && 'bpk-modal--no-full-screen-mobile', wide && 'bpk-modal--wide');
|
|
133
|
-
const contentClassNames = getClassName('bpk-modal__container', fullScreenOnDesktop && 'bpk-modal__container--full-screen-desktop', padded && 'bpk-modal__container--padded');
|
|
143
|
+
const contentClassNames = getClassName('bpk-modal__container', fullScreenOnDesktop && 'bpk-modal__container--full-screen-desktop', padded && 'bpk-modal__container--padded', modalStyle === MODAL_STYLING.surfaceContrast && 'bpk-modal__container--surface-contrast');
|
|
134
144
|
return isOpen ? /*#__PURE__*/_jsxs("div", {
|
|
135
145
|
className: getClassName('bpk-modal-wrapper', dialogSupported ? '' : 'bpk-modal-polyfill'),
|
|
136
146
|
children: [!dialogSupported && /*#__PURE__*/_jsx("div", {
|
|
@@ -148,7 +158,8 @@ export const BpkModalV2 = props => {
|
|
|
148
158
|
id: `${id}-title`,
|
|
149
159
|
title: title,
|
|
150
160
|
closeLabel: closeLabel,
|
|
151
|
-
onClose: onClose
|
|
161
|
+
onClose: onClose,
|
|
162
|
+
modalStyle: modalStyle
|
|
152
163
|
}), /*#__PURE__*/_jsx("div", {
|
|
153
164
|
className: contentClassNames,
|
|
154
165
|
children: children
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import BpkNavigationBar, { BAR_STYLES } from "./src/BpkNavigationBar";
|
|
20
|
-
import BpkNavigationBarIconButton from "./src/BpkNavigationBarIconButton";
|
|
21
20
|
import BpkNavigationBarButtonLink from "./src/BpkNavigationBarButtonLink";
|
|
21
|
+
import BpkNavigationBarIconButton from "./src/BpkNavigationBarIconButton";
|
|
22
22
|
import themeAttributes from "./src/themeAttributes";
|
|
23
23
|
export { BpkNavigationBarIconButton, BpkNavigationBarButtonLink, themeAttributes, BAR_STYLES };
|
|
24
24
|
export default BpkNavigationBar;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
19
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
20
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkNavigationBar.module.css";
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
const getClassNames = cssModules(STYLES);
|
|
@@ -47,11 +47,13 @@ const BpkNavigationBar = props => {
|
|
|
47
47
|
children: [leadingButton && /*#__PURE__*/_jsx("div", {
|
|
48
48
|
className: getClassNames('bpk-navigation-bar__leading-item', `bpk-navigation-bar__leading-item--${barStyle}`),
|
|
49
49
|
children: leadingButton
|
|
50
|
-
}), typeof title === 'string' ? /*#__PURE__*/_jsx(
|
|
51
|
-
id: titleId,
|
|
52
|
-
textStyle: TEXT_STYLES.heading5,
|
|
50
|
+
}), typeof title === 'string' ? /*#__PURE__*/_jsx("span", {
|
|
53
51
|
className: getClassNames('bpk-navigation-bar__title', `bpk-navigation-bar__title--${barStyle}`),
|
|
54
|
-
children:
|
|
52
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
53
|
+
id: titleId,
|
|
54
|
+
textStyle: TEXT_STYLES.heading5,
|
|
55
|
+
children: title
|
|
56
|
+
})
|
|
55
57
|
}) : title, trailingButton && /*#__PURE__*/_jsx("div", {
|
|
56
58
|
className: getClassNames('bpk-navigation-bar__trailing-item', `bpk-navigation-bar__trailing-item-${barStyle}`),
|
|
57
59
|
children: trailingButton
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
|
|
19
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
20
|
import { BpkButtonLink } from "../../bpk-component-link";
|
|
21
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
22
21
|
import { BAR_STYLES } from "./BpkNavigationBar";
|
|
23
|
-
import STYLES from "./BpkNavigationBarButtonLink.module.css";
|
|
24
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
const getClassName = cssModules(STYLES);
|
|
26
23
|
const BpkNavigationBarButtonLink = ({
|
|
27
24
|
barStyle = BAR_STYLES.default,
|
|
28
25
|
children,
|
|
29
26
|
className,
|
|
30
27
|
...rest
|
|
31
|
-
}) => /*#__PURE__*/_jsx(
|
|
32
|
-
className:
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
}) => /*#__PURE__*/_jsx("span", {
|
|
29
|
+
className: className,
|
|
30
|
+
children: /*#__PURE__*/_jsx(BpkButtonLink, {
|
|
31
|
+
alternate: barStyle === BAR_STYLES.onDark,
|
|
32
|
+
...rest,
|
|
33
|
+
children: children
|
|
34
|
+
})
|
|
35
35
|
});
|
|
36
36
|
export default BpkNavigationBarButtonLink;
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
|
-
import
|
|
21
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
+
import BpkCloseButton from "../../bpk-component-close-button";
|
|
22
21
|
import { BAR_STYLES } from "./BpkNavigationBar";
|
|
23
|
-
import STYLES from "./BpkNavigationBarIconButton.module.css";
|
|
24
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
const getClassName = cssModules(STYLES);
|
|
26
23
|
const BpkNavigationBarIconButton = ({
|
|
27
24
|
barStyle = BAR_STYLES.default,
|
|
28
25
|
className,
|
|
29
26
|
icon,
|
|
30
27
|
...rest
|
|
31
|
-
}) => /*#__PURE__*/_jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
}) => /*#__PURE__*/_jsx("span", {
|
|
29
|
+
className: className,
|
|
30
|
+
children: /*#__PURE__*/_jsx(BpkCloseButton, {
|
|
31
|
+
customIcon: icon,
|
|
32
|
+
onDark: barStyle === BAR_STYLES.onDark,
|
|
33
|
+
...rest
|
|
34
|
+
})
|
|
35
35
|
});
|
|
36
36
|
export default BpkNavigationBarIconButton;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import BpkNudger from "./src/BpkNudger";
|
|
20
19
|
import BpkConfigurableNudger from "./src/BpkConfigurableNudger";
|
|
20
|
+
import BpkNudger from "./src/BpkNudger";
|
|
21
21
|
import themeAttributes from "./src/themeAttributes";
|
|
22
22
|
export default BpkNudger;
|
|
23
23
|
export { themeAttributes, BpkConfigurableNudger };
|
|
@@ -59,9 +59,15 @@ const BpkConfigurableNudger = ({
|
|
|
59
59
|
onClick: () => onChange(decrementValue(value)),
|
|
60
60
|
disabled: minButtonDisabled,
|
|
61
61
|
title: decreaseButtonLabel,
|
|
62
|
-
"aria-controls": id
|
|
62
|
+
"aria-controls": id
|
|
63
|
+
// TODO: className to be removed
|
|
64
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
65
|
+
,
|
|
63
66
|
className: getClassName('bpk-nudger__button'),
|
|
64
|
-
children: /*#__PURE__*/_jsx(AlignedMinusIcon
|
|
67
|
+
children: /*#__PURE__*/_jsx(AlignedMinusIcon
|
|
68
|
+
// TODO: className to be removed
|
|
69
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
70
|
+
, {
|
|
65
71
|
className: minusIconClassNames
|
|
66
72
|
})
|
|
67
73
|
}), /*#__PURE__*/_jsx("input", {
|
|
@@ -79,9 +85,15 @@ const BpkConfigurableNudger = ({
|
|
|
79
85
|
onClick: () => onChange(incrementValue(value)),
|
|
80
86
|
disabled: maxButtonDisabled,
|
|
81
87
|
title: increaseButtonLabel,
|
|
82
|
-
"aria-controls": id
|
|
88
|
+
"aria-controls": id
|
|
89
|
+
// TODO: className to be removed
|
|
90
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
91
|
+
,
|
|
83
92
|
className: getClassName('bpk-nudger__button'),
|
|
84
|
-
children: /*#__PURE__*/_jsx(AlignedPlusIcon
|
|
93
|
+
children: /*#__PURE__*/_jsx(AlignedPlusIcon
|
|
94
|
+
// TODO: className to be removed
|
|
95
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
96
|
+
, {
|
|
85
97
|
className: plusIconClassNames
|
|
86
98
|
})
|
|
87
99
|
})]
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
-
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
21
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
20
|
import BpkLabel from "../../bpk-component-label";
|
|
21
|
+
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
22
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
23
23
|
import BpkConfigurableNudger from "./BpkConfigurableNudger";
|
|
24
24
|
import STYLES from "./BpkNudger.module.css";
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -40,10 +40,12 @@ const BpkNudger = ({
|
|
|
40
40
|
const classNames = getClassName(title && 'bpk-nudger__container');
|
|
41
41
|
return /*#__PURE__*/_jsxs("div", {
|
|
42
42
|
className: classNames,
|
|
43
|
-
children: [title && /*#__PURE__*/_jsxs(
|
|
44
|
-
htmlFor: id,
|
|
43
|
+
children: [title && /*#__PURE__*/_jsxs("div", {
|
|
45
44
|
className: getClassName('bpk-nudger__label'),
|
|
46
|
-
children: [
|
|
45
|
+
children: [/*#__PURE__*/_jsx(BpkLabel, {
|
|
46
|
+
htmlFor: id,
|
|
47
|
+
children: icon
|
|
48
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
47
49
|
// For a11y on IOS, role='text' forces label to be read in full. More info: https://axesslab.com/text-splitting/
|
|
48
50
|
// eslint-disable-next-line jsx-a11y/aria-role
|
|
49
51
|
role: "text",
|
|
@@ -51,9 +53,11 @@ const BpkNudger = ({
|
|
|
51
53
|
children: [/*#__PURE__*/_jsx(BpkText, {
|
|
52
54
|
textStyle: TEXT_STYLES.heading5,
|
|
53
55
|
children: title
|
|
54
|
-
}), subtitle && /*#__PURE__*/_jsx(
|
|
56
|
+
}), subtitle && /*#__PURE__*/_jsx("span", {
|
|
55
57
|
className: getClassName('bpk-nudger__label--subtitle'),
|
|
56
|
-
children:
|
|
58
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
59
|
+
children: subtitle
|
|
60
|
+
})
|
|
57
61
|
})]
|
|
58
62
|
})]
|
|
59
63
|
}), /*#__PURE__*/_jsx(BpkConfigurableNudger, {
|
|
@@ -61,7 +65,10 @@ const BpkNudger = ({
|
|
|
61
65
|
compareValues: compareValues,
|
|
62
66
|
incrementValue: incrementValue,
|
|
63
67
|
decrementValue: decrementValue,
|
|
64
|
-
formatValue: formatValue
|
|
68
|
+
formatValue: formatValue
|
|
69
|
+
// TODO: className to be removed
|
|
70
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
71
|
+
,
|
|
65
72
|
className: className,
|
|
66
73
|
buttonType: buttonType,
|
|
67
74
|
id: id,
|
|
@@ -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
|
-
html[dir=rtl] .bpk-nudger{display:flex;flex-direction:row-reverse}.bpk-nudger__button{position:relative}.bpk-nudger__input{display:inline-block;padding:.5rem 0;border:none;color:#161616;text-align:center;vertical-align:middle;margin:0;font-size:1rem;line-height:1.25rem;font-weight:700}.bpk-nudger__input--secondary-on-dark{background-color:rgba(0,0,0,0);color:#fff}.bpk-nudger__input--numeric{width:2.5rem}.bpk-nudger__container{display:flex;justify-content:space-between;align-items:center}.bpk-nudger__label{display:flex;gap:.5rem}.bpk-nudger__label--title-subtitle{display:flex;flex-direction:column;justify-content:space-between}.bpk-nudger__label--subtitle{color:#626971}
|
|
18
|
+
html[dir=rtl] .bpk-nudger{display:flex;flex-direction:row-reverse}.bpk-nudger__button{position:relative}.bpk-nudger__input{display:inline-block;padding:.5rem 0;border:none;color:#161616;text-align:center;vertical-align:middle;margin:0;font-size:1rem;line-height:1.25rem;font-weight:700}.bpk-nudger__input--secondary-on-dark{background-color:rgba(0,0,0,0);color:#fff}.bpk-nudger__input--numeric{width:2.5rem}.bpk-nudger__container{display:flex;justify-content:space-between;align-items:center}.bpk-nudger__label{display:flex;gap:.5rem}.bpk-nudger__label--title-subtitle{display:inline-flex;flex-direction:column;justify-content:space-between}.bpk-nudger__label--subtitle{color:#626971}
|
|
@@ -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-page-indicator{display:flex;width:100%;justify-content:center;align-items:center}.bpk-page-indicator__showNav{justify-content:space-between}.bpk-page-indicator__container{max-width:5rem;min-height:.5rem;overflow:hidden}.bpk-page-indicator__indicators-container{--direction: -1;transform:translateX(calc(var(--direction) * var(--scroll-index, 0) * 1rem));transition:transform 200ms ease-in-out;white-space:nowrap}html[dir=rtl] .bpk-page-indicator__indicators-container{--direction: 1}.bpk-page-indicator__indicator{display:inline-block;width:.5rem;height:.5rem;padding:0;border:none;border-radius:50%;margin-inline:.25rem}.bpk-page-indicator__indicator--default{background-color:#c1c7cf}.bpk-page-indicator__indicator--overImage{background-color:rgba(255,255,255,.5)}.bpk-page-indicator__indicator--active-default{background-color:#626971}.bpk-page-indicator__indicator--active-overImage{background-color:#fff}
|
|
18
|
+
.bpk-page-indicator{display:flex;width:100%;justify-content:center;align-items:center}.bpk-page-indicator__showNav{justify-content:space-between}.bpk-page-indicator__container{max-width:5rem;min-height:.5rem;overflow:hidden}.bpk-page-indicator__indicators-container{--direction: -1;transform:translateX(calc(var(--direction) * var(--scroll-index, 0) * 1rem));transition:transform 200ms ease-in-out;white-space:nowrap}html[dir=rtl] .bpk-page-indicator__indicators-container{--direction: 1}.bpk-page-indicator__indicator{display:inline-block;width:.5rem;height:.5rem;padding:0;border:none;border-radius:50%;margin-inline:.25rem}.bpk-page-indicator__indicator:hover{cursor:pointer}.bpk-page-indicator__indicator--default{background-color:#c1c7cf}.bpk-page-indicator__indicator--overImage{background-color:rgba(255,255,255,.5)}.bpk-page-indicator__indicator--active-default{background-color:#626971;pointer-events:none}.bpk-page-indicator__indicator--active-overImage{background-color:#fff;pointer-events:none}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
|
-
import { withButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
|
|
19
18
|
import { BUTTON_TYPES, BpkButtonV2 } from "../../bpk-component-button";
|
|
19
|
+
import { withButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
|
|
20
20
|
import LeftArrowIcon from "../../bpk-component-icon/lg/chevron-left";
|
|
21
21
|
import RightArrowIcon from "../../bpk-component-icon/lg/chevron-right";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import { cssModules } from "../../bpk-react-utils";
|
|
21
|
-
import BpkPaginationPage from "./BpkPaginationPage";
|
|
22
21
|
import BpkPaginationBreak from "./BpkPaginationBreak";
|
|
22
|
+
import BpkPaginationPage from "./BpkPaginationPage";
|
|
23
23
|
import STYLES from "./BpkPaginationList.module.css";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
@@ -17,19 +17,25 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
21
20
|
import { BpkButtonV2, BUTTON_TYPES } from "../../bpk-component-button";
|
|
22
21
|
import { withRtlSupport } from "../../bpk-component-icon";
|
|
23
22
|
import ArrowLeftIcon from "../../bpk-component-icon/sm/arrow-left";
|
|
24
23
|
import ArrowRightIcon from "../../bpk-component-icon/sm/arrow-right";
|
|
24
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
25
25
|
import STYLES from "./BpkPaginationNudger.module.css";
|
|
26
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
27
|
const getClassName = cssModules(STYLES);
|
|
28
28
|
const AlignedArrowLeftIcon = withRtlSupport(ArrowLeftIcon);
|
|
29
29
|
const AlignedArrowRightIcon = withRtlSupport(ArrowRightIcon);
|
|
30
|
-
const nudgerIcon = forward => forward ? /*#__PURE__*/_jsx(AlignedArrowRightIcon
|
|
30
|
+
const nudgerIcon = forward => forward ? /*#__PURE__*/_jsx(AlignedArrowRightIcon
|
|
31
|
+
// TODO: className to be removed
|
|
32
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
33
|
+
, {
|
|
31
34
|
className: getClassName('bpk-pagination-nudger__icon')
|
|
32
|
-
}) : /*#__PURE__*/_jsx(AlignedArrowLeftIcon
|
|
35
|
+
}) : /*#__PURE__*/_jsx(AlignedArrowLeftIcon
|
|
36
|
+
// TODO: className to be removed
|
|
37
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
38
|
+
, {
|
|
33
39
|
className: getClassName('bpk-pagination-nudger__icon')
|
|
34
40
|
});
|
|
35
41
|
const BpkPaginationNudger = props => {
|
|
@@ -42,7 +48,10 @@ const BpkPaginationNudger = props => {
|
|
|
42
48
|
return /*#__PURE__*/_jsxs(BpkButtonV2, {
|
|
43
49
|
type: BUTTON_TYPES.link,
|
|
44
50
|
onClick: onNudge,
|
|
45
|
-
disabled: disabled
|
|
51
|
+
disabled: disabled
|
|
52
|
+
// TODO: className to be removed
|
|
53
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
54
|
+
,
|
|
46
55
|
className: getClassName('bpk-pagination-nudger'),
|
|
47
56
|
children: [nudgerIcon(forward), /*#__PURE__*/_jsx("span", {
|
|
48
57
|
className: getClassName('bpk-pagination-nudger__text--hidden'),
|
|
@@ -35,7 +35,10 @@ const BpkPaginationPage = props => {
|
|
|
35
35
|
}
|
|
36
36
|
return /*#__PURE__*/_jsx(BpkButtonV2, {
|
|
37
37
|
type: !isSelected ? BUTTON_TYPES.primaryOnDark : BUTTON_TYPES.primary,
|
|
38
|
-
onClick: onSelect
|
|
38
|
+
onClick: onSelect
|
|
39
|
+
// TODO: className to be removed
|
|
40
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
41
|
+
,
|
|
39
42
|
className: classNames.join(' '),
|
|
40
43
|
"aria-label": pageLabel(page, isSelected),
|
|
41
44
|
"aria-current": isSelected,
|
|
@@ -15,10 +15,10 @@
|
|
|
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 BpkInput, { INPUT_TYPES } from "../../bpk-component-input";
|
|
20
19
|
import BpkLabel from "../../bpk-component-label";
|
|
21
20
|
import BpkSelect from "../../bpk-component-select";
|
|
21
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
22
22
|
import STYLES from "./BpkPhoneInput.module.css";
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
const getClassName = cssModules(STYLES);
|
|
@@ -86,12 +86,17 @@ const BpkPhoneInput = props => {
|
|
|
86
86
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
87
87
|
children: [/*#__PURE__*/_jsx(BpkLabel, {
|
|
88
88
|
htmlFor: dialingCodeProps.id,
|
|
89
|
-
disabled: disabled
|
|
89
|
+
disabled: disabled
|
|
90
|
+
// TODO: className to be removed
|
|
91
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
92
|
+
,
|
|
90
93
|
className: getClassName('bpk-phone-input__label'),
|
|
91
94
|
children: dialingCodeProps.label
|
|
92
95
|
}), /*#__PURE__*/_jsx(BpkSelect, {
|
|
93
96
|
...commonProps,
|
|
94
97
|
...dialingCodeProps,
|
|
98
|
+
// TODO: className to be removed
|
|
99
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
95
100
|
className: getClassName(dialingCodeProps.className),
|
|
96
101
|
wrapperClassName: getClassName(dialingCodeProps.wrapperClassName),
|
|
97
102
|
value: dialingCode,
|
|
@@ -113,7 +118,10 @@ const BpkPhoneInput = props => {
|
|
|
113
118
|
className: getClassName('bpk-phone-input__phone-number'),
|
|
114
119
|
children: [/*#__PURE__*/_jsx(BpkLabel, {
|
|
115
120
|
htmlFor: id,
|
|
116
|
-
disabled: disabled
|
|
121
|
+
disabled: disabled
|
|
122
|
+
// TODO: className to be removed
|
|
123
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
124
|
+
,
|
|
117
125
|
className: getClassName('bpk-phone-input__label'),
|
|
118
126
|
children: label
|
|
119
127
|
}), /*#__PURE__*/_jsx(BpkInput, {
|
|
@@ -123,7 +131,10 @@ const BpkPhoneInput = props => {
|
|
|
123
131
|
name: name,
|
|
124
132
|
value: displayValue,
|
|
125
133
|
type: INPUT_TYPES.tel,
|
|
126
|
-
onChange: handleChange
|
|
134
|
+
onChange: handleChange
|
|
135
|
+
// TODO: className to be removed
|
|
136
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
137
|
+
,
|
|
127
138
|
className: getClassName(className)
|
|
128
139
|
})]
|
|
129
140
|
})]
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/import PropTypes from 'prop-types';
|
|
18
|
-
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
19
|
-
import { BpkButtonLink } from "../../bpk-component-link";
|
|
20
18
|
import BpkCloseButton from "../../bpk-component-close-button";
|
|
19
|
+
import { BpkButtonLink } from "../../bpk-component-link";
|
|
20
|
+
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
21
21
|
import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
|
|
22
22
|
import { ARROW_ID } from "./constants";
|
|
23
23
|
import STYLES from "./BpkPopover.module.css";
|
|
@@ -85,7 +85,10 @@ const BpkPopover = props => {
|
|
|
85
85
|
id: labelId,
|
|
86
86
|
textStyle: TEXT_STYLES.label1,
|
|
87
87
|
children: label
|
|
88
|
-
}), "\xA0", closeButtonIcon ? /*#__PURE__*/_jsx(BpkCloseButton
|
|
88
|
+
}), "\xA0", closeButtonIcon ? /*#__PURE__*/_jsx(BpkCloseButton
|
|
89
|
+
// TODO: className to be removed
|
|
90
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
91
|
+
, {
|
|
89
92
|
className: getClassName('bpk-popover__close-button'),
|
|
90
93
|
label: closeButtonText,
|
|
91
94
|
onClick: bindEventSource(EVENT_SOURCES.CLOSE_BUTTON, props.onClose),
|