@skyscanner/backpack-web 34.16.0-preminor.1 → 34.16.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-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 -1
- package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.d.ts +1 -1
- 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 +5 -3
- package/bpk-component-boilerplate/src/BpkBoilerplate.d.ts +1 -1
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.d.ts +1 -1
- package/bpk-component-button/BpkButtonDestructive.d.ts +1 -1
- package/bpk-component-button/BpkButtonFeatured.d.ts +1 -1
- package/bpk-component-button/BpkButtonLink.d.ts +1 -1
- package/bpk-component-button/BpkButtonLinkOnDark.d.ts +1 -1
- package/bpk-component-button/BpkButtonPrimary.d.ts +1 -1
- package/bpk-component-button/BpkButtonPrimaryOnDark.d.ts +1 -1
- package/bpk-component-button/BpkButtonPrimaryOnLight.d.ts +1 -1
- package/bpk-component-button/BpkButtonSecondary.d.ts +1 -1
- package/bpk-component-button/BpkButtonSecondaryOnDark.d.ts +1 -1
- package/bpk-component-button/src/BpkButton.d.ts +1 -1
- package/bpk-component-button/src/BpkButtonBase.d.ts +1 -1
- package/bpk-component-button/src/BpkButtonV2/BpkButton.d.ts +1 -1
- package/bpk-component-calendar/src/BpkCalendarContainer.d.ts +10 -6
- package/bpk-component-calendar/src/BpkCalendarContainer.js +0 -1
- package/bpk-component-calendar/src/BpkCalendarDate.d.ts +1 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.d.ts +2 -2
- 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-button/src/BpkSaveButton.d.ts +1 -1
- package/bpk-component-carousel/src/BpkCarousel.d.ts +1 -1
- package/bpk-component-carousel/src/BpkCarouselContainer.d.ts +1 -1
- package/bpk-component-chip/src/BpkDismissibleChip.d.ts +1 -1
- package/bpk-component-chip/src/BpkDropdownChip.d.ts +1 -1
- 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 -1
- package/bpk-component-chip-group/src/Nudger.d.ts +1 -1
- package/bpk-component-datatable/src/BpkDataTable.d.ts +1 -1
- package/bpk-component-datatable/src/BpkDataTableHeader.d.ts +1 -1
- package/bpk-component-datepicker/src/BpkDatepicker.d.ts +5 -3
- 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 -1
- package/bpk-component-dialog/src/BpkDialogInner.d.ts +11 -7
- package/bpk-component-floating-notification/src/BpkFloatingNotification.d.ts +1 -1
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.d.ts +1 -1
- package/bpk-component-icon/index.d.ts +2 -2
- package/bpk-component-icon/src/classNameModifierHOCFactory.d.ts +1 -1
- package/bpk-component-icon/src/withAlignment.d.ts +1 -1
- package/bpk-component-icon/src/withRtlSupport.d.ts +1 -1
- 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 +5 -3
- package/bpk-component-image/src/withLoadingBehavior.d.ts +5 -3
- package/bpk-component-info-banner/src/AnimateAndFade.d.ts +1 -1
- package/bpk-component-info-banner/src/BpkInfoBanner.d.ts +1 -1
- package/bpk-component-info-banner/src/BpkInfoBannerDismissable.d.ts +1 -1
- 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 +5 -3
- package/bpk-component-input/src/BpkInput.d.ts +1 -1
- package/bpk-component-input/src/withOpenEvents.d.ts +4 -2
- package/bpk-component-inset-banner/src/BpkInsetBanner.d.ts +1 -1
- package/bpk-component-journey-arrow/src/BpkJourneyArrow.d.ts +1 -1
- package/bpk-component-loading-button/src/BpkLoadingButton.d.ts +1 -1
- 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/BpkNavigationBarIconButton.d.ts +1 -1
- package/bpk-component-nudger/src/BpkConfigurableNudger.d.ts +1 -1
- package/bpk-component-nudger/src/BpkNudger.d.ts +1 -1
- 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 -7
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.d.ts +4 -2
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.d.ts +1 -1
- 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.ts +1 -1
- package/bpk-component-skeleton/src/BpkSkeleton.d.ts +1 -1
- package/bpk-component-slider/src/BpkSlider.d.ts +1 -1
- package/bpk-component-snippet/index.d.ts +3 -0
- package/{bpk-component-datepicker/src/BpkDatepicker.module.css → bpk-component-snippet/index.js} +8 -5
- 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 +1 -1
- package/bpk-component-spinner/src/BpkLargeSpinner.d.ts +1 -1
- package/bpk-component-spinner/src/BpkSpinner.d.ts +1 -1
- package/bpk-component-swap-button/src/BpkSwapButton.d.ts +1 -1
- 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 +3 -3
- 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/withDefaultProps.d.ts +1 -1
- package/bpk-scrim-utils/index.d.ts +11 -7
- package/bpk-scrim-utils/src/BpkScrim.d.ts +1 -1
- package/bpk-scrim-utils/src/withScrim.d.ts +11 -7
- package/bpk-scrim-utils/src/withScrimmedPortal.d.ts +1 -1
- package/package.json +3 -3
- package/bpk-component-button/src/BpkButtonDestructive.module.css +0 -18
- package/bpk-component-button/src/BpkButtonFeatured.module.css +0 -18
- package/bpk-component-button/src/BpkButtonLink.module.css +0 -18
- package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +0 -18
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +0 -18
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +0 -18
- package/bpk-component-button/src/BpkButtonSecondary.module.css +0 -18
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +0 -18
- package/bpk-component-carousel/src/utils.test.js +0 -12
- package/bpk-component-flare/src/__generated__/js/corner-radius.d.ts +0 -5
- package/bpk-component-flare/src/__generated__/js/pointer.d.ts +0 -5
- package/bpk-component-input/src/BpkClearButton.module.css +0 -18
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.css +0 -18
- package/bpk-stylesheets/test.css +0 -164
|
@@ -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-snippet{display:flex;flex-direction:row;align-items:center}@media(max-width: 48rem){.bpk-snippet{flex-direction:column;gap:1rem}}.bpk-snippet--row-reverse{flex-direction:row-reverse}@media(max-width: 48rem){.bpk-snippet--row-reverse{flex-direction:column;gap:1rem}}.bpk-snippet--vertical{flex-direction:column;gap:1rem}.bpk-snippet--vertical--container{width:100%}.bpk-snippet--vertical--content{padding:0}.bpk-snippet--container{width:50%}@media(max-width: 48rem){.bpk-snippet--container{width:100%}}.bpk-snippet--image img{height:100%;object-fit:cover}.bpk-snippet--content{display:flex;padding:4rem;flex-direction:column;justify-content:center;align-items:flex-start}@media(max-width: 48rem){.bpk-snippet--content{padding:0}}.bpk-snippet--headline,.bpk-snippet--subheading,.bpk-snippet--bodyText{padding-bottom:1rem}@media(max-width: 48rem){.bpk-snippet--headline,.bpk-snippet--subheading,.bpk-snippet--bodyText{padding-bottom:.5rem}}
|
|
@@ -5,7 +5,7 @@ type Props = {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
};
|
|
7
7
|
declare const BpkExtraLargeSpinner: {
|
|
8
|
-
(props: Props):
|
|
8
|
+
(props: Props): JSX.Element;
|
|
9
9
|
propTypes: {
|
|
10
10
|
type: PropTypes.Requireable<string>;
|
|
11
11
|
className: PropTypes.Requireable<string>;
|
|
@@ -6,7 +6,7 @@ type Props = {
|
|
|
6
6
|
alignToButton: boolean;
|
|
7
7
|
};
|
|
8
8
|
declare const BpkLargeSpinner: {
|
|
9
|
-
(props: Props):
|
|
9
|
+
(props: Props): JSX.Element;
|
|
10
10
|
propTypes: {
|
|
11
11
|
type: PropTypes.Requireable<string>;
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
@@ -6,7 +6,7 @@ type Props = {
|
|
|
6
6
|
alignToButton: boolean;
|
|
7
7
|
};
|
|
8
8
|
declare const BpkSpinner: {
|
|
9
|
-
(props: Props):
|
|
9
|
+
(props: Props): JSX.Element;
|
|
10
10
|
propTypes: {
|
|
11
11
|
type: PropTypes.Requireable<string>;
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
@@ -9,5 +9,5 @@ export type Props = {
|
|
|
9
9
|
ariaLabel: string;
|
|
10
10
|
swapButtonStyle?: SwapButtonStyle;
|
|
11
11
|
};
|
|
12
|
-
declare const BpkSwapButton: (props: Props) =>
|
|
12
|
+
declare const BpkSwapButton: (props: Props) => JSX.Element;
|
|
13
13
|
export default BpkSwapButton;
|
|
@@ -42,5 +42,5 @@ type Props = {
|
|
|
42
42
|
id?: string;
|
|
43
43
|
[rest: string]: any;
|
|
44
44
|
};
|
|
45
|
-
declare const BpkText: ({ children, className, tagName: TagName, textStyle, ...rest }: Props) =>
|
|
45
|
+
declare const BpkText: ({ children, className, tagName: TagName, textStyle, ...rest }: Props) => JSX.Element;
|
|
46
46
|
export default BpkText;
|
|
@@ -7,5 +7,5 @@ export type TooltipProps = {
|
|
|
7
7
|
padded?: boolean;
|
|
8
8
|
className?: string | null;
|
|
9
9
|
};
|
|
10
|
-
declare const BpkTooltip: ({ children, className, id, padded, type, ...rest }: TooltipProps) =>
|
|
10
|
+
declare const BpkTooltip: ({ children, className, id, padded, type, ...rest }: TooltipProps) => JSX.Element;
|
|
11
11
|
export default BpkTooltip;
|
|
@@ -49,6 +49,6 @@ declare class BpkTooltipPortal extends Component<Props, State> {
|
|
|
49
49
|
beforeClose: (done: () => void | null) => void;
|
|
50
50
|
openTooltip: () => void;
|
|
51
51
|
closeTooltip: () => void;
|
|
52
|
-
render():
|
|
52
|
+
render(): JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export default BpkTooltipPortal;
|
|
@@ -16,7 +16,7 @@ declare const _default: {
|
|
|
16
16
|
appearActiveClassName: string;
|
|
17
17
|
transitionTimeout: number;
|
|
18
18
|
children: string | import("react").ReactNode;
|
|
19
|
-
}) =>
|
|
19
|
+
}) => JSX.Element;
|
|
20
20
|
cssModules: (styles?: {
|
|
21
21
|
[key: string]: any;
|
|
22
22
|
}) => (...classNames: Array<string | boolean | number | {} | null | undefined>) => string;
|
|
@@ -29,7 +29,7 @@ declare const _default: {
|
|
|
29
29
|
[rest: string]: any;
|
|
30
30
|
children?: import("react").ReactNode | string;
|
|
31
31
|
className?: string | null;
|
|
32
|
-
}):
|
|
32
|
+
}): JSX.Element;
|
|
33
33
|
displayName: string;
|
|
34
34
|
};
|
|
35
35
|
wrapDisplayName: (Component: import("react").ComponentType<any> | string | null, hoc: string) => string;
|
|
@@ -37,7 +37,7 @@ declare const _default: {
|
|
|
37
37
|
isDeviceIpad: () => boolean;
|
|
38
38
|
isDeviceIos: () => boolean;
|
|
39
39
|
isRTL: () => boolean;
|
|
40
|
-
BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: import("./src/BpkDialogWrapper/BpkDialogWrapper").Props) =>
|
|
40
|
+
BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: import("./src/BpkDialogWrapper/BpkDialogWrapper").Props) => JSX.Element | null;
|
|
41
41
|
setNativeValue: typeof setNativeValue;
|
|
42
42
|
};
|
|
43
43
|
export default _default;
|
|
@@ -25,5 +25,5 @@ export type Props = CommonProps & ({
|
|
|
25
25
|
} | {
|
|
26
26
|
ariaLabel: string;
|
|
27
27
|
});
|
|
28
|
-
export declare const BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: Props) =>
|
|
28
|
+
export declare const BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: Props) => JSX.Element | null;
|
|
29
29
|
export {};
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
transitionTimeout: number;
|
|
6
6
|
children: string | ReactNode;
|
|
7
7
|
};
|
|
8
|
-
declare const TransitionInitialMount: ({ appearActiveClassName, appearClassName, children, transitionTimeout, }: Props) =>
|
|
8
|
+
declare const TransitionInitialMount: ({ appearActiveClassName, appearClassName, children, transitionTimeout, }: Props) => JSX.Element;
|
|
9
9
|
export default TransitionInitialMount;
|
|
@@ -9,7 +9,7 @@ type DefaultProps = {
|
|
|
9
9
|
[rest: string]: any;
|
|
10
10
|
};
|
|
11
11
|
declare const withDefaultProps: (WrappedComponent: ComponentType<any>, defaultProps: DefaultProps) => {
|
|
12
|
-
({ children, className: innerClassName, ...rest }: Props):
|
|
12
|
+
({ children, className: innerClassName, ...rest }: Props): JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
export default withDefaultProps;
|
|
@@ -3,16 +3,18 @@ import withScrimmedPortal from './src/withScrimmedPortal';
|
|
|
3
3
|
export { withScrim, withScrimmedPortal };
|
|
4
4
|
declare const _default: {
|
|
5
5
|
withScrim: <P extends object>(WrappedComponent: import("react").ComponentType<P> | string) => {
|
|
6
|
-
new (props: import("./src/withScrim").Props & Omit<P, "dialogRef">): {
|
|
6
|
+
new (props: (import("./src/withScrim").Props & Omit<P, "dialogRef">) | Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>): {
|
|
7
7
|
dialogElement?: HTMLElement | null | undefined;
|
|
8
8
|
componentDidMount(): void;
|
|
9
9
|
componentWillUnmount(): void;
|
|
10
10
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
11
|
-
render():
|
|
12
|
-
context:
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
context: any;
|
|
13
13
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
14
14
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
15
|
-
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef"
|
|
15
|
+
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">> & Readonly<{
|
|
16
|
+
children?: import("react").ReactNode | undefined;
|
|
17
|
+
}>;
|
|
16
18
|
state: Readonly<{}>;
|
|
17
19
|
refs: {
|
|
18
20
|
[key: string]: import("react").ReactInstance;
|
|
@@ -33,11 +35,13 @@ declare const _default: {
|
|
|
33
35
|
componentDidMount(): void;
|
|
34
36
|
componentWillUnmount(): void;
|
|
35
37
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
36
|
-
render():
|
|
37
|
-
context:
|
|
38
|
+
render(): JSX.Element;
|
|
39
|
+
context: any;
|
|
38
40
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
39
41
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
40
|
-
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef"
|
|
42
|
+
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">> & Readonly<{
|
|
43
|
+
children?: import("react").ReactNode | undefined;
|
|
44
|
+
}>;
|
|
41
45
|
state: Readonly<{}>;
|
|
42
46
|
refs: {
|
|
43
47
|
[key: string]: import("react").ReactInstance;
|
|
@@ -2,5 +2,5 @@ import type { SyntheticEvent } from 'react';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
onClose?: (e?: SyntheticEvent) => void | null;
|
|
4
4
|
};
|
|
5
|
-
declare const BpkScrim: ({ onClose }: Props) =>
|
|
5
|
+
declare const BpkScrim: ({ onClose }: Props) => JSX.Element;
|
|
6
6
|
export default BpkScrim;
|
|
@@ -21,16 +21,18 @@ export type Props = {
|
|
|
21
21
|
[rest: string]: any;
|
|
22
22
|
};
|
|
23
23
|
declare const withScrim: <P extends object>(WrappedComponent: ComponentType<P> | string) => {
|
|
24
|
-
new (props: Props & Omit<P, "dialogRef">): {
|
|
24
|
+
new (props: (Props & Omit<P, "dialogRef">) | Readonly<Props & Omit<P, "dialogRef">>): {
|
|
25
25
|
dialogElement?: HTMLElement | null | undefined;
|
|
26
26
|
componentDidMount(): void;
|
|
27
27
|
componentWillUnmount(): void;
|
|
28
28
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
29
|
-
render():
|
|
30
|
-
context:
|
|
29
|
+
render(): JSX.Element;
|
|
30
|
+
context: any;
|
|
31
31
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props & Omit<P, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
32
32
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
33
|
-
readonly props: Readonly<Props & Omit<P, "dialogRef"
|
|
33
|
+
readonly props: Readonly<Props & Omit<P, "dialogRef">> & Readonly<{
|
|
34
|
+
children?: import("react").ReactNode | undefined;
|
|
35
|
+
}>;
|
|
34
36
|
state: Readonly<{}>;
|
|
35
37
|
refs: {
|
|
36
38
|
[key: string]: import("react").ReactInstance;
|
|
@@ -51,11 +53,13 @@ declare const withScrim: <P extends object>(WrappedComponent: ComponentType<P> |
|
|
|
51
53
|
componentDidMount(): void;
|
|
52
54
|
componentWillUnmount(): void;
|
|
53
55
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
54
|
-
render():
|
|
55
|
-
context:
|
|
56
|
+
render(): JSX.Element;
|
|
57
|
+
context: any;
|
|
56
58
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props & Omit<P, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
57
59
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
58
|
-
readonly props: Readonly<Props & Omit<P, "dialogRef"
|
|
60
|
+
readonly props: Readonly<Props & Omit<P, "dialogRef">> & Readonly<{
|
|
61
|
+
children?: import("react").ReactNode | undefined;
|
|
62
|
+
}>;
|
|
59
63
|
state: Readonly<{}>;
|
|
60
64
|
refs: {
|
|
61
65
|
[key: string]: import("react").ReactInstance;
|
|
@@ -3,5 +3,5 @@ import type { Props as ScrimProps } from './withScrim';
|
|
|
3
3
|
export type Props = ScrimProps & {
|
|
4
4
|
renderTarget?: (() => HTMLElement | null) | null;
|
|
5
5
|
};
|
|
6
|
-
declare const withScrimmedPortal: (WrappedComponent: ComponentType<ScrimProps>) => ({ renderTarget, ...rest }: Props) =>
|
|
6
|
+
declare const withScrimmedPortal: (WrappedComponent: ComponentType<ScrimProps>) => ({ renderTarget, ...rest }: Props) => JSX.Element;
|
|
7
7
|
export default withScrimmedPortal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyscanner/backpack-web",
|
|
3
|
-
"version": "34.16.0
|
|
3
|
+
"version": "34.16.0",
|
|
4
4
|
"description": "Backpack Design System web library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"node-sass": ">= 7",
|
|
50
|
-
"react": "
|
|
51
|
-
"react-dom": "
|
|
50
|
+
"react": "^17.0.2",
|
|
51
|
+
"react-dom": "^17.0.2",
|
|
52
52
|
"react-transition-group": "^4.4.5",
|
|
53
53
|
"sass": "^1",
|
|
54
54
|
"sass-embedded": "^1"
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--destructive{color:#161616;color:var(--bpk-button-secondary-text-color, rgb(22, 22, 22));background-color:#e0e4e9;background-color:var(--bpk-button-secondary-background-color, rgb(224, 228, 233));color:#e70866;color:var(--bpk-button-destructive-text-color, rgb(231, 8, 102));background-color:#e0e4e9;background-color:var(--bpk-button-destructive-background-color, rgb(224, 228, 233))}.bpk-no-touch-support .bpk-button--destructive:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-button-secondary-hover-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-secondary-hover-background-color, rgb(193, 199, 207))}:global(.bpk-no-touch-support) .bpk-button--destructive:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-button-secondary-hover-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-secondary-hover-background-color, rgb(193, 199, 207))}.bpk-button--destructive:active{color:#161616;color:var(--bpk-button-secondary-active-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-secondary-active-background-color, rgb(193, 199, 207))}.bpk-button--destructive:disabled{background-color:#e0e4e9;color:rgba(0,0,0,.2)}.bpk-no-touch-support .bpk-button--destructive:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-destructive-hover-text-color, rgb(255, 255, 255));background-color:#e70866;background-color:var(--bpk-button-destructive-hover-background-color, rgb(231, 8, 102))}:global(.bpk-no-touch-support) .bpk-button--destructive:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-destructive-hover-text-color, rgb(255, 255, 255));background-color:#e70866;background-color:var(--bpk-button-destructive-hover-background-color, rgb(231, 8, 102))}.bpk-button--destructive:active{color:#fff;color:var(--bpk-button-destructive-active-text-color, rgb(255, 255, 255));background-color:#e70866;background-color:var(--bpk-button-destructive-active-background-color, rgb(231, 8, 102))}.bpk-button--destructive:disabled{background-color:#e0e4e9;color:rgba(0,0,0,.2)}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--featured{color:#fff;color:var(--bpk-button-featured-text-color, rgb(255, 255, 255));background-color:#0062e3;background-color:var(--bpk-button-featured-background-color, rgb(0, 98, 227))}.bpk-no-touch-support .bpk-button--featured:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-featured-hover-text-color, rgb(255, 255, 255));background-color:#024daf;background-color:var(--bpk-button-featured-hover-background-color, rgb(2, 77, 175))}:global(.bpk-no-touch-support) .bpk-button--featured:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-featured-hover-text-color, rgb(255, 255, 255));background-color:#024daf;background-color:var(--bpk-button-featured-hover-background-color, rgb(2, 77, 175))}.bpk-button--featured:active{color:#fff;color:var(--bpk-button-featured-active-text-color, rgb(255, 255, 255));background-color:#024daf;background-color:var(--bpk-button-featured-active-background-color, rgb(2, 77, 175))}.bpk-button--featured:disabled{background-color:#e0e4e9;color:rgba(0,0,0,.2)}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--link{background:none;box-shadow:none;padding:0;border:0;background-color:rgba(0,0,0,0);text-decoration:none;cursor:pointer;appearance:none;color:#0062e3;color:var(--bpk-link-color, rgb(0, 98, 227));padding:.375rem 0;color:#0062e3}.bpk-no-touch-support .bpk-button--link:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, rgb(0, 98, 227))}:global(.bpk-no-touch-support) .bpk-button--link:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, rgb(0, 98, 227))}.bpk-button--link:visited{color:#0062e3;color:var(--bpk-link-visited-color, rgb(0, 98, 227))}.bpk-button--link:active{text-decoration:underline;color:#0062e3;color:var(--bpk-link-active-color, rgb(0, 98, 227))}.bpk-no-touch-support .bpk-button--link:hover:not(:active):not(:disabled){background:none;color:#024daf;text-decoration:none}:global(.bpk-no-touch-support) .bpk-button--link:hover:not(:active):not(:disabled){background:none;color:#024daf;text-decoration:none}.bpk-button--link:active{background:none;color:#024daf;text-decoration:none}.bpk-button--link:disabled{background:none;color:rgba(0,0,0,.2);text-decoration:none}.bpk-button--link-large{padding:.75rem 0}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--link-on-dark{background:none;box-shadow:none;padding:0;border:0;background-color:rgba(0,0,0,0);text-decoration:none;cursor:pointer;appearance:none;color:#0062e3;color:var(--bpk-link-color, rgb(0, 98, 227));padding:.375rem 0;color:#0062e3;color:#fff;color:var(--bpk-button-link-on-dark-text-color, rgb(255, 255, 255))}.bpk-no-touch-support .bpk-button--link-on-dark:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, rgb(0, 98, 227))}:global(.bpk-no-touch-support) .bpk-button--link-on-dark:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, rgb(0, 98, 227))}.bpk-button--link-on-dark:visited{color:#0062e3;color:var(--bpk-link-visited-color, rgb(0, 98, 227))}.bpk-button--link-on-dark:active{text-decoration:underline;color:#0062e3;color:var(--bpk-link-active-color, rgb(0, 98, 227))}.bpk-no-touch-support .bpk-button--link-on-dark:hover:not(:active):not(:disabled){background:none;color:#024daf;text-decoration:none}:global(.bpk-no-touch-support) .bpk-button--link-on-dark:hover:not(:active):not(:disabled){background:none;color:#024daf;text-decoration:none}.bpk-button--link-on-dark:active{background:none;color:#024daf;text-decoration:none}.bpk-button--link-on-dark:disabled{background:none;color:rgba(0,0,0,.2);text-decoration:none}.bpk-button--link-on-dark-large{padding:.75rem 0}.bpk-no-touch-support .bpk-button--link-on-dark:hover:not(:active):not(:disabled){color:rgba(255,255,255,.5);color:var(--bpk-button-link-on-dark-hover-text-color, rgba(255, 255, 255, 0.5))}:global(.bpk-no-touch-support) .bpk-button--link-on-dark:hover:not(:active):not(:disabled){color:rgba(255,255,255,.5);color:var(--bpk-button-link-on-dark-hover-text-color, rgba(255, 255, 255, 0.5))}.bpk-button--link-on-dark:active{color:rgba(255,255,255,.5);color:var(--bpk-button-link-on-dark-active-text-color, rgba(255, 255, 255, 0.5))}.bpk-button--link-on-dark:visited{color:#fff;color:var(--bpk-button-link-on-dark-text-color, rgb(255, 255, 255))}.bpk-button--link-on-dark:disabled{color:rgba(255,255,255,.2);color:var(--bpk-button-link-on-dark-disabled-color, rgba(255, 255, 255, 0.2))}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--primary-on-dark{color:#161616;color:var(--bpk-button-primary-on-dark-text-color, rgb(22, 22, 22));background-color:#fff;background-color:var(--bpk-button-primary-on-dark-background-color, rgb(255, 255, 255))}.bpk-no-touch-support .bpk-button--primary-on-dark:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-button-primary-on-dark-hover-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-primary-on-dark-hover-background-color, rgb(193, 199, 207))}:global(.bpk-no-touch-support) .bpk-button--primary-on-dark:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-button-primary-on-dark-hover-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-primary-on-dark-hover-background-color, rgb(193, 199, 207))}.bpk-button--primary-on-dark:active{color:#161616;color:var(--bpk-button-primary-on-dark-active-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-primary-on-dark-active-background-color, rgb(193, 199, 207))}.bpk-button--primary-on-dark:disabled{background-color:#e0e4e9;color:rgba(0,0,0,.2)}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--primary-on-light{color:#fff;color:var(--bpk-button-primary-on-light-text-color, rgb(255, 255, 255));background-color:#05203c;background-color:var(--bpk-button-primary-on-light-background-color, rgb(5, 32, 60))}.bpk-no-touch-support .bpk-button--primary-on-light:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-primary-on-light-hover-text-color, rgb(255, 255, 255));background-color:#154679;background-color:var(--bpk-button-primary-on-light-hover-background-color, rgb(21, 70, 121))}:global(.bpk-no-touch-support) .bpk-button--primary-on-light:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-primary-on-light-hover-text-color, rgb(255, 255, 255));background-color:#154679;background-color:var(--bpk-button-primary-on-light-hover-background-color, rgb(21, 70, 121))}.bpk-button--primary-on-light:active{color:#fff;color:var(--bpk-button-primary-on-light-active-text-color, rgb(255, 255, 255));background-color:#154679;background-color:var(--bpk-button-primary-on-light-active-background-color, rgb(21, 70, 121))}.bpk-button--primary-on-light:disabled{background-color:#e0e4e9;color:rgba(0,0,0,.2)}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--secondary{color:#161616;color:var(--bpk-button-secondary-text-color, rgb(22, 22, 22));background-color:#e0e4e9;background-color:var(--bpk-button-secondary-background-color, rgb(224, 228, 233))}.bpk-no-touch-support .bpk-button--secondary:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-button-secondary-hover-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-secondary-hover-background-color, rgb(193, 199, 207))}:global(.bpk-no-touch-support) .bpk-button--secondary:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-button-secondary-hover-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-secondary-hover-background-color, rgb(193, 199, 207))}.bpk-button--secondary:active{color:#161616;color:var(--bpk-button-secondary-active-text-color, rgb(22, 22, 22));background-color:#c1c7cf;background-color:var(--bpk-button-secondary-active-background-color, rgb(193, 199, 207))}.bpk-button--secondary:disabled{background-color:#e0e4e9;color:rgba(0,0,0,.2)}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--secondary-on-dark{color:#fff;color:var(--bpk-button-secondary-on-dark-text-color, rgb(255, 255, 255));background-color:rgba(255,255,255,.1);background-color:var(--bpk-button-secondary-on-dark-background-color, rgba(255, 255, 255, 0.1))}.bpk-no-touch-support .bpk-button--secondary-on-dark:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-secondary-on-dark-hover-text-color, rgb(255, 255, 255));background-color:#010913;background-color:var(--bpk-button-secondary-on-dark-hover-background-color, rgb(1, 9, 19))}:global(.bpk-no-touch-support) .bpk-button--secondary-on-dark:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-button-secondary-on-dark-hover-text-color, rgb(255, 255, 255));background-color:#010913;background-color:var(--bpk-button-secondary-on-dark-hover-background-color, rgb(1, 9, 19))}.bpk-button--secondary-on-dark:active{color:#fff;color:var(--bpk-button-secondary-on-dark-active-text-color, rgb(255, 255, 255));background-color:#010913;background-color:var(--bpk-button-secondary-on-dark-active-background-color, rgb(1, 9, 19))}.bpk-button--secondary-on-dark:disabled{background-color:#0b121d;color:rgba(255,255,255,.2)}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { renderHook } from '@testing-library/react';
|
|
2
|
-
import { useScrollToInitialImage } from "./utils";
|
|
3
|
-
describe('useScrollToInitialImage', () => {
|
|
4
|
-
it('should scroll to initial image on mount', () => {
|
|
5
|
-
const imagesRef = {
|
|
6
|
-
current: [document.createElement('div'), document.createElement('div')]
|
|
7
|
-
};
|
|
8
|
-
const initialImageIndex = 0;
|
|
9
|
-
renderHook(() => useScrollToInitialImage(initialImageIndex, imagesRef));
|
|
10
|
-
expect(imagesRef.current[initialImageIndex].scrollIntoView).toHaveBeenCalledTimes(1);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
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}
|
|
@@ -1,18 +0,0 @@
|
|
|
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}
|