@skyscanner/backpack-web 34.15.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.
Files changed (64) hide show
  1. package/bpk-component-banner-alert/src/BpkBannerAlert.d.ts +0 -1
  2. package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.d.ts +0 -1
  3. package/bpk-component-banner-alert/src/withBannerAlertState.d.ts +34 -40
  4. package/bpk-component-boilerplate/src/BpkBoilerplate.d.ts +0 -1
  5. package/bpk-component-button/BpkButtonDestructive.d.ts +0 -1
  6. package/bpk-component-button/BpkButtonFeatured.d.ts +0 -1
  7. package/bpk-component-button/BpkButtonLink.d.ts +0 -1
  8. package/bpk-component-button/BpkButtonLinkOnDark.d.ts +0 -1
  9. package/bpk-component-button/BpkButtonPrimary.d.ts +0 -1
  10. package/bpk-component-button/BpkButtonPrimaryOnDark.d.ts +0 -1
  11. package/bpk-component-button/BpkButtonPrimaryOnLight.d.ts +0 -1
  12. package/bpk-component-button/BpkButtonSecondary.d.ts +0 -1
  13. package/bpk-component-button/BpkButtonSecondaryOnDark.d.ts +0 -1
  14. package/bpk-component-button/src/BpkButton.d.ts +0 -1
  15. package/bpk-component-button/src/BpkButtonBase.d.ts +1 -12
  16. package/bpk-component-button/src/BpkButtonV2/BpkButton.d.ts +0 -1
  17. package/bpk-component-calendar/src/BpkCalendarContainer.d.ts +6 -6
  18. package/bpk-component-calendar/src/BpkCalendarGrid.d.ts +3 -3
  19. package/bpk-component-card/src/CardContext.d.ts +0 -1
  20. package/bpk-component-carousel/src/BpkCarousel.d.ts +0 -1
  21. package/bpk-component-chip/src/BpkDismissibleChip.d.ts +0 -1
  22. package/bpk-component-chip/src/BpkDropdownChip.d.ts +0 -1
  23. package/bpk-component-chip-group/src/BpkSingleSelectChipGroup.d.ts +0 -1
  24. package/bpk-component-datatable/src/BpkDataTable.d.ts +0 -1
  25. package/bpk-component-datatable/src/BpkDataTableHeader.d.ts +0 -1
  26. package/bpk-component-datepicker/src/BpkDatepicker.d.ts +5 -5
  27. package/bpk-component-dialog/src/BpkDialog.d.ts +0 -1
  28. package/bpk-component-dialog/src/BpkDialogInner.d.ts +6 -7
  29. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.d.ts +0 -1
  30. package/bpk-component-icon/src/classNameModifierHOCFactory.d.ts +1 -1
  31. package/bpk-component-icon/src/withRtlSupport.d.ts +2 -3
  32. package/bpk-component-image/src/withLazyLoading.d.ts +6 -7
  33. package/bpk-component-image/src/withLoadingBehavior.d.ts +3 -3
  34. package/bpk-component-info-banner/src/BpkInfoBanner.d.ts +0 -1
  35. package/bpk-component-info-banner/src/BpkInfoBannerDismissable.d.ts +0 -1
  36. package/bpk-component-info-banner/src/withBannerAlertState.d.ts +34 -41
  37. package/bpk-component-input/src/withOpenEvents.d.ts +3 -3
  38. package/bpk-component-inset-banner/src/BpkInsetBanner.d.ts +0 -1
  39. package/bpk-component-journey-arrow/src/BpkJourneyArrow.d.ts +0 -1
  40. package/bpk-component-nudger/src/BpkConfigurableNudger.d.ts +0 -1
  41. package/bpk-component-nudger/src/BpkNudger.d.ts +0 -1
  42. package/bpk-component-rtl-toggle/src/updateOnDirectionChange.d.ts +6 -6
  43. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.d.ts +5 -6
  44. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.d.ts +0 -1
  45. package/bpk-component-skeleton/src/BpkBaseSkeleton.d.d.ts +0 -1
  46. package/bpk-component-skeleton/src/BpkBaseSkeleton.d.ts +0 -1
  47. package/bpk-component-skeleton/src/BpkSkeleton.d.d.ts +0 -1
  48. package/bpk-component-skeleton/src/BpkSkeleton.d.ts +0 -1
  49. package/bpk-component-slider/src/BpkSlider.d.ts +0 -1
  50. package/bpk-component-snippet/index.d.ts +3 -0
  51. package/bpk-component-snippet/index.js +21 -0
  52. package/bpk-component-snippet/src/BpkSnippet.d.ts +48 -0
  53. package/bpk-component-snippet/src/BpkSnippet.js +131 -0
  54. package/bpk-component-snippet/src/BpkSnippet.module.css +18 -0
  55. package/bpk-component-spinner/src/BpkExtraLargeSpinner.d.ts +0 -1
  56. package/bpk-component-spinner/src/BpkLargeSpinner.d.ts +0 -1
  57. package/bpk-component-spinner/src/BpkSpinner.d.ts +0 -1
  58. package/bpk-component-split-input/src/BpkInputField.js +4 -1
  59. package/bpk-component-split-input/src/BpkSplitInput.js +1 -1
  60. package/bpk-component-swap-button/src/BpkSwapButton.d.ts +0 -1
  61. package/bpk-react-utils/index.d.ts +6 -7
  62. package/bpk-scrim-utils/index.d.ts +7 -8
  63. package/bpk-scrim-utils/src/withScrim.d.ts +6 -6
  64. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonProps } from './common-types';
3
2
  /**
4
3
  * @deprecated use bpk-component-info-banner instead
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonProps, OnDismissHandler } from './common-types';
3
2
  export type Props = CommonProps & {
4
3
  dismissButtonLabel: string;
@@ -1,20 +1,14 @@
1
- /// <reference types="node" />
2
1
  import type { ComponentType } from 'react';
2
+ import type { Props as BpkBannerAlertDismissableProps } from './BpkBannerAlertDismissable';
3
+ import type { Props as BpkBannerAlertExpandableProps } from './BpkBannerAlertExpandable';
3
4
  export type WithBannerAlertStateProps = {
4
5
  onHide?: () => void;
5
6
  hideAfter?: number;
6
7
  };
7
- declare const withBannerAlertState: <P extends Partial<import("./common-types").CommonProps & {
8
- dismissButtonLabel: string;
9
- onDismiss?: import("./common-types").OnDismissHandler;
10
- } & {
11
- children: import("react").ReactNode;
12
- expanded?: boolean | undefined;
13
- toggleButtonLabel: string;
14
- onExpandToggle?: import("./common-types").OnExpandToggleHandler;
15
- }>>(WrappedComponent: ComponentType<P>) => {
8
+ type BpkBannerAlertProps = Partial<BpkBannerAlertDismissableProps & BpkBannerAlertExpandableProps>;
9
+ declare const withBannerAlertState: <P extends BpkBannerAlertProps>(WrappedComponent: ComponentType<P>) => {
16
10
  new (props: P & WithBannerAlertStateProps): {
17
- hideIntervalId?: NodeJS.Timeout | null | undefined;
11
+ hideIntervalId?: ReturnType<typeof setTimeout> | null;
18
12
  componentDidMount(): void;
19
13
  componentWillUnmount(): void;
20
14
  onExpandToggle: () => void;
@@ -23,59 +17,59 @@ declare const withBannerAlertState: <P extends Partial<import("./common-types").
23
17
  render(): JSX.Element;
24
18
  context: any;
25
19
  setState<K extends keyof {
26
- expanded?: boolean | undefined;
27
- show?: boolean | undefined;
20
+ expanded?: boolean;
21
+ show?: boolean;
28
22
  }>(state: {
29
- expanded?: boolean | undefined;
30
- show?: boolean | undefined;
23
+ expanded?: boolean;
24
+ show?: boolean;
31
25
  } | ((prevState: Readonly<{
32
- expanded?: boolean | undefined;
33
- show?: boolean | undefined;
34
- }>, props: Readonly<P & WithBannerAlertStateProps>) => {
35
- expanded?: boolean | undefined;
36
- show?: boolean | undefined;
37
- } | Pick<{
38
- expanded?: boolean | undefined;
39
- show?: boolean | undefined;
40
- }, K> | null) | Pick<{
41
- expanded?: boolean | undefined;
42
- show?: boolean | undefined;
26
+ expanded?: boolean;
27
+ show?: boolean;
28
+ }>, props: Readonly<P & WithBannerAlertStateProps>) => Pick<{
29
+ expanded?: boolean;
30
+ show?: boolean;
31
+ }, K> | {
32
+ expanded?: boolean;
33
+ show?: boolean;
34
+ } | null) | Pick<{
35
+ expanded?: boolean;
36
+ show?: boolean;
43
37
  }, K> | null, callback?: (() => void) | undefined): void;
44
38
  forceUpdate(callback?: (() => void) | undefined): void;
45
39
  readonly props: Readonly<P & WithBannerAlertStateProps> & Readonly<{
46
- children?: import("react").ReactNode;
40
+ children?: import("react").ReactNode | undefined;
47
41
  }>;
48
42
  state: Readonly<{
49
- expanded?: boolean | undefined;
50
- show?: boolean | undefined;
43
+ expanded?: boolean;
44
+ show?: boolean;
51
45
  }>;
52
46
  refs: {
53
47
  [key: string]: import("react").ReactInstance;
54
48
  };
55
49
  shouldComponentUpdate?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextState: Readonly<{
56
- expanded?: boolean | undefined;
57
- show?: boolean | undefined;
50
+ expanded?: boolean;
51
+ show?: boolean;
58
52
  }>, nextContext: any): boolean;
59
53
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
60
54
  getSnapshotBeforeUpdate?(prevProps: Readonly<P & WithBannerAlertStateProps>, prevState: Readonly<{
61
- expanded?: boolean | undefined;
62
- show?: boolean | undefined;
63
- }>): any;
55
+ expanded?: boolean;
56
+ show?: boolean;
57
+ }>): any | null;
64
58
  componentDidUpdate?(prevProps: Readonly<P & WithBannerAlertStateProps>, prevState: Readonly<{
65
- expanded?: boolean | undefined;
66
- show?: boolean | undefined;
59
+ expanded?: boolean;
60
+ show?: boolean;
67
61
  }>, snapshot?: any): void;
68
62
  componentWillMount?(): void;
69
63
  UNSAFE_componentWillMount?(): void;
70
64
  componentWillReceiveProps?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextContext: any): void;
71
65
  UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextContext: any): void;
72
66
  componentWillUpdate?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextState: Readonly<{
73
- expanded?: boolean | undefined;
74
- show?: boolean | undefined;
67
+ expanded?: boolean;
68
+ show?: boolean;
75
69
  }>, nextContext: any): void;
76
70
  UNSAFE_componentWillUpdate?(nextProps: Readonly<P & WithBannerAlertStateProps>, nextState: Readonly<{
77
- expanded?: boolean | undefined;
78
- show?: boolean | undefined;
71
+ expanded?: boolean;
72
+ show?: boolean;
79
73
  }>, nextContext: any): void;
80
74
  };
81
75
  displayName: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type Props = {
3
2
  [rest: string]: any;
4
3
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonDestructive: (props: Props) => JSX.Element;
4
3
  export default BpkButtonDestructive;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonFeatured: (props: Props) => JSX.Element;
4
3
  export default BpkButtonFeatured;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonLink: (props: Props) => JSX.Element;
4
3
  export default BpkButtonLink;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonLinkOnDark: (props: Props) => JSX.Element;
4
3
  export default BpkButtonLinkOnDark;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonPrimary: (props: Props) => JSX.Element;
4
3
  export default BpkButtonPrimary;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonPrimaryOnDark: (props: Props) => JSX.Element;
4
3
  export default BpkButtonPrimaryOnDark;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonPrimaryOnLight: (props: Props) => JSX.Element;
4
3
  export default BpkButtonPrimaryOnLight;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonSecondary: (props: Props) => JSX.Element;
4
3
  export default BpkButtonSecondary;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './src/BpkButton';
3
2
  declare const BpkButtonSecondaryOnDark: (props: Props) => JSX.Element;
4
3
  export default BpkButtonSecondaryOnDark;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import PropTypes from 'prop-types';
3
2
  import { type Props as CommonProps } from './common-types';
4
3
  export type Props = CommonProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type Props } from './common-types';
3
2
  export declare const BUTTON_TYPES: {
4
3
  readonly primary: "primary";
@@ -14,17 +13,7 @@ export declare const BUTTON_TYPES: {
14
13
  type ValueOf<T> = T[keyof T];
15
14
  declare const BpkButtonBase: {
16
15
  (props: Props & {
17
- type?: ValueOf<{
18
- readonly primary: "primary";
19
- readonly primaryOnDark: "primary-on-dark";
20
- readonly primaryOnLight: "primary-on-light";
21
- readonly secondary: "secondary";
22
- readonly secondaryOnDark: "secondary-on-dark";
23
- readonly destructive: "destructive";
24
- readonly featured: "featured";
25
- readonly link: "link";
26
- readonly linkOnDark: "link-on-dark";
27
- }> | undefined;
16
+ type?: ValueOf<typeof BUTTON_TYPES>;
28
17
  }): JSX.Element;
29
18
  propTypes: {
30
19
  children: import("prop-types").Validator<NonNullable<import("prop-types").ReactNodeLike>>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { Props } from './common-types';
3
2
  export declare const BpkButtonV2: ({ blank, children, className, disabled, fullWidth, href, iconOnly, onClick, rel: propRel, size, submit, type, ...rest }: Props) => JSX.Element;
@@ -57,10 +57,10 @@ declare const withCalendarState: <P extends object>(Calendar: ComponentType<P>)
57
57
  handleDateKeyDown: (event: KeyboardEvent) => void;
58
58
  render(): JSX.Element;
59
59
  context: any;
60
- setState<K extends keyof State>(state: State | ((prevState: Readonly<State>, props: Readonly<CalendarProps<P>>) => State | Pick<State, K> | null) | Pick<State, K> | null, callback?: (() => void) | undefined): void;
60
+ setState<K extends keyof State>(state: State | ((prevState: Readonly<State>, props: Readonly<CalendarProps<P>>) => Pick<State, K> | State | null) | Pick<State, K> | null, callback?: (() => void) | undefined): void;
61
61
  forceUpdate(callback?: (() => void) | undefined): void;
62
62
  readonly props: Readonly<CalendarProps<P>> & Readonly<{
63
- children?: import("react").ReactNode;
63
+ children?: import("react").ReactNode | undefined;
64
64
  }>;
65
65
  state: Readonly<State>;
66
66
  refs: {
@@ -70,7 +70,7 @@ declare const withCalendarState: <P extends object>(Calendar: ComponentType<P>)
70
70
  shouldComponentUpdate?(nextProps: Readonly<CalendarProps<P>>, nextState: Readonly<State>, nextContext: any): boolean;
71
71
  componentWillUnmount?(): void;
72
72
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
73
- getSnapshotBeforeUpdate?(prevProps: Readonly<CalendarProps<P>>, prevState: Readonly<State>): any;
73
+ getSnapshotBeforeUpdate?(prevProps: Readonly<CalendarProps<P>>, prevState: Readonly<State>): any | null;
74
74
  componentDidUpdate?(prevProps: Readonly<CalendarProps<P>>, prevState: Readonly<State>, snapshot?: any): void;
75
75
  componentWillMount?(): void;
76
76
  UNSAFE_componentWillMount?(): void;
@@ -109,10 +109,10 @@ declare const _default: {
109
109
  handleDateKeyDown: (event: KeyboardEvent) => void;
110
110
  render(): JSX.Element;
111
111
  context: any;
112
- setState<K extends keyof State>(state: State | ((prevState: Readonly<State>, props: Readonly<CalendarProps<import("./composeCalendar").Props>>) => State | Pick<State, K> | null) | Pick<State, K> | null, callback?: (() => void) | undefined): void;
112
+ setState<K extends keyof State>(state: State | ((prevState: Readonly<State>, props: Readonly<CalendarProps<import("./composeCalendar").Props>>) => Pick<State, K> | State | null) | Pick<State, K> | null, callback?: (() => void) | undefined): void;
113
113
  forceUpdate(callback?: (() => void) | undefined): void;
114
114
  readonly props: Readonly<CalendarProps<import("./composeCalendar").Props>> & Readonly<{
115
- children?: import("react").ReactNode;
115
+ children?: import("react").ReactNode | undefined;
116
116
  }>;
117
117
  state: Readonly<State>;
118
118
  refs: {
@@ -122,7 +122,7 @@ declare const _default: {
122
122
  shouldComponentUpdate?(nextProps: Readonly<CalendarProps<import("./composeCalendar").Props>>, nextState: Readonly<State>, nextContext: any): boolean;
123
123
  componentWillUnmount?(): void;
124
124
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
125
- getSnapshotBeforeUpdate?(prevProps: Readonly<CalendarProps<import("./composeCalendar").Props>>, prevState: Readonly<State>): any;
125
+ getSnapshotBeforeUpdate?(prevProps: Readonly<CalendarProps<import("./composeCalendar").Props>>, prevState: Readonly<State>): any | null;
126
126
  componentDidUpdate?(prevProps: Readonly<CalendarProps<import("./composeCalendar").Props>>, prevState: Readonly<State>, snapshot?: any): void;
127
127
  componentWillMount?(): void;
128
128
  UNSAFE_componentWillMount?(): void;
@@ -57,9 +57,9 @@ declare const BpkCalendarGridWithTransition: typeof BpkCalendarGrid | ((props: O
57
57
  TransitionComponent: ElementType;
58
58
  } & {
59
59
  [rest: string]: any;
60
- className?: string | null | undefined;
61
- month?: Date | undefined;
62
- focusedDate?: Date | null | undefined;
60
+ className?: string | null;
61
+ month?: Date;
62
+ focusedDate?: Date | null;
63
63
  }, "TransitionComponent">) => JSX.Element);
64
64
  export default BpkCalendarGrid;
65
65
  export { BpkCalendarGridWithTransition };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface BpkCardContext {
3
2
  /**
4
3
  * Indicates if the BpkCard should render elevated from the page or not. Parent card types can specify `false` when they handle elevation internally, rather than BpkCard.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Props } from './types';
3
2
  declare const BpkCarousel: ({ bottom, images, initialImageIndex, onImageChanged, }: Props) => JSX.Element;
4
3
  export default BpkCarousel;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonProps as Props } from './commonTypes';
3
2
  type BpkDismissibleChipProps = Omit<Props, 'disabled' | 'selected'>;
4
3
  declare const BpkDismissibleChip: ({ className, leadingAccessoryView, type, ...rest }: BpkDismissibleChipProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonProps as Props } from './commonTypes';
3
2
  declare const BpkDropdownChip: ({ disabled, leadingAccessoryView, selected, type, ...rest }: Props) => JSX.Element;
4
3
  export default BpkDropdownChip;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type SingleSelectChipItem, type MultiSelectProps } from './BpkMultiSelectChipGroup';
3
2
  export type SingleSelectProps = {
4
3
  chips: SingleSelectChipItem[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type BpkDataTableProps } from './common-types';
3
2
  declare const BpkDataTable: (props: BpkDataTableProps) => JSX.Element;
4
3
  export default BpkDataTable;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Internal component to render the header of a column.
4
3
  * @returns {JSX.Element} data table header component
@@ -99,13 +99,13 @@ declare class BpkDatepicker extends Component<Props, State> {
99
99
  maxDate: Date;
100
100
  }> & {
101
101
  [rest: string]: any;
102
- }>) => {
102
+ }>) => Pick<{
103
103
  preventKeyboardFocus: boolean;
104
104
  focusedDate: Date;
105
- } | Pick<{
105
+ }, K> | {
106
106
  preventKeyboardFocus: boolean;
107
107
  focusedDate: Date;
108
- }, K> | null) | Pick<{
108
+ } | null) | Pick<{
109
109
  preventKeyboardFocus: boolean;
110
110
  focusedDate: Date;
111
111
  }, K> | null, callback?: (() => void) | undefined): void;
@@ -119,7 +119,7 @@ declare class BpkDatepicker extends Component<Props, State> {
119
119
  }> & {
120
120
  [rest: string]: any;
121
121
  }> & Readonly<{
122
- children?: import("react").ReactNode;
122
+ children?: import("react").ReactNode | undefined;
123
123
  }>;
124
124
  state: Readonly<{
125
125
  preventKeyboardFocus: boolean;
@@ -154,7 +154,7 @@ declare class BpkDatepicker extends Component<Props, State> {
154
154
  }>, prevState: Readonly<{
155
155
  preventKeyboardFocus: boolean;
156
156
  focusedDate: Date;
157
- }>): any;
157
+ }>): any | null;
158
158
  componentDidUpdate?(prevProps: Readonly<Omit<import("../../bpk-component-calendar/src/composeCalendar").Props & import("../../bpk-component-calendar/src/BpkCalendarContainer").Props, keyof {
159
159
  onDateClick: ((date: Date) => void) | null;
160
160
  onDateKeyDown: ((event: KeyboardEvent) => void) | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Props } from './common-types';
3
2
  declare const BpkDialog: ({ children, closeLabel, dismissible, headerIcon, headerIconType, isOpen, onClose, renderTarget, ...rest }: Props) => JSX.Element;
4
3
  export default BpkDialog;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type DialogInnerProps as Props } from './common-types';
3
2
  declare const _default: {
4
3
  new (props: (import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">) | Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>): {
@@ -8,10 +7,10 @@ declare const _default: {
8
7
  dialogRef: (ref: HTMLElement | null | undefined) => void;
9
8
  render(): JSX.Element;
10
9
  context: any;
11
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
10
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
12
11
  forceUpdate(callback?: (() => void) | undefined): void;
13
12
  readonly props: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">> & Readonly<{
14
- children?: import("react").ReactNode;
13
+ children?: import("react").ReactNode | undefined;
15
14
  }>;
16
15
  state: Readonly<{}>;
17
16
  refs: {
@@ -19,7 +18,7 @@ declare const _default: {
19
18
  };
20
19
  shouldComponentUpdate?(nextProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, nextState: Readonly<{}>, nextContext: any): boolean;
21
20
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
22
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, prevState: Readonly<{}>): any;
21
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, prevState: Readonly<{}>): any | null;
23
22
  componentDidUpdate?(prevProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, prevState: Readonly<{}>, snapshot?: any): void;
24
23
  componentWillMount?(): void;
25
24
  UNSAFE_componentWillMount?(): void;
@@ -35,10 +34,10 @@ declare const _default: {
35
34
  dialogRef: (ref: HTMLElement | null | undefined) => void;
36
35
  render(): JSX.Element;
37
36
  context: any;
38
- setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
37
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>) => Pick<{}, K> | {} | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
39
38
  forceUpdate(callback?: (() => void) | undefined): void;
40
39
  readonly props: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">> & Readonly<{
41
- children?: import("react").ReactNode;
40
+ children?: import("react").ReactNode | undefined;
42
41
  }>;
43
42
  state: Readonly<{}>;
44
43
  refs: {
@@ -46,7 +45,7 @@ declare const _default: {
46
45
  };
47
46
  shouldComponentUpdate?(nextProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, nextState: Readonly<{}>, nextContext: any): boolean;
48
47
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
49
- getSnapshotBeforeUpdate?(prevProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, prevState: Readonly<{}>): any;
48
+ getSnapshotBeforeUpdate?(prevProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, prevState: Readonly<{}>): any | null;
50
49
  componentDidUpdate?(prevProps: Readonly<import("../../bpk-scrim-utils/src/withScrim").Props & Omit<Props, "dialogRef">>, prevState: Readonly<{}>, snapshot?: any): void;
51
50
  componentWillMount?(): void;
52
51
  UNSAFE_componentWillMount?(): void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const TEXT_ALIGN: {
3
2
  readonly start: "start";
4
3
  readonly center: "center";
@@ -1,8 +1,8 @@
1
1
  import type { ComponentType } from 'react';
2
2
  declare const _default: (displayName: string, classNamesToAdd?: string[]) => (ComposedComponent: ComponentType<any> | string) => {
3
3
  (props: {
4
+ className?: string | null;
4
5
  [rest: string]: any;
5
- className?: string | null | undefined;
6
6
  }): JSX.Element;
7
7
  displayName: string;
8
8
  };
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
- declare const _default: (ComposedComponent: string | import("react").ComponentType<any>) => {
1
+ declare const _default: (ComposedComponent: import("react").ComponentType<any> | string) => {
3
2
  (props: {
3
+ className?: string | null;
4
4
  [rest: string]: any;
5
- className?: string | null | undefined;
6
5
  }): JSX.Element;
7
6
  displayName: string;
8
7
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="lodash" />
2
1
  import type { ComponentType } from 'react';
3
2
  type WithLazyLoadingProps = {
4
3
  className?: string;
@@ -9,9 +8,9 @@ type WithLazyLoadingState = {
9
8
  inView: boolean;
10
9
  };
11
10
  export default function withLazyLoading<P extends object>(WrappedComponent: ComponentType<P>, documentRef?: Document | null): {
12
- new (props: Omit<P, 'inView'> & WithLazyLoadingProps): {
13
- element?: HTMLElement | null | undefined;
14
- placeholderReference?: string | undefined;
11
+ new (props: Omit<P, "inView"> & WithLazyLoadingProps): {
12
+ element?: HTMLElement | null;
13
+ placeholderReference?: string;
15
14
  componentDidMount(): void;
16
15
  componentWillUnmount(): void;
17
16
  setInView: () => void;
@@ -25,10 +24,10 @@ export default function withLazyLoading<P extends object>(WrappedComponent: Comp
25
24
  isInViewPort: () => boolean;
26
25
  render(): JSX.Element;
27
26
  context: any;
28
- setState<K extends "inView">(state: WithLazyLoadingState | ((prevState: Readonly<WithLazyLoadingState>, props: Readonly<Omit<P, "inView"> & WithLazyLoadingProps>) => WithLazyLoadingState | Pick<WithLazyLoadingState, K> | null) | Pick<WithLazyLoadingState, K> | null, callback?: (() => void) | undefined): void;
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;
29
28
  forceUpdate(callback?: (() => void) | undefined): void;
30
29
  readonly props: Readonly<Omit<P, "inView"> & WithLazyLoadingProps> & Readonly<{
31
- children?: import("react").ReactNode;
30
+ children?: import("react").ReactNode | undefined;
32
31
  }>;
33
32
  state: Readonly<WithLazyLoadingState>;
34
33
  refs: {
@@ -36,7 +35,7 @@ export default function withLazyLoading<P extends object>(WrappedComponent: Comp
36
35
  };
37
36
  shouldComponentUpdate?(nextProps: Readonly<Omit<P, "inView"> & WithLazyLoadingProps>, nextState: Readonly<WithLazyLoadingState>, nextContext: any): boolean;
38
37
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
39
- getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<P, "inView"> & WithLazyLoadingProps>, prevState: Readonly<WithLazyLoadingState>): any;
38
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<P, "inView"> & WithLazyLoadingProps>, prevState: Readonly<WithLazyLoadingState>): any | null;
40
39
  componentDidUpdate?(prevProps: Readonly<Omit<P, "inView"> & WithLazyLoadingProps>, prevState: Readonly<WithLazyLoadingState>, snapshot?: any): void;
41
40
  componentWillMount?(): void;
42
41
  UNSAFE_componentWillMount?(): void;
@@ -11,10 +11,10 @@ export default function withLoadingBehavior<P extends object>(WrappedComponent:
11
11
  onLoad: () => void;
12
12
  render(): JSX.Element;
13
13
  context: any;
14
- setState<K extends "loading">(state: State | ((prevState: Readonly<State>, props: Readonly<Omit<P, keyof InjectedProps>>) => State | Pick<State, K> | null) | Pick<State, K> | null, callback?: (() => void) | undefined): void;
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
16
  readonly props: Readonly<Omit<P, keyof InjectedProps>> & Readonly<{
17
- children?: import("react").ReactNode;
17
+ children?: import("react").ReactNode | undefined;
18
18
  }>;
19
19
  state: Readonly<State>;
20
20
  refs: {
@@ -24,7 +24,7 @@ export default function withLoadingBehavior<P extends object>(WrappedComponent:
24
24
  shouldComponentUpdate?(nextProps: Readonly<Omit<P, keyof InjectedProps>>, nextState: Readonly<State>, nextContext: any): boolean;
25
25
  componentWillUnmount?(): void;
26
26
  componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
27
- getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<P, keyof InjectedProps>>, prevState: Readonly<State>): any;
27
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<P, keyof InjectedProps>>, prevState: Readonly<State>): any | null;
28
28
  componentDidUpdate?(prevProps: Readonly<Omit<P, keyof InjectedProps>>, prevState: Readonly<State>, snapshot?: any): void;
29
29
  componentWillMount?(): void;
30
30
  UNSAFE_componentWillMount?(): void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonProps } from './common-types';
3
2
  declare const BpkInfoBanner: ({ animateOnEnter, animateOnLeave, icon, show, ...rest }: CommonProps) => JSX.Element;
4
3
  export default BpkInfoBanner;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonProps, OnDismissHandler } from './common-types';
3
2
  export type Props = CommonProps & {
4
3
  dismissButtonLabel: string;