@skyscanner/backpack-web 34.15.1 → 34.16.0-preminor.2
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-aria-live/src/BpkAriaLive.d.ts +1 -1
- package/bpk-component-badge/src/BpkBadge.d.ts +1 -1
- package/bpk-component-banner-alert/src/AnimateAndFade.d.ts +1 -1
- package/bpk-component-banner-alert/src/BpkBannerAlert.d.ts +1 -2
- package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.d.ts +1 -2
- package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.d.ts +1 -1
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.d.ts +1 -1
- package/bpk-component-banner-alert/src/withBannerAlertState.d.ts +36 -44
- package/bpk-component-boilerplate/src/BpkBoilerplate.d.ts +1 -2
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.d.ts +1 -1
- package/bpk-component-button/BpkButtonDestructive.d.ts +1 -2
- package/bpk-component-button/BpkButtonFeatured.d.ts +1 -2
- package/bpk-component-button/BpkButtonLink.d.ts +1 -2
- package/bpk-component-button/BpkButtonLinkOnDark.d.ts +1 -2
- package/bpk-component-button/BpkButtonPrimary.d.ts +1 -2
- package/bpk-component-button/BpkButtonPrimaryOnDark.d.ts +1 -2
- package/bpk-component-button/BpkButtonPrimaryOnLight.d.ts +1 -2
- package/bpk-component-button/BpkButtonSecondary.d.ts +1 -2
- package/bpk-component-button/BpkButtonSecondaryOnDark.d.ts +1 -2
- package/bpk-component-button/src/BpkButton.d.ts +1 -2
- package/bpk-component-button/src/BpkButtonBase.d.ts +2 -13
- package/bpk-component-button/src/BpkButtonDestructive.module.css +18 -0
- package/bpk-component-button/src/BpkButtonFeatured.module.css +18 -0
- package/bpk-component-button/src/BpkButtonLink.module.css +18 -0
- package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +18 -0
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +18 -0
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +18 -0
- package/bpk-component-button/src/BpkButtonSecondary.module.css +18 -0
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +18 -0
- package/bpk-component-button/src/BpkButtonV2/BpkButton.d.ts +1 -2
- package/bpk-component-calendar/src/BpkCalendarContainer.d.ts +10 -14
- package/bpk-component-calendar/src/BpkCalendarDate.d.ts +1 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.d.ts +5 -5
- package/bpk-component-calendar/src/BpkCalendarGridHeader.d.ts +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.d.ts +2 -2
- package/bpk-component-calendar/src/BpkCalendarNav.d.ts +1 -1
- package/bpk-component-calendar/src/BpkCalendarWeek.d.ts +1 -1
- package/bpk-component-calendar/src/composeCalendar.d.ts +1 -1
- package/bpk-component-card/src/BpkCard.d.ts +1 -1
- package/bpk-component-card/src/BpkCardWrapper.d.ts +1 -1
- package/bpk-component-card/src/BpkDividedCard.d.ts +1 -1
- package/bpk-component-card/src/CardContext.d.ts +0 -1
- package/bpk-component-card-button/src/BpkSaveButton.d.ts +1 -1
- package/bpk-component-carousel/src/BpkCarousel.d.ts +1 -2
- package/bpk-component-carousel/src/BpkCarouselContainer.d.ts +1 -1
- package/bpk-component-carousel/src/utils.test.js +30 -0
- package/bpk-component-chip/src/BpkDismissibleChip.d.ts +1 -2
- package/bpk-component-chip/src/BpkDropdownChip.d.ts +1 -2
- package/bpk-component-chip/src/BpkIconChip.d.ts +1 -1
- package/bpk-component-chip/src/BpkSelectableChip.d.ts +1 -1
- package/bpk-component-chip-group/src/BpkMultiSelectChipGroup.d.ts +1 -1
- package/bpk-component-chip-group/src/BpkSingleSelectChipGroup.d.ts +1 -2
- package/bpk-component-chip-group/src/Nudger.d.ts +1 -1
- package/bpk-component-close-button/src/BpkCloseButton.d.ts +10 -0
- package/bpk-component-close-button/src/BpkCloseButton.js +21 -37
- package/bpk-component-datatable/src/BpkDataTable.d.ts +1 -2
- package/bpk-component-datatable/src/BpkDataTableHeader.d.ts +1 -2
- package/bpk-component-datepicker/src/BpkDatepicker.d.ts +7 -9
- package/bpk-component-datepicker/src/BpkDatepicker.module.css +18 -0
- package/bpk-component-description-list/src/BpkDescriptionDetails.d.ts +1 -1
- package/bpk-component-description-list/src/BpkDescriptionList.d.ts +1 -1
- package/bpk-component-description-list/src/BpkDescriptionTerm.d.ts +1 -1
- package/bpk-component-dialog/src/BpkDialog.d.ts +1 -2
- package/bpk-component-dialog/src/BpkDialogInner.d.ts +11 -16
- package/bpk-component-flare/src/__generated__/js/corner-radius.d.ts +5 -0
- package/bpk-component-flare/src/__generated__/js/pointer.d.ts +5 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.d.ts +1 -1
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.d.ts +1 -2
- package/bpk-component-icon/index.d.ts +2 -2
- package/bpk-component-icon/src/classNameModifierHOCFactory.d.ts +2 -2
- package/bpk-component-icon/src/withAlignment.d.ts +1 -1
- package/bpk-component-icon/src/withRtlSupport.d.ts +3 -4
- package/bpk-component-image/src/BpkBackgroundImage.d.ts +1 -1
- package/bpk-component-image/src/BpkImage.d.ts +1 -1
- package/bpk-component-image/src/withLazyLoading.d.ts +8 -11
- package/bpk-component-image/src/withLoadingBehavior.d.ts +5 -7
- package/bpk-component-info-banner/src/AnimateAndFade.d.ts +1 -1
- package/bpk-component-info-banner/src/BpkInfoBanner.d.ts +1 -2
- package/bpk-component-info-banner/src/BpkInfoBannerDismissable.d.ts +1 -2
- package/bpk-component-info-banner/src/BpkInfoBannerExpandable.d.ts +1 -1
- package/bpk-component-info-banner/src/BpkInfoBannerInner.d.ts +1 -1
- package/bpk-component-info-banner/src/withBannerAlertState.d.ts +36 -45
- package/bpk-component-input/src/BpkClearButton.module.css +18 -0
- package/bpk-component-input/src/BpkInput.d.ts +1 -1
- package/bpk-component-input/src/BpkInput.js +1 -1
- package/bpk-component-input/src/common-types.d.ts +1 -1
- package/bpk-component-input/src/withOpenEvents.d.ts +4 -6
- package/bpk-component-inset-banner/src/BpkInsetBanner.d.ts +1 -2
- package/bpk-component-journey-arrow/src/BpkJourneyArrow.d.ts +1 -2
- package/bpk-component-loading-button/src/BpkLoadingButton.d.ts +6 -38
- package/bpk-component-loading-button/src/BpkLoadingButton.js +13 -44
- package/bpk-component-map/src/BpkBasicMapMarker.d.ts +1 -1
- package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.d.ts +1 -1
- package/bpk-component-modal/src/BpkModal.d.ts +1 -1
- package/bpk-component-modal/src/BpkModalInner.d.ts +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpkModal.d.ts +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.d.ts +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.d.ts +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.css +18 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.d.ts +1 -1
- package/bpk-component-nudger/index.d.ts +1 -2
- package/bpk-component-nudger/index.js +1 -2
- package/bpk-component-nudger/src/BpkNudger.d.ts +1 -2
- package/bpk-component-nudger/src/BpkNudger.js +102 -20
- package/bpk-component-nudger/src/BpkNudger.module.css +1 -1
- package/bpk-component-nudger/src/common-types.d.ts +7 -5
- package/bpk-component-overlay/src/BpkOverlay.d.ts +1 -1
- package/bpk-component-popover/src/BpkPopover.d.ts +1 -1
- package/bpk-component-rating/src/BpkRating.d.ts +1 -1
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.d.ts +1 -1
- package/bpk-component-rtl-toggle/src/updateOnDirectionChange.d.ts +11 -15
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.d.ts +6 -9
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.d.ts +1 -2
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.d.ts +3 -3
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.d.ts +3 -3
- package/bpk-component-section-header/src/BpkSectionHeader.d.ts +1 -1
- package/bpk-component-segmented-control/src/BpkSegmentedControl.d.ts +1 -1
- package/bpk-component-skeleton/src/BpkBaseSkeleton.d.d.ts +0 -1
- package/bpk-component-skeleton/src/BpkBaseSkeleton.d.ts +1 -2
- package/bpk-component-skeleton/src/BpkSkeleton.d.d.ts +0 -1
- package/bpk-component-skeleton/src/BpkSkeleton.d.ts +1 -2
- package/bpk-component-slider/src/BpkSlider.d.ts +4 -2
- package/bpk-component-slider/src/BpkSlider.js +51 -3
- package/bpk-component-snippet/index.d.ts +3 -0
- package/bpk-component-snippet/index.js +21 -0
- package/bpk-component-snippet/src/BpkSnippet.d.ts +48 -0
- package/bpk-component-snippet/src/BpkSnippet.js +131 -0
- package/bpk-component-snippet/src/BpkSnippet.module.css +18 -0
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.d.ts +4 -15
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +5 -16
- package/bpk-component-spinner/src/BpkLargeSpinner.d.ts +5 -18
- package/bpk-component-spinner/src/BpkLargeSpinner.js +6 -19
- package/bpk-component-spinner/src/BpkSpinner.d.ts +5 -18
- package/bpk-component-spinner/src/BpkSpinner.js +6 -19
- package/bpk-component-split-input/src/BpkInputField.d.ts +21 -0
- package/bpk-component-split-input/src/BpkInputField.js +13 -15
- package/bpk-component-split-input/src/BpkSplitInput.d.ts +44 -0
- package/bpk-component-split-input/src/BpkSplitInput.js +23 -34
- package/bpk-component-swap-button/src/BpkSwapButton.d.ts +1 -2
- package/bpk-component-text/src/BpkText.d.ts +1 -1
- package/bpk-component-tooltip/src/BpkTooltip.d.ts +1 -1
- package/bpk-component-tooltip/src/BpkTooltipPortal.d.ts +1 -1
- package/bpk-react-utils/index.d.ts +9 -10
- package/bpk-react-utils/src/BpkDialogWrapper/BpkDialogWrapper.d.ts +1 -1
- package/bpk-react-utils/src/TransitionInitialMount.d.ts +1 -1
- package/bpk-react-utils/src/nativeEventHandler.d.ts +1 -1
- package/bpk-react-utils/src/nativeEventHandler.js +7 -5
- package/bpk-react-utils/src/withDefaultProps.d.ts +1 -1
- package/bpk-scrim-utils/index.d.ts +12 -17
- package/bpk-scrim-utils/src/BpkScrim.d.ts +1 -1
- package/bpk-scrim-utils/src/withScrim.d.ts +11 -15
- package/bpk-scrim-utils/src/withScrimmedPortal.d.ts +1 -1
- package/bpk-stylesheets/test.css +164 -0
- package/bpk-theming/src/BpkThemeProvider.js +19 -30
- package/package.json +5 -3
- package/bpk-component-nudger/src/BpkConfigurableNudger.d.ts +0 -27
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +0 -96
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { CommonProps } from './common-types';
|
|
3
|
-
declare const BpkInfoBanner: ({ animateOnEnter, animateOnLeave, icon, show, ...rest }: CommonProps) => JSX.Element;
|
|
2
|
+
declare const BpkInfoBanner: ({ animateOnEnter, animateOnLeave, icon, show, ...rest }: CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default BpkInfoBanner;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { CommonProps, OnDismissHandler } from './common-types';
|
|
3
2
|
export type Props = CommonProps & {
|
|
4
3
|
dismissButtonLabel: string;
|
|
5
4
|
onDismiss?: OnDismissHandler;
|
|
6
5
|
};
|
|
7
|
-
declare const BpkInfoBannerDismissable: ({ onDismiss, ...rest }: Props) => JSX.Element;
|
|
6
|
+
declare const BpkInfoBannerDismissable: ({ onDismiss, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default BpkInfoBannerDismissable;
|
|
@@ -7,5 +7,5 @@ export type Props = CommonProps & {
|
|
|
7
7
|
onExpandToggle?: OnExpandToggleHandler;
|
|
8
8
|
action?: ExpandableBannerAction;
|
|
9
9
|
};
|
|
10
|
-
declare const BpkInfoBannerExpandable: ({ action, children, expanded, onExpandToggle, ...rest }: Props) => JSX.Element;
|
|
10
|
+
declare const BpkInfoBannerExpandable: ({ action, children, expanded, onExpandToggle, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default BpkInfoBannerExpandable;
|
|
@@ -15,5 +15,5 @@ type Props = CommonProps & {
|
|
|
15
15
|
dismissButtonLabel?: string;
|
|
16
16
|
onDismiss?: OnDismissHandler;
|
|
17
17
|
};
|
|
18
|
-
declare const BpkInfoBannerInner: ({ action, animateOnEnter, animateOnLeave, bannerClassName, children, configuration, dismissButtonLabel, expanded, icon, message, onDismiss, onExpandToggle, show, style, toggleButtonLabel, type, ...rest }: Props) => JSX.Element;
|
|
18
|
+
declare const BpkInfoBannerInner: ({ action, animateOnEnter, animateOnLeave, bannerClassName, children, configuration, dismissButtonLabel, expanded, icon, message, onDismiss, onExpandToggle, show, style, toggleButtonLabel, type, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export default BpkInfoBannerInner;
|
|
@@ -1,82 +1,73 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { ComponentType } from 'react';
|
|
2
|
+
import type { Props as BpkInfoBannerDismissableProps } from './BpkInfoBannerDismissable';
|
|
3
|
+
import type { Props as BpkInfoBannerExpandableProps } from './BpkInfoBannerExpandable';
|
|
3
4
|
export type WithBannerAlertStateProps = {
|
|
4
5
|
onHide?: () => void;
|
|
5
6
|
hideAfter?: number;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onDismiss?: import("./common-types").OnDismissHandler;
|
|
10
|
-
} & {
|
|
11
|
-
children: import("react").ReactNode;
|
|
12
|
-
expanded?: boolean | undefined;
|
|
13
|
-
toggleButtonLabel: string;
|
|
14
|
-
onExpandToggle?: import("./common-types").OnExpandToggleHandler;
|
|
15
|
-
action?: import("./common-types").ExpandableBannerAction;
|
|
16
|
-
}>>(WrappedComponent: ComponentType<P>) => {
|
|
8
|
+
type BpkInfoBannerProps = Partial<BpkInfoBannerDismissableProps & BpkInfoBannerExpandableProps>;
|
|
9
|
+
declare const withBannerAlertState: <P extends BpkInfoBannerProps>(WrappedComponent: ComponentType<P>) => {
|
|
17
10
|
new (props: P & WithBannerAlertStateProps): {
|
|
18
|
-
hideIntervalId?:
|
|
11
|
+
hideIntervalId?: ReturnType<typeof setTimeout> | null;
|
|
19
12
|
componentDidMount(): void;
|
|
20
13
|
componentWillUnmount(): void;
|
|
21
14
|
onExpandToggle: () => void;
|
|
22
15
|
onDismiss: () => void;
|
|
23
16
|
onHide: () => void;
|
|
24
|
-
render(): JSX.Element;
|
|
25
|
-
context:
|
|
17
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
context: unknown;
|
|
26
19
|
setState<K extends keyof {
|
|
27
|
-
expanded?: boolean
|
|
28
|
-
show?: boolean
|
|
20
|
+
expanded?: boolean;
|
|
21
|
+
show?: boolean;
|
|
29
22
|
}>(state: {
|
|
30
|
-
expanded?: boolean
|
|
31
|
-
show?: boolean
|
|
23
|
+
expanded?: boolean;
|
|
24
|
+
show?: boolean;
|
|
32
25
|
} | ((prevState: Readonly<{
|
|
33
|
-
expanded?: boolean
|
|
34
|
-
show?: boolean
|
|
35
|
-
}>, props: Readonly<P & WithBannerAlertStateProps>) => {
|
|
36
|
-
expanded?: boolean
|
|
37
|
-
show?: boolean
|
|
38
|
-
} |
|
|
39
|
-
expanded?: boolean
|
|
40
|
-
show?: boolean
|
|
41
|
-
}
|
|
42
|
-
expanded?: boolean
|
|
43
|
-
show?: boolean
|
|
26
|
+
expanded?: boolean;
|
|
27
|
+
show?: boolean;
|
|
28
|
+
}>, props: Readonly<P & WithBannerAlertStateProps>) => Pick<{
|
|
29
|
+
expanded?: boolean;
|
|
30
|
+
show?: boolean;
|
|
31
|
+
}, K> | {
|
|
32
|
+
expanded?: boolean;
|
|
33
|
+
show?: boolean;
|
|
34
|
+
} | null) | Pick<{
|
|
35
|
+
expanded?: boolean;
|
|
36
|
+
show?: boolean;
|
|
44
37
|
}, K> | null, callback?: (() => void) | undefined): void;
|
|
45
38
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
46
|
-
readonly props: Readonly<P & WithBannerAlertStateProps
|
|
47
|
-
children?: import("react").ReactNode;
|
|
48
|
-
}>;
|
|
39
|
+
readonly props: Readonly<P & WithBannerAlertStateProps>;
|
|
49
40
|
state: Readonly<{
|
|
50
|
-
expanded?: boolean
|
|
51
|
-
show?: boolean
|
|
41
|
+
expanded?: boolean;
|
|
42
|
+
show?: boolean;
|
|
52
43
|
}>;
|
|
53
44
|
refs: {
|
|
54
45
|
[key: string]: import("react").ReactInstance;
|
|
55
46
|
};
|
|
56
47
|
shouldComponentUpdate?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextState: Readonly<{
|
|
57
|
-
expanded?: boolean
|
|
58
|
-
show?: boolean
|
|
48
|
+
expanded?: boolean;
|
|
49
|
+
show?: boolean;
|
|
59
50
|
}>, nextContext: any): boolean;
|
|
60
51
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
61
52
|
getSnapshotBeforeUpdate?(prevProps: Readonly<P & WithBannerAlertStateProps>, prevState: Readonly<{
|
|
62
|
-
expanded?: boolean
|
|
63
|
-
show?: boolean
|
|
64
|
-
}>): any;
|
|
53
|
+
expanded?: boolean;
|
|
54
|
+
show?: boolean;
|
|
55
|
+
}>): any | null;
|
|
65
56
|
componentDidUpdate?(prevProps: Readonly<P & WithBannerAlertStateProps>, prevState: Readonly<{
|
|
66
|
-
expanded?: boolean
|
|
67
|
-
show?: boolean
|
|
57
|
+
expanded?: boolean;
|
|
58
|
+
show?: boolean;
|
|
68
59
|
}>, snapshot?: any): void;
|
|
69
60
|
componentWillMount?(): void;
|
|
70
61
|
UNSAFE_componentWillMount?(): void;
|
|
71
62
|
componentWillReceiveProps?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextContext: any): void;
|
|
72
63
|
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextContext: any): void;
|
|
73
64
|
componentWillUpdate?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextState: Readonly<{
|
|
74
|
-
expanded?: boolean
|
|
75
|
-
show?: boolean
|
|
65
|
+
expanded?: boolean;
|
|
66
|
+
show?: boolean;
|
|
76
67
|
}>, nextContext: any): void;
|
|
77
68
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextState: Readonly<{
|
|
78
|
-
expanded?: boolean
|
|
79
|
-
show?: boolean
|
|
69
|
+
expanded?: boolean;
|
|
70
|
+
show?: boolean;
|
|
80
71
|
}>, nextContext: any): void;
|
|
81
72
|
};
|
|
82
73
|
displayName: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
.bpk-clear-button{padding:0;border:0;background-color:rgba(0,0,0,0);color:#626971;cursor:pointer;appearance:none}.bpk-no-touch-support .bpk-clear-button:hover:not(:active):not(:disabled){color:#161616}:global(.bpk-no-touch-support) .bpk-clear-button:hover:not(:active):not(:disabled){color:#161616}.bpk-clear-button:active{color:#161616}.bpk-clear-button__icon{fill:currentcolor}
|
|
@@ -120,7 +120,7 @@ class BpkInput extends Component {
|
|
|
120
120
|
};
|
|
121
121
|
return clearable ? /*#__PURE__*/_jsxs("div", {
|
|
122
122
|
className: containerClassNames.join(' '),
|
|
123
|
-
children: [renderedInput, value
|
|
123
|
+
children: [renderedInput, `${value}`.length > 0 && /*#__PURE__*/_jsx("button", {
|
|
124
124
|
type: "button",
|
|
125
125
|
title: clearButtonLabel || '',
|
|
126
126
|
"aria-label": clearButtonLabel || '',
|
|
@@ -34,12 +34,10 @@ declare const withOpenEvents: <P extends object>(WithOpenEventsInputComponent: C
|
|
|
34
34
|
handleFocus: () => void;
|
|
35
35
|
handleBlur: () => void;
|
|
36
36
|
render(): ReactElement;
|
|
37
|
-
context:
|
|
38
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>) =>
|
|
37
|
+
context: unknown;
|
|
38
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
39
39
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
40
|
-
readonly props: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps
|
|
41
|
-
children?: import("react").ReactNode;
|
|
42
|
-
}>;
|
|
40
|
+
readonly props: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>;
|
|
43
41
|
state: Readonly<{}>;
|
|
44
42
|
refs: {
|
|
45
43
|
[key: string]: import("react").ReactInstance;
|
|
@@ -48,7 +46,7 @@ declare const withOpenEvents: <P extends object>(WithOpenEventsInputComponent: C
|
|
|
48
46
|
shouldComponentUpdate?(nextProps: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
49
47
|
componentWillUnmount?(): void;
|
|
50
48
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
51
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>, prevState: Readonly<{}>): any;
|
|
49
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>, prevState: Readonly<{}>): any | null;
|
|
52
50
|
componentDidUpdate?(prevProps: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
53
51
|
componentWillMount?(): void;
|
|
54
52
|
UNSAFE_componentWillMount?(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const VARIANT: {
|
|
3
2
|
onLight: string;
|
|
4
3
|
onDark: string;
|
|
@@ -19,5 +18,5 @@ export type Props = {
|
|
|
19
18
|
title?: string;
|
|
20
19
|
variant?: (typeof VARIANT)[keyof typeof VARIANT];
|
|
21
20
|
};
|
|
22
|
-
declare const BpkInsetBanner: ({ accessibilityLabel, backgroundColor, body, callToAction, logo, subheadline, title, variant, }: Props) => JSX.Element;
|
|
21
|
+
declare const BpkInsetBanner: ({ accessibilityLabel, backgroundColor, body, callToAction, logo, subheadline, title, variant, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
export default BpkInsetBanner;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export type Props = {
|
|
3
2
|
/** the number of dot stops to display */
|
|
4
3
|
stops?: number;
|
|
5
4
|
[rest: string]: any;
|
|
6
5
|
};
|
|
7
|
-
declare const BpkJourneyArrow: ({ stops, ...rest }: Props) => JSX.Element;
|
|
6
|
+
declare const BpkJourneyArrow: ({ stops, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export default BpkJourneyArrow;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { Props as ButtonProps } from '../../bpk-component-button/src/BpkButtonV2/common-types';
|
|
3
3
|
export declare const ICON_POSITION: {
|
|
4
4
|
LEADING: string;
|
|
5
5
|
TRAILING: string;
|
|
@@ -17,44 +17,12 @@ type LoadingProps = {
|
|
|
17
17
|
large?: boolean;
|
|
18
18
|
link?: boolean;
|
|
19
19
|
linkOnDark?: boolean;
|
|
20
|
-
loading
|
|
21
|
-
iconOnly
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
iconOnly?: boolean;
|
|
22
22
|
icon?: ReactElement<any>;
|
|
23
|
-
iconPosition
|
|
23
|
+
iconPosition?: (typeof ICON_POSITION)[keyof typeof ICON_POSITION];
|
|
24
24
|
iconDisabled?: ReactElement<any>;
|
|
25
25
|
iconLoading?: ReactElement<any>;
|
|
26
|
-
};
|
|
27
|
-
declare const BpkLoadingButton:
|
|
28
|
-
(props: LoadingProps): JSX.Element;
|
|
29
|
-
propTypes: {
|
|
30
|
-
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
31
|
-
className: PropTypes.Requireable<string>;
|
|
32
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
33
|
-
secondary: PropTypes.Requireable<boolean>;
|
|
34
|
-
destructive: PropTypes.Requireable<boolean>;
|
|
35
|
-
link: PropTypes.Requireable<boolean>;
|
|
36
|
-
linkOnDark: PropTypes.Requireable<boolean>;
|
|
37
|
-
loading: PropTypes.Requireable<boolean>;
|
|
38
|
-
iconOnly: PropTypes.Requireable<boolean>;
|
|
39
|
-
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
40
|
-
iconPosition: PropTypes.Requireable<string>;
|
|
41
|
-
iconDisabled: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
42
|
-
iconLoading: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
43
|
-
};
|
|
44
|
-
defaultProps: {
|
|
45
|
-
className: null;
|
|
46
|
-
disabled: boolean;
|
|
47
|
-
secondary: boolean;
|
|
48
|
-
destructive: boolean;
|
|
49
|
-
large: boolean;
|
|
50
|
-
link: boolean;
|
|
51
|
-
linkOnDark: boolean;
|
|
52
|
-
loading: boolean;
|
|
53
|
-
iconOnly: boolean;
|
|
54
|
-
icon: null;
|
|
55
|
-
iconPosition: string;
|
|
56
|
-
iconDisabled: null;
|
|
57
|
-
iconLoading: null;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
26
|
+
} & ButtonProps;
|
|
27
|
+
declare const BpkLoadingButton: (props: LoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
60
28
|
export default BpkLoadingButton;
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import PropTypes from 'prop-types';
|
|
20
19
|
import { BUTTON_TYPES, BpkButtonV2, SIZE_TYPES } from "../../bpk-component-button";
|
|
21
20
|
import { withButtonAlignment, withLargeButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
|
|
22
21
|
import ArrowIconLg from "../../bpk-component-icon/lg/long-arrow-right";
|
|
@@ -60,22 +59,22 @@ const getLoadingIcon = props => {
|
|
|
60
59
|
const BpkLoadingButton = props => {
|
|
61
60
|
const {
|
|
62
61
|
children,
|
|
63
|
-
destructive,
|
|
64
|
-
disabled,
|
|
65
|
-
featured,
|
|
62
|
+
destructive = false,
|
|
63
|
+
disabled = false,
|
|
64
|
+
featured = false,
|
|
66
65
|
icon,
|
|
67
66
|
iconDisabled,
|
|
68
67
|
iconLoading,
|
|
69
|
-
iconOnly,
|
|
70
|
-
iconPosition,
|
|
71
|
-
large,
|
|
72
|
-
link,
|
|
73
|
-
linkOnDark,
|
|
74
|
-
loading,
|
|
75
|
-
primaryOnDark,
|
|
76
|
-
primaryOnLight,
|
|
77
|
-
secondary,
|
|
78
|
-
secondaryOnDark,
|
|
68
|
+
iconOnly = false,
|
|
69
|
+
iconPosition = ICON_POSITION.TRAILING,
|
|
70
|
+
large = false,
|
|
71
|
+
link = false,
|
|
72
|
+
linkOnDark = false,
|
|
73
|
+
loading = false,
|
|
74
|
+
primaryOnDark = false,
|
|
75
|
+
primaryOnLight = false,
|
|
76
|
+
secondary = false,
|
|
77
|
+
secondaryOnDark = false,
|
|
79
78
|
...rest
|
|
80
79
|
} = props;
|
|
81
80
|
const showBtnDisabled = disabled || loading;
|
|
@@ -127,34 +126,4 @@ const BpkLoadingButton = props => {
|
|
|
127
126
|
})
|
|
128
127
|
});
|
|
129
128
|
};
|
|
130
|
-
BpkLoadingButton.propTypes = {
|
|
131
|
-
children: PropTypes.node.isRequired,
|
|
132
|
-
className: PropTypes.string,
|
|
133
|
-
disabled: PropTypes.bool,
|
|
134
|
-
secondary: PropTypes.bool,
|
|
135
|
-
destructive: PropTypes.bool,
|
|
136
|
-
link: PropTypes.bool,
|
|
137
|
-
linkOnDark: PropTypes.bool,
|
|
138
|
-
loading: PropTypes.bool,
|
|
139
|
-
iconOnly: PropTypes.bool,
|
|
140
|
-
icon: PropTypes.element,
|
|
141
|
-
iconPosition: PropTypes.oneOf([ICON_POSITION.LEADING, ICON_POSITION.TRAILING]),
|
|
142
|
-
iconDisabled: PropTypes.element,
|
|
143
|
-
iconLoading: PropTypes.element
|
|
144
|
-
};
|
|
145
|
-
BpkLoadingButton.defaultProps = {
|
|
146
|
-
className: null,
|
|
147
|
-
disabled: false,
|
|
148
|
-
secondary: false,
|
|
149
|
-
destructive: false,
|
|
150
|
-
large: false,
|
|
151
|
-
link: false,
|
|
152
|
-
linkOnDark: false,
|
|
153
|
-
loading: false,
|
|
154
|
-
iconOnly: false,
|
|
155
|
-
icon: null,
|
|
156
|
-
iconPosition: ICON_POSITION.TRAILING,
|
|
157
|
-
iconDisabled: null,
|
|
158
|
-
iconLoading: null
|
|
159
|
-
};
|
|
160
129
|
export default BpkLoadingButton;
|
|
@@ -6,7 +6,7 @@ type Props = {
|
|
|
6
6
|
position: LatLong;
|
|
7
7
|
};
|
|
8
8
|
declare const BpkBasicMapMarker: {
|
|
9
|
-
(props: Props): JSX.Element;
|
|
9
|
+
(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
propTypes: {
|
|
11
11
|
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
12
12
|
position: any;
|
|
@@ -20,5 +20,5 @@ export type Props = Partial<ModalDialogProps> & {
|
|
|
20
20
|
*/
|
|
21
21
|
getApplicationElement: () => HTMLElement | null;
|
|
22
22
|
};
|
|
23
|
-
declare const BpkModal: ({ accessoryView, className, closeLabel, closeOnEscPressed, closeOnScrimClick, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, isIphone, isOpen, modalStyle, onClose, padded, renderTarget, showHeader, title, wide, ...rest }: Props) => JSX.Element;
|
|
23
|
+
declare const BpkModal: ({ accessoryView, className, closeLabel, closeOnEscPressed, closeOnScrimClick, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, isIphone, isOpen, modalStyle, onClose, padded, renderTarget, showHeader, title, wide, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export default BpkModal;
|
|
@@ -26,5 +26,5 @@ export declare const MODAL_STYLING: {
|
|
|
26
26
|
surfaceContrast: string;
|
|
27
27
|
};
|
|
28
28
|
export type ModalStyle = (typeof MODAL_STYLING)[keyof typeof MODAL_STYLING];
|
|
29
|
-
declare const BpkModalInner: ({ accessoryView, children, className, closeLabel, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, id, isIphone, modalStyle, onClose, padded, showHeader, title, wide, }: Props) => JSX.Element;
|
|
29
|
+
declare const BpkModalInner: ({ accessoryView, children, className, closeLabel, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, id, isIphone, modalStyle, onClose, padded, showHeader, title, wide, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export default BpkModalInner;
|
|
@@ -17,5 +17,5 @@ export type Props = {
|
|
|
17
17
|
barStyle?: BarStyle;
|
|
18
18
|
[rest: string]: any;
|
|
19
19
|
};
|
|
20
|
-
declare const BpkNavigationBar: (props: Props) => JSX.Element;
|
|
20
|
+
declare const BpkNavigationBar: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export default BpkNavigationBar;
|
|
@@ -8,5 +8,5 @@ export interface Props extends ComponentProps<BpkButtonLink> {
|
|
|
8
8
|
barStyle?: BarStyle;
|
|
9
9
|
[rest: string]: any;
|
|
10
10
|
}
|
|
11
|
-
declare const BpkNavigationBarButtonLink: ({ barStyle, children, className, ...rest }: Props) => JSX.Element;
|
|
11
|
+
declare const BpkNavigationBarButtonLink: ({ barStyle, children, className, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export default BpkNavigationBarButtonLink;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
.bpk-navigation-bar-button-link{color:#161616;color:var(--bpk-navigation-bar-button-link-color, rgb(22, 22, 22))}.bpk-no-touch-support .bpk-navigation-bar-button-link:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-button-link-hover-color, rgb(22, 22, 22))}:global(.bpk-no-touch-support) .bpk-navigation-bar-button-link:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-button-link-hover-color, rgb(22, 22, 22))}.bpk-navigation-bar-button-link:active{color:#161616;color:var(--bpk-navigation-bar-button-link-active-color, rgb(22, 22, 22))}.bpk-navigation-bar-button-link:visited{color:#161616;color:var(--bpk-navigation-bar-button-link-visited-color, rgb(22, 22, 22))}.bpk-navigation-bar-button-link--on-dark{color:#fff}.bpk-no-touch-support .bpk-navigation-bar-button-link--on-dark:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-navigation-bar-button-link--on-dark:hover:not(:active):not(:disabled){color:#fff}.bpk-navigation-bar-button-link--on-dark:active{color:#fff}.bpk-navigation-bar-button-link--on-dark:visited{color:#fff}
|
|
@@ -9,5 +9,5 @@ export type Props = {
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
[rest: string]: any;
|
|
11
11
|
};
|
|
12
|
-
declare const BpkNavigationBarIconButton: ({ barStyle, className, icon, ...rest }: Props) => JSX.Element;
|
|
12
|
+
declare const BpkNavigationBarIconButton: ({ barStyle, className, icon, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
export default BpkNavigationBarIconButton;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import BpkConfigurableNudger from './src/BpkConfigurableNudger';
|
|
2
1
|
import BpkNudger from './src/BpkNudger';
|
|
3
2
|
import themeAttributes from './src/themeAttributes';
|
|
4
3
|
export default BpkNudger;
|
|
5
|
-
export { themeAttributes
|
|
4
|
+
export { themeAttributes };
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import BpkConfigurableNudger from "./src/BpkConfigurableNudger";
|
|
20
19
|
import BpkNudger from "./src/BpkNudger";
|
|
21
20
|
import themeAttributes from "./src/themeAttributes";
|
|
22
21
|
export default BpkNudger;
|
|
23
|
-
export { themeAttributes
|
|
22
|
+
export { themeAttributes };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type CommonProps } from './common-types';
|
|
3
|
-
declare const BpkNudger: ({ buttonType, className, icon, id, subtitle, title, ...rest }: CommonProps) => JSX.Element;
|
|
2
|
+
declare const BpkNudger: ({ buttonType, className, decreaseButtonLabel, icon, id, increaseButtonLabel, inputClassName, max, min, name, onValueChange, step, subtitle, title, value, ...rest }: CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default BpkNudger;
|