@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
|
@@ -22,11 +22,13 @@ export default function withLazyLoading<P extends object>(WrappedComponent: Comp
|
|
|
22
22
|
checkInView: import("lodash").DebouncedFunc<() => void>;
|
|
23
23
|
supportsPassiveEvents: () => boolean;
|
|
24
24
|
isInViewPort: () => boolean;
|
|
25
|
-
render():
|
|
26
|
-
context:
|
|
25
|
+
render(): JSX.Element;
|
|
26
|
+
context: any;
|
|
27
27
|
setState<K extends "inView">(state: WithLazyLoadingState | ((prevState: Readonly<WithLazyLoadingState>, props: Readonly<Omit<P, "inView"> & WithLazyLoadingProps>) => Pick<WithLazyLoadingState, K> | WithLazyLoadingState | null) | Pick<WithLazyLoadingState, K> | null, callback?: (() => void) | undefined): void;
|
|
28
28
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
29
|
-
readonly props: Readonly<Omit<P, "inView"> & WithLazyLoadingProps
|
|
29
|
+
readonly props: Readonly<Omit<P, "inView"> & WithLazyLoadingProps> & Readonly<{
|
|
30
|
+
children?: import("react").ReactNode | undefined;
|
|
31
|
+
}>;
|
|
30
32
|
state: Readonly<WithLazyLoadingState>;
|
|
31
33
|
refs: {
|
|
32
34
|
[key: string]: import("react").ReactInstance;
|
|
@@ -9,11 +9,13 @@ type State = {
|
|
|
9
9
|
export default function withLoadingBehavior<P extends object>(WrappedComponent: ComponentType<P>): {
|
|
10
10
|
new (props: Omit<P, keyof InjectedProps>): {
|
|
11
11
|
onLoad: () => void;
|
|
12
|
-
render():
|
|
13
|
-
context:
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
context: any;
|
|
14
14
|
setState<K extends "loading">(state: State | ((prevState: Readonly<State>, props: Readonly<Omit<P, keyof InjectedProps>>) => Pick<State, K> | State | null) | Pick<State, K> | null, callback?: (() => void) | undefined): void;
|
|
15
15
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
16
|
-
readonly props: Readonly<Omit<P, keyof InjectedProps
|
|
16
|
+
readonly props: Readonly<Omit<P, keyof InjectedProps>> & Readonly<{
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
18
|
+
}>;
|
|
17
19
|
state: Readonly<State>;
|
|
18
20
|
refs: {
|
|
19
21
|
[key: string]: import("react").ReactInstance;
|
|
@@ -27,6 +27,6 @@ declare class AnimateAndFade extends Component<Props, State> {
|
|
|
27
27
|
onAnimateHeightComplete: () => void;
|
|
28
28
|
onFadeComplete: () => void;
|
|
29
29
|
toggle: () => void;
|
|
30
|
-
render():
|
|
30
|
+
render(): JSX.Element | null;
|
|
31
31
|
}
|
|
32
32
|
export default AnimateAndFade;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CommonProps } from './common-types';
|
|
2
|
-
declare const BpkInfoBanner: ({ animateOnEnter, animateOnLeave, icon, show, ...rest }: CommonProps) =>
|
|
2
|
+
declare const BpkInfoBanner: ({ animateOnEnter, animateOnLeave, icon, show, ...rest }: CommonProps) => JSX.Element;
|
|
3
3
|
export default BpkInfoBanner;
|
|
@@ -3,5 +3,5 @@ export type Props = CommonProps & {
|
|
|
3
3
|
dismissButtonLabel: string;
|
|
4
4
|
onDismiss?: OnDismissHandler;
|
|
5
5
|
};
|
|
6
|
-
declare const BpkInfoBannerDismissable: ({ onDismiss, ...rest }: Props) =>
|
|
6
|
+
declare const BpkInfoBannerDismissable: ({ onDismiss, ...rest }: Props) => JSX.Element;
|
|
7
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) =>
|
|
10
|
+
declare const BpkInfoBannerExpandable: ({ action, children, expanded, onExpandToggle, ...rest }: Props) => 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) =>
|
|
18
|
+
declare const BpkInfoBannerInner: ({ action, animateOnEnter, animateOnLeave, bannerClassName, children, configuration, dismissButtonLabel, expanded, icon, message, onDismiss, onExpandToggle, show, style, toggleButtonLabel, type, ...rest }: Props) => JSX.Element;
|
|
19
19
|
export default BpkInfoBannerInner;
|
|
@@ -14,8 +14,8 @@ declare const withBannerAlertState: <P extends BpkInfoBannerProps>(WrappedCompon
|
|
|
14
14
|
onExpandToggle: () => void;
|
|
15
15
|
onDismiss: () => void;
|
|
16
16
|
onHide: () => void;
|
|
17
|
-
render():
|
|
18
|
-
context:
|
|
17
|
+
render(): JSX.Element;
|
|
18
|
+
context: any;
|
|
19
19
|
setState<K extends keyof {
|
|
20
20
|
expanded?: boolean;
|
|
21
21
|
show?: boolean;
|
|
@@ -36,7 +36,9 @@ declare const withBannerAlertState: <P extends BpkInfoBannerProps>(WrappedCompon
|
|
|
36
36
|
show?: boolean;
|
|
37
37
|
}, K> | null, callback?: (() => void) | undefined): void;
|
|
38
38
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
39
|
-
readonly props: Readonly<P & WithBannerAlertStateProps
|
|
39
|
+
readonly props: Readonly<P & WithBannerAlertStateProps> & Readonly<{
|
|
40
|
+
children?: import("react").ReactNode | undefined;
|
|
41
|
+
}>;
|
|
40
42
|
state: Readonly<{
|
|
41
43
|
expanded?: boolean;
|
|
42
44
|
show?: boolean;
|
|
@@ -34,10 +34,12 @@ declare const withOpenEvents: <P extends object>(WithOpenEventsInputComponent: C
|
|
|
34
34
|
handleFocus: () => void;
|
|
35
35
|
handleBlur: () => void;
|
|
36
36
|
render(): ReactElement;
|
|
37
|
-
context:
|
|
37
|
+
context: any;
|
|
38
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
|
|
40
|
+
readonly props: Readonly<P & import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & Omit<EventHandlers, "aria-readonly" | "readOnly"> & WithOpenEventsProps> & Readonly<{
|
|
41
|
+
children?: import("react").ReactNode | undefined;
|
|
42
|
+
}>;
|
|
41
43
|
state: Readonly<{}>;
|
|
42
44
|
refs: {
|
|
43
45
|
[key: string]: import("react").ReactInstance;
|
|
@@ -18,5 +18,5 @@ export type Props = {
|
|
|
18
18
|
title?: string;
|
|
19
19
|
variant?: (typeof VARIANT)[keyof typeof VARIANT];
|
|
20
20
|
};
|
|
21
|
-
declare const BpkInsetBanner: ({ accessibilityLabel, backgroundColor, body, callToAction, logo, subheadline, title, variant, }: Props) =>
|
|
21
|
+
declare const BpkInsetBanner: ({ accessibilityLabel, backgroundColor, body, callToAction, logo, subheadline, title, variant, }: Props) => JSX.Element;
|
|
22
22
|
export default BpkInsetBanner;
|
|
@@ -3,5 +3,5 @@ export type Props = {
|
|
|
3
3
|
stops?: number;
|
|
4
4
|
[rest: string]: any;
|
|
5
5
|
};
|
|
6
|
-
declare const BpkJourneyArrow: ({ stops, ...rest }: Props) =>
|
|
6
|
+
declare const BpkJourneyArrow: ({ stops, ...rest }: Props) => JSX.Element;
|
|
7
7
|
export default BpkJourneyArrow;
|
|
@@ -25,7 +25,7 @@ type LoadingProps = {
|
|
|
25
25
|
iconLoading?: ReactElement<any>;
|
|
26
26
|
};
|
|
27
27
|
declare const BpkLoadingButton: {
|
|
28
|
-
(props: LoadingProps):
|
|
28
|
+
(props: LoadingProps): JSX.Element;
|
|
29
29
|
propTypes: {
|
|
30
30
|
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
31
31
|
className: PropTypes.Requireable<string>;
|
|
@@ -6,7 +6,7 @@ type Props = {
|
|
|
6
6
|
position: LatLong;
|
|
7
7
|
};
|
|
8
8
|
declare const BpkBasicMapMarker: {
|
|
9
|
-
(props: Props):
|
|
9
|
+
(props: Props): 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) =>
|
|
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;
|
|
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) =>
|
|
29
|
+
declare const BpkModalInner: ({ accessoryView, children, className, closeLabel, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, id, isIphone, modalStyle, onClose, padded, showHeader, title, wide, }: Props) => 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) =>
|
|
20
|
+
declare const BpkNavigationBar: (props: Props) => 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) =>
|
|
11
|
+
declare const BpkNavigationBarButtonLink: ({ barStyle, children, className, ...rest }: Props) => JSX.Element;
|
|
12
12
|
export default BpkNavigationBarButtonLink;
|
|
@@ -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) =>
|
|
12
|
+
declare const BpkNavigationBarIconButton: ({ barStyle, className, icon, ...rest }: Props) => JSX.Element;
|
|
13
13
|
export default BpkNavigationBarIconButton;
|
|
@@ -22,5 +22,5 @@ type Props = CommonProps & {
|
|
|
22
22
|
*/
|
|
23
23
|
compareValues: (arg0: any, arg1: any) => number;
|
|
24
24
|
};
|
|
25
|
-
declare const BpkConfigurableNudger: ({ buttonType, className, compareValues, decreaseButtonLabel, decrementValue, formatValue, id, increaseButtonLabel, incrementValue, inputClassName, max, min, name, onChange, value, ...rest }: Props) =>
|
|
25
|
+
declare const BpkConfigurableNudger: ({ buttonType, className, compareValues, decreaseButtonLabel, decrementValue, formatValue, id, increaseButtonLabel, incrementValue, inputClassName, max, min, name, onChange, value, ...rest }: Props) => JSX.Element;
|
|
26
26
|
export default BpkConfigurableNudger;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type CommonProps } from './common-types';
|
|
2
|
-
declare const BpkNudger: ({ buttonType, className, icon, id, subtitle, title, ...rest }: CommonProps) =>
|
|
2
|
+
declare const BpkNudger: ({ buttonType, className, icon, id, subtitle, title, ...rest }: CommonProps) => JSX.Element;
|
|
3
3
|
export default BpkNudger;
|
|
@@ -30,5 +30,5 @@ export type Props = BpkOverlayProps & ComponentProps<'div'> & {
|
|
|
30
30
|
overlayType?: OverlayType;
|
|
31
31
|
foregroundContent?: ReactNode;
|
|
32
32
|
};
|
|
33
|
-
declare const BpkOverlay: (props: Props) =>
|
|
33
|
+
declare const BpkOverlay: (props: Props) => JSX.Element;
|
|
34
34
|
export default BpkOverlay;
|
|
@@ -33,5 +33,5 @@ export type Props = CloseButtonProps & {
|
|
|
33
33
|
onAction?: () => void;
|
|
34
34
|
renderTarget?: () => HTMLElement | HTMLElement | null;
|
|
35
35
|
};
|
|
36
|
-
declare const BpkPopover: ({ actionText, children, className, closeButtonIcon, closeButtonLabel, closeButtonProps, closeButtonText, id, isOpen, label, labelAsTitle, onAction, onClose, padded, placement, renderTarget, showArrow, target, ...rest }: Props) =>
|
|
36
|
+
declare const BpkPopover: ({ actionText, children, className, closeButtonIcon, closeButtonLabel, closeButtonProps, closeButtonText, id, isOpen, label, labelAsTitle, onAction, onClose, padded, placement, renderTarget, showArrow, target, ...rest }: Props) => JSX.Element;
|
|
37
37
|
export default BpkPopover;
|
|
@@ -13,7 +13,7 @@ type Props = {
|
|
|
13
13
|
value: string | number;
|
|
14
14
|
};
|
|
15
15
|
declare const BpkRating: {
|
|
16
|
-
(props: Props):
|
|
16
|
+
(props: Props): JSX.Element;
|
|
17
17
|
propTypes: {
|
|
18
18
|
ariaLabel: PropTypes.Validator<string>;
|
|
19
19
|
value: PropTypes.Validator<NonNullable<NonNullable<string | number | null | undefined>>>;
|
|
@@ -10,6 +10,6 @@ declare class BpkRtlToggle extends Component<Props, State> {
|
|
|
10
10
|
componentWillUnmount(): void;
|
|
11
11
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
12
12
|
toggleRtl: (e: InteractionEvents) => void;
|
|
13
|
-
render():
|
|
13
|
+
render(): JSX.Element;
|
|
14
14
|
}
|
|
15
15
|
export default BpkRtlToggle;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
declare const updateOnDirectionChange: (EnhancedComponent: ComponentType<any> | string) => {
|
|
3
|
-
new (props: {}): {
|
|
3
|
+
new (props: {} | Readonly<{}>): {
|
|
4
4
|
componentDidMount(): void;
|
|
5
5
|
componentWillUnmount(): void;
|
|
6
6
|
onDirectionChange: () => void;
|
|
7
|
-
render():
|
|
8
|
-
context:
|
|
7
|
+
render(): JSX.Element;
|
|
8
|
+
context: any;
|
|
9
9
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
10
10
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
11
|
-
readonly props: Readonly<{}
|
|
11
|
+
readonly props: Readonly<{}> & Readonly<{
|
|
12
|
+
children?: import("react").ReactNode | undefined;
|
|
13
|
+
}>;
|
|
12
14
|
state: Readonly<{}>;
|
|
13
15
|
refs: {
|
|
14
16
|
[key: string]: import("react").ReactInstance;
|
|
@@ -28,11 +30,13 @@ declare const updateOnDirectionChange: (EnhancedComponent: ComponentType<any> |
|
|
|
28
30
|
componentDidMount(): void;
|
|
29
31
|
componentWillUnmount(): void;
|
|
30
32
|
onDirectionChange: () => void;
|
|
31
|
-
render():
|
|
32
|
-
context:
|
|
33
|
+
render(): JSX.Element;
|
|
34
|
+
context: any;
|
|
33
35
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
34
36
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
35
|
-
readonly props: Readonly<{}
|
|
37
|
+
readonly props: Readonly<{}> & Readonly<{
|
|
38
|
+
children?: import("react").ReactNode | undefined;
|
|
39
|
+
}>;
|
|
36
40
|
state: Readonly<{}>;
|
|
37
41
|
refs: {
|
|
38
42
|
[key: string]: import("react").ReactInstance;
|
|
@@ -27,8 +27,8 @@ declare const _default: {
|
|
|
27
27
|
source: string;
|
|
28
28
|
}) => void;
|
|
29
29
|
handleDateKeyDown: (event: KeyboardEvent) => void;
|
|
30
|
-
render():
|
|
31
|
-
context:
|
|
30
|
+
render(): JSX.Element;
|
|
31
|
+
context: any;
|
|
32
32
|
setState<K extends keyof {
|
|
33
33
|
preventKeyboardFocus: boolean;
|
|
34
34
|
focusedDate: Date;
|
|
@@ -65,6 +65,8 @@ declare const _default: {
|
|
|
65
65
|
maxDate: Date;
|
|
66
66
|
}> & {
|
|
67
67
|
[rest: string]: any;
|
|
68
|
+
}> & Readonly<{
|
|
69
|
+
children?: import("react").ReactNode | undefined;
|
|
68
70
|
}>;
|
|
69
71
|
state: Readonly<{
|
|
70
72
|
preventKeyboardFocus: boolean;
|
|
@@ -4,5 +4,5 @@ type Props = Partial<BpkCalendarDateProps> & {
|
|
|
4
4
|
isOutside?: boolean;
|
|
5
5
|
[rest: string]: any;
|
|
6
6
|
};
|
|
7
|
-
declare const BpkScrollableCalendarDate: ({ isOutside, ...rest }: Props) =>
|
|
7
|
+
declare const BpkScrollableCalendarDate: ({ isOutside, ...rest }: Props) => JSX.Element | null;
|
|
8
8
|
export default BpkScrollableCalendarDate;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ElementType
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
2
|
import type { BpkCalendarGridProps } from '../../bpk-component-calendar';
|
|
3
3
|
type Props = Partial<BpkCalendarGridProps> & {
|
|
4
4
|
DateComponent: ElementType;
|
|
5
5
|
month: Date;
|
|
6
6
|
formatDateFull: (date: Date) => Date | string;
|
|
7
7
|
weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
8
|
-
formatMonth: (date: Date) =>
|
|
8
|
+
formatMonth: (date: Date) => Date | string;
|
|
9
9
|
};
|
|
10
|
-
declare const BpkScrollableCalendarGrid: ({ className, formatMonth, ignoreOutsideDate, month, ...rest }: Props) =>
|
|
10
|
+
declare const BpkScrollableCalendarGrid: ({ className, formatMonth, ignoreOutsideDate, month, ...rest }: Props) => JSX.Element;
|
|
11
11
|
export default BpkScrollableCalendarGrid;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ElementType
|
|
1
|
+
import type { ElementType } from 'react';
|
|
2
2
|
import type { BpkCalendarGridProps, SelectionConfiguration } from '../../bpk-component-calendar';
|
|
3
3
|
type Props = Partial<BpkCalendarGridProps> & {
|
|
4
4
|
minDate: Date;
|
|
@@ -7,7 +7,7 @@ type Props = Partial<BpkCalendarGridProps> & {
|
|
|
7
7
|
formatDateFull: (date: Date) => Date | string;
|
|
8
8
|
month: Date;
|
|
9
9
|
weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
10
|
-
formatMonth: (date: Date) =>
|
|
10
|
+
formatMonth: (date: Date) => Date | string;
|
|
11
11
|
focusedDate?: Date | null;
|
|
12
12
|
selectionConfiguration?: SelectionConfiguration;
|
|
13
13
|
className?: string | null;
|
|
@@ -16,5 +16,5 @@ type Props = Partial<BpkCalendarGridProps> & {
|
|
|
16
16
|
*/
|
|
17
17
|
customRowHeight?: number;
|
|
18
18
|
};
|
|
19
|
-
declare const BpkScrollableCalendarGridList: (props: Props) =>
|
|
19
|
+
declare const BpkScrollableCalendarGridList: (props: Props) => JSX.Element;
|
|
20
20
|
export default BpkScrollableCalendarGridList;
|
|
@@ -10,5 +10,5 @@ type Props = {
|
|
|
10
10
|
button?: ReactNode;
|
|
11
11
|
type?: SectionType;
|
|
12
12
|
};
|
|
13
|
-
declare const BpkSectionHeader: ({ button, description, title, type, }: Props) =>
|
|
13
|
+
declare const BpkSectionHeader: ({ button, description, title, type, }: Props) => JSX.Element;
|
|
14
14
|
export default BpkSectionHeader;
|
|
@@ -13,5 +13,5 @@ export type Props = {
|
|
|
13
13
|
selectedIndex: number;
|
|
14
14
|
shadow?: boolean;
|
|
15
15
|
};
|
|
16
|
-
declare const BpkSegmentedControl: ({ buttonContents, onItemClick, selectedIndex, shadow, type, }: Props) =>
|
|
16
|
+
declare const BpkSegmentedControl: ({ buttonContents, onItemClick, selectedIndex, shadow, type, }: Props) => JSX.Element;
|
|
17
17
|
export default BpkSegmentedControl;
|
|
@@ -3,5 +3,5 @@ type Props = {
|
|
|
3
3
|
skeletonStyle: string;
|
|
4
4
|
styleObj?: CUSTOM_SIZE_TYPE;
|
|
5
5
|
};
|
|
6
|
-
declare const BpkBaseSkeleton: ({ skeletonStyle, styleObj, }: Props) =>
|
|
6
|
+
declare const BpkBaseSkeleton: ({ skeletonStyle, styleObj, }: Props) => JSX.Element;
|
|
7
7
|
export default BpkBaseSkeleton;
|
|
@@ -10,5 +10,5 @@ export type Props = {
|
|
|
10
10
|
ariaValuetext?: string[];
|
|
11
11
|
[rest: string]: any;
|
|
12
12
|
};
|
|
13
|
-
declare const BpkSlider: ({ ariaLabel, ariaValuetext, max, min, minDistance, onAfterChange, onChange, step, value, ...rest }: Props) =>
|
|
13
|
+
declare const BpkSlider: ({ ariaLabel, ariaValuetext, max, min, minDistance, onAfterChange, onChange, step, value, ...rest }: Props) => JSX.Element;
|
|
14
14
|
export default BpkSlider;
|
package/{bpk-component-datepicker/src/BpkDatepicker.module.css → bpk-component-snippet/index.js}
RENAMED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Backpack - Skyscanner's Design System
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Copyright 2016 Skyscanner Ltd
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
* you may not use this file except in compliance with the License.
|
|
8
8
|
* You may obtain a copy of the License at
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* Unless required by applicable law or agreed to in writing, software
|
|
13
13
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
import BpkSnippet, { BODY_STYLE, BUTTON_STYLE, DESKTOP_LAYOUT, HEADLINE_STYLE, IMAGE_ORIENTATION } from "./src/BpkSnippet";
|
|
20
|
+
export default BpkSnippet;
|
|
21
|
+
export { BODY_STYLE, BUTTON_STYLE, DESKTOP_LAYOUT, HEADLINE_STYLE, IMAGE_ORIENTATION };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
2
|
+
export declare const BODY_STYLE: {
|
|
3
|
+
readonly bodyDefault: "body-default";
|
|
4
|
+
readonly bodyLongform: "body-longform";
|
|
5
|
+
};
|
|
6
|
+
export declare const BUTTON_STYLE: {
|
|
7
|
+
readonly primary: "primary";
|
|
8
|
+
readonly featured: "featured";
|
|
9
|
+
};
|
|
10
|
+
export declare const HEADLINE_STYLE: {
|
|
11
|
+
readonly heading1: "heading-1";
|
|
12
|
+
readonly heading2: "heading-2";
|
|
13
|
+
readonly heading3: "heading-3";
|
|
14
|
+
readonly heading4: "heading-4";
|
|
15
|
+
readonly heading5: "heading-5";
|
|
16
|
+
readonly hero1: "hero-1";
|
|
17
|
+
readonly hero2: "hero-2";
|
|
18
|
+
readonly hero3: "hero-3";
|
|
19
|
+
readonly hero4: "hero-4";
|
|
20
|
+
readonly hero5: "hero-5";
|
|
21
|
+
};
|
|
22
|
+
export declare const DESKTOP_LAYOUT: {
|
|
23
|
+
readonly imageLeft: "imageLeft";
|
|
24
|
+
readonly imageRight: "imageRight";
|
|
25
|
+
readonly vertical: "vertical";
|
|
26
|
+
};
|
|
27
|
+
export declare const IMAGE_ORIENTATION: {
|
|
28
|
+
readonly landscape: "landscape";
|
|
29
|
+
readonly portrait: "portrait";
|
|
30
|
+
readonly square: "square";
|
|
31
|
+
};
|
|
32
|
+
export type Props = {
|
|
33
|
+
src: string;
|
|
34
|
+
altText: string;
|
|
35
|
+
headline?: string | null;
|
|
36
|
+
subheading?: string | null;
|
|
37
|
+
bodyText?: string | null;
|
|
38
|
+
buttonText?: string | null;
|
|
39
|
+
bodyStyle?: (typeof BODY_STYLE)[keyof typeof BODY_STYLE];
|
|
40
|
+
buttonStyle?: (typeof BUTTON_STYLE)[keyof typeof BUTTON_STYLE];
|
|
41
|
+
headlineStyle?: (typeof HEADLINE_STYLE)[keyof typeof HEADLINE_STYLE];
|
|
42
|
+
desktopLayout?: (typeof DESKTOP_LAYOUT)[keyof typeof DESKTOP_LAYOUT];
|
|
43
|
+
imageOrientation?: (typeof IMAGE_ORIENTATION)[keyof typeof IMAGE_ORIENTATION];
|
|
44
|
+
imageRadius?: boolean;
|
|
45
|
+
onClick?: (event: MouseEvent<HTMLButtonElement & HTMLAnchorElement>) => void;
|
|
46
|
+
};
|
|
47
|
+
declare const BpkSnippet: ({ altText, bodyStyle, bodyText, buttonStyle, buttonText, desktopLayout, headline, headlineStyle, imageOrientation, imageRadius, onClick, src, subheading, }: Props) => JSX.Element;
|
|
48
|
+
export default BpkSnippet;
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
|
|
19
|
+
import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
|
|
20
|
+
import { BpkButtonV2, BUTTON_TYPES } from "../../bpk-component-button";
|
|
21
|
+
import BpkImage, { BORDER_RADIUS_STYLES, withLazyLoading } from "../../bpk-component-image";
|
|
22
|
+
import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
|
|
23
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
24
|
+
import STYLES from "./BpkSnippet.module.css";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
const getClassName = cssModules(STYLES);
|
|
27
|
+
export const BODY_STYLE = {
|
|
28
|
+
bodyDefault: TEXT_STYLES.bodyDefault,
|
|
29
|
+
bodyLongform: TEXT_STYLES.bodyLongform
|
|
30
|
+
};
|
|
31
|
+
export const BUTTON_STYLE = {
|
|
32
|
+
primary: BUTTON_TYPES.primary,
|
|
33
|
+
featured: BUTTON_TYPES.featured
|
|
34
|
+
};
|
|
35
|
+
export const HEADLINE_STYLE = {
|
|
36
|
+
heading1: TEXT_STYLES.heading1,
|
|
37
|
+
heading2: TEXT_STYLES.heading2,
|
|
38
|
+
heading3: TEXT_STYLES.heading3,
|
|
39
|
+
heading4: TEXT_STYLES.heading4,
|
|
40
|
+
heading5: TEXT_STYLES.heading5,
|
|
41
|
+
hero1: TEXT_STYLES.hero1,
|
|
42
|
+
hero2: TEXT_STYLES.hero2,
|
|
43
|
+
hero3: TEXT_STYLES.hero3,
|
|
44
|
+
hero4: TEXT_STYLES.hero4,
|
|
45
|
+
hero5: TEXT_STYLES.hero5
|
|
46
|
+
};
|
|
47
|
+
export const DESKTOP_LAYOUT = {
|
|
48
|
+
imageLeft: 'imageLeft',
|
|
49
|
+
imageRight: 'imageRight',
|
|
50
|
+
vertical: 'vertical'
|
|
51
|
+
};
|
|
52
|
+
export const IMAGE_ORIENTATION = {
|
|
53
|
+
landscape: 'landscape',
|
|
54
|
+
portrait: 'portrait',
|
|
55
|
+
square: 'square'
|
|
56
|
+
};
|
|
57
|
+
const documentIfExists = typeof window !== 'undefined' ? document : null;
|
|
58
|
+
const LazyLoadedImage = withLazyLoading(BpkImage, documentIfExists);
|
|
59
|
+
const getImageAspectRatio = imageOrientation => {
|
|
60
|
+
let imageAspectRatio;
|
|
61
|
+
switch (imageOrientation) {
|
|
62
|
+
case 'landscape':
|
|
63
|
+
imageAspectRatio = 3 / 2;
|
|
64
|
+
break;
|
|
65
|
+
case 'square':
|
|
66
|
+
imageAspectRatio = 1;
|
|
67
|
+
break;
|
|
68
|
+
case 'portrait':
|
|
69
|
+
imageAspectRatio = 5 / 7;
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
imageAspectRatio = 3 / 2;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
return imageAspectRatio;
|
|
76
|
+
};
|
|
77
|
+
const BpkSnippet = ({
|
|
78
|
+
altText,
|
|
79
|
+
bodyStyle = BODY_STYLE.bodyDefault,
|
|
80
|
+
bodyText,
|
|
81
|
+
buttonStyle = BUTTON_STYLE.primary,
|
|
82
|
+
buttonText,
|
|
83
|
+
desktopLayout = DESKTOP_LAYOUT.imageLeft,
|
|
84
|
+
headline,
|
|
85
|
+
headlineStyle = HEADLINE_STYLE.hero5,
|
|
86
|
+
imageOrientation,
|
|
87
|
+
imageRadius = true,
|
|
88
|
+
onClick,
|
|
89
|
+
src,
|
|
90
|
+
subheading
|
|
91
|
+
}) => /*#__PURE__*/_jsx(BpkBreakpoint, {
|
|
92
|
+
query: BREAKPOINTS.MOBILE,
|
|
93
|
+
children: isMobile => /*#__PURE__*/_jsxs("div", {
|
|
94
|
+
className: getClassName('bpk-snippet', desktopLayout === 'imageRight' && 'bpk-snippet--row-reverse', desktopLayout === 'vertical' && 'bpk-snippet--vertical'),
|
|
95
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
96
|
+
className: getClassName('bpk-snippet--image', desktopLayout === 'vertical' ? 'bpk-snippet--vertical--container' : 'bpk-snippet--container'),
|
|
97
|
+
children: /*#__PURE__*/_jsx(LazyLoadedImage, {
|
|
98
|
+
altText: altText,
|
|
99
|
+
aspectRatio: getImageAspectRatio(imageOrientation),
|
|
100
|
+
borderRadiusStyle: imageRadius ? BORDER_RADIUS_STYLES.sm : BORDER_RADIUS_STYLES.none,
|
|
101
|
+
src: src
|
|
102
|
+
})
|
|
103
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
104
|
+
className: desktopLayout === 'vertical' ? getClassName('bpk-snippet--vertical--container', 'bpk-snippet--vertical--content') : getClassName('bpk-snippet--container', 'bpk-snippet--content'),
|
|
105
|
+
children: [headline && /*#__PURE__*/_jsx("div", {
|
|
106
|
+
className: getClassName('bpk-snippet--headline'),
|
|
107
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
108
|
+
textStyle: isMobile ? HEADLINE_STYLE.heading4 : headlineStyle,
|
|
109
|
+
children: headline
|
|
110
|
+
})
|
|
111
|
+
}), subheading && /*#__PURE__*/_jsx("div", {
|
|
112
|
+
className: getClassName('bpk-snippet--subheading'),
|
|
113
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
114
|
+
textStyle: TEXT_STYLES.subheading,
|
|
115
|
+
children: subheading
|
|
116
|
+
})
|
|
117
|
+
}), bodyText && /*#__PURE__*/_jsx("div", {
|
|
118
|
+
className: getClassName('bpk-snippet--bodyText'),
|
|
119
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
120
|
+
textStyle: isMobile ? BODY_STYLE.bodyDefault : bodyStyle,
|
|
121
|
+
children: bodyText
|
|
122
|
+
})
|
|
123
|
+
}), buttonText && onClick && /*#__PURE__*/_jsx(BpkButtonV2, {
|
|
124
|
+
type: buttonStyle,
|
|
125
|
+
onClick: onClick,
|
|
126
|
+
children: buttonText
|
|
127
|
+
})]
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
export default BpkSnippet;
|