@skyscanner/backpack-web 34.15.1 → 34.16.0-preminor.1
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/BpkCalendarContainer.js +1 -0
- 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 +12 -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-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/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 +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/BpkNavigationBarButtonLink.module.css +18 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.d.ts +1 -1
- package/bpk-component-nudger/src/BpkConfigurableNudger.d.ts +1 -2
- package/bpk-component-nudger/src/BpkNudger.d.ts +1 -2
- 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 +1 -2
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.d.ts +1 -2
- package/bpk-component-spinner/src/BpkLargeSpinner.d.ts +1 -2
- package/bpk-component-spinner/src/BpkSpinner.d.ts +1 -2
- package/bpk-component-split-input/src/BpkInputField.js +4 -1
- package/bpk-component-split-input/src/BpkSplitInput.js +1 -1
- 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/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/package.json +3 -3
|
@@ -37,6 +37,7 @@ class BpkInputField extends Component {
|
|
|
37
37
|
id,
|
|
38
38
|
index,
|
|
39
39
|
label,
|
|
40
|
+
name,
|
|
40
41
|
value,
|
|
41
42
|
...rest
|
|
42
43
|
} = this.props;
|
|
@@ -51,6 +52,7 @@ class BpkInputField extends Component {
|
|
|
51
52
|
this.input = input;
|
|
52
53
|
},
|
|
53
54
|
value: value || '',
|
|
55
|
+
name: name || '',
|
|
54
56
|
...rest
|
|
55
57
|
})
|
|
56
58
|
}, index);
|
|
@@ -61,7 +63,8 @@ BpkInputField.propTypes = {
|
|
|
61
63
|
label: PropTypes.string.isRequired,
|
|
62
64
|
value: PropTypes.string,
|
|
63
65
|
focus: PropTypes.bool.isRequired,
|
|
64
|
-
index: PropTypes.number.isRequired
|
|
66
|
+
index: PropTypes.number.isRequired,
|
|
67
|
+
name: PropTypes.string
|
|
65
68
|
};
|
|
66
69
|
BpkInputField.defaultProps = {
|
|
67
70
|
value: ''
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const SWAPBUTTON_STYLES: {
|
|
3
2
|
surfaceContrast: string;
|
|
4
3
|
canvasDefault: string;
|
|
@@ -10,5 +9,5 @@ export type Props = {
|
|
|
10
9
|
ariaLabel: string;
|
|
11
10
|
swapButtonStyle?: SwapButtonStyle;
|
|
12
11
|
};
|
|
13
|
-
declare const BpkSwapButton: (props: Props) => JSX.Element;
|
|
12
|
+
declare const BpkSwapButton: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
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) => JSX.Element;
|
|
45
|
+
declare const BpkText: ({ children, className, tagName: TagName, textStyle, ...rest }: Props) => import("react/jsx-runtime").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) => JSX.Element;
|
|
10
|
+
declare const BpkTooltip: ({ children, className, id, padded, type, ...rest }: TooltipProps) => import("react/jsx-runtime").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(): JSX.Element;
|
|
52
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export default BpkTooltipPortal;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BpkDialogWrapper } from './src/BpkDialogWrapper/BpkDialogWrapper';
|
|
3
2
|
import Portal from './src/Portal';
|
|
4
3
|
import TransitionInitialMount from './src/TransitionInitialMount';
|
|
@@ -16,29 +15,29 @@ declare const _default: {
|
|
|
16
15
|
appearClassName: string;
|
|
17
16
|
appearActiveClassName: string;
|
|
18
17
|
transitionTimeout: number;
|
|
19
|
-
children: import("react").ReactNode;
|
|
20
|
-
}) => JSX.Element;
|
|
18
|
+
children: string | import("react").ReactNode;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
cssModules: (styles?: {
|
|
22
21
|
[key: string]: any;
|
|
23
|
-
}) => (...classNames:
|
|
22
|
+
}) => (...classNames: Array<string | boolean | number | {} | null | undefined>) => string;
|
|
24
23
|
deprecated: any;
|
|
25
24
|
withDefaultProps: (WrappedComponent: import("react").ComponentType<any>, defaultProps: {
|
|
26
25
|
[rest: string]: any;
|
|
27
|
-
className?: string
|
|
26
|
+
className?: string;
|
|
28
27
|
}) => {
|
|
29
28
|
({ children, className: innerClassName, ...rest }: {
|
|
30
29
|
[rest: string]: any;
|
|
31
|
-
children?: import("react").ReactNode;
|
|
32
|
-
className?: string | null
|
|
33
|
-
}): JSX.Element;
|
|
30
|
+
children?: import("react").ReactNode | string;
|
|
31
|
+
className?: string | null;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
34
33
|
displayName: string;
|
|
35
34
|
};
|
|
36
|
-
wrapDisplayName: (Component:
|
|
35
|
+
wrapDisplayName: (Component: import("react").ComponentType<any> | string | null, hoc: string) => string;
|
|
37
36
|
isDeviceIphone: () => boolean;
|
|
38
37
|
isDeviceIpad: () => boolean;
|
|
39
38
|
isDeviceIos: () => boolean;
|
|
40
39
|
isRTL: () => boolean;
|
|
41
|
-
BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: import("./src/BpkDialogWrapper/BpkDialogWrapper").Props) => JSX.Element | null;
|
|
40
|
+
BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: import("./src/BpkDialogWrapper/BpkDialogWrapper").Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
42
41
|
setNativeValue: typeof setNativeValue;
|
|
43
42
|
};
|
|
44
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) => JSX.Element | null;
|
|
28
|
+
export declare const BpkDialogWrapper: ({ children, closeOnEscPressed, closeOnScrimClick, dialogClassName, exiting, id, isOpen, onClose, timeout, transitionClassNames, ...ariaProps }: Props) => import("react/jsx-runtime").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) => JSX.Element;
|
|
8
|
+
declare const TransitionInitialMount: ({ appearActiveClassName, appearClassName, children, transitionTimeout, }: Props) => import("react/jsx-runtime").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): JSX.Element;
|
|
12
|
+
({ children, className: innerClassName, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
export default withDefaultProps;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import withScrim from './src/withScrim';
|
|
3
2
|
import withScrimmedPortal from './src/withScrimmedPortal';
|
|
4
3
|
export { withScrim, withScrimmedPortal };
|
|
5
4
|
declare const _default: {
|
|
6
|
-
withScrim: <P extends object>(WrappedComponent:
|
|
7
|
-
new (props:
|
|
5
|
+
withScrim: <P extends object>(WrappedComponent: import("react").ComponentType<P> | string) => {
|
|
6
|
+
new (props: import("./src/withScrim").Props & Omit<P, "dialogRef">): {
|
|
8
7
|
dialogElement?: HTMLElement | null | undefined;
|
|
9
8
|
componentDidMount(): void;
|
|
10
9
|
componentWillUnmount(): void;
|
|
11
10
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
context:
|
|
14
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>) =>
|
|
11
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
context: unknown;
|
|
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;
|
|
15
14
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
16
|
-
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef"
|
|
17
|
-
children?: import("react").ReactNode;
|
|
18
|
-
}>;
|
|
15
|
+
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>;
|
|
19
16
|
state: Readonly<{}>;
|
|
20
17
|
refs: {
|
|
21
18
|
[key: string]: import("react").ReactInstance;
|
|
22
19
|
};
|
|
23
20
|
shouldComponentUpdate?(nextProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
24
21
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
25
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any;
|
|
22
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any | null;
|
|
26
23
|
componentDidUpdate?(prevProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
27
24
|
componentWillMount?(): void;
|
|
28
25
|
UNSAFE_componentWillMount?(): void;
|
|
@@ -36,20 +33,18 @@ declare const _default: {
|
|
|
36
33
|
componentDidMount(): void;
|
|
37
34
|
componentWillUnmount(): void;
|
|
38
35
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
39
|
-
render(): JSX.Element;
|
|
40
|
-
context:
|
|
41
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>) =>
|
|
36
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
context: unknown;
|
|
38
|
+
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;
|
|
42
39
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
43
|
-
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef"
|
|
44
|
-
children?: import("react").ReactNode;
|
|
45
|
-
}>;
|
|
40
|
+
readonly props: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>;
|
|
46
41
|
state: Readonly<{}>;
|
|
47
42
|
refs: {
|
|
48
43
|
[key: string]: import("react").ReactInstance;
|
|
49
44
|
};
|
|
50
45
|
shouldComponentUpdate?(nextProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
51
46
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
52
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any;
|
|
47
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any | null;
|
|
53
48
|
componentDidUpdate?(prevProps: Readonly<import("./src/withScrim").Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
54
49
|
componentWillMount?(): void;
|
|
55
50
|
UNSAFE_componentWillMount?(): void;
|
|
@@ -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) => JSX.Element;
|
|
5
|
+
declare const BpkScrim: ({ onClose }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default BpkScrim;
|
|
@@ -21,25 +21,23 @@ 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:
|
|
24
|
+
new (props: 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(): JSX.Element;
|
|
30
|
-
context:
|
|
31
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props & Omit<P, "dialogRef">>) =>
|
|
29
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
context: unknown;
|
|
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"
|
|
34
|
-
children?: import("react").ReactNode;
|
|
35
|
-
}>;
|
|
33
|
+
readonly props: Readonly<Props & Omit<P, "dialogRef">>;
|
|
36
34
|
state: Readonly<{}>;
|
|
37
35
|
refs: {
|
|
38
36
|
[key: string]: import("react").ReactInstance;
|
|
39
37
|
};
|
|
40
38
|
shouldComponentUpdate?(nextProps: Readonly<Props & Omit<P, "dialogRef">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
41
39
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
42
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any;
|
|
40
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any | null;
|
|
43
41
|
componentDidUpdate?(prevProps: Readonly<Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
44
42
|
componentWillMount?(): void;
|
|
45
43
|
UNSAFE_componentWillMount?(): void;
|
|
@@ -53,20 +51,18 @@ declare const withScrim: <P extends object>(WrappedComponent: ComponentType<P> |
|
|
|
53
51
|
componentDidMount(): void;
|
|
54
52
|
componentWillUnmount(): void;
|
|
55
53
|
dialogRef: (ref: HTMLElement | null | undefined) => void;
|
|
56
|
-
render(): JSX.Element;
|
|
57
|
-
context:
|
|
58
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props & Omit<P, "dialogRef">>) =>
|
|
54
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
context: unknown;
|
|
56
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props & Omit<P, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
59
57
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
60
|
-
readonly props: Readonly<Props & Omit<P, "dialogRef"
|
|
61
|
-
children?: import("react").ReactNode;
|
|
62
|
-
}>;
|
|
58
|
+
readonly props: Readonly<Props & Omit<P, "dialogRef">>;
|
|
63
59
|
state: Readonly<{}>;
|
|
64
60
|
refs: {
|
|
65
61
|
[key: string]: import("react").ReactInstance;
|
|
66
62
|
};
|
|
67
63
|
shouldComponentUpdate?(nextProps: Readonly<Props & Omit<P, "dialogRef">>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
68
64
|
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
69
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any;
|
|
65
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>): any | null;
|
|
70
66
|
componentDidUpdate?(prevProps: Readonly<Props & Omit<P, "dialogRef">>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
71
67
|
componentWillMount?(): void;
|
|
72
68
|
UNSAFE_componentWillMount?(): void;
|
|
@@ -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) => JSX.Element;
|
|
6
|
+
declare const withScrimmedPortal: (WrappedComponent: ComponentType<ScrimProps>) => ({ renderTarget, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default withScrimmedPortal;
|