@skyscanner/backpack-web 33.0.0-beta.1 → 33.0.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 (74) hide show
  1. package/bpk-component-accordion/src/BpkAccordionItem.js +1 -1
  2. package/bpk-component-badge/index.d.ts +1 -2
  3. package/bpk-component-banner-alert/src/AnimateAndFade.js +2 -3
  4. package/bpk-component-barchart/src/BpkBarchart.js +1 -1
  5. package/bpk-component-barchart/src/BpkBarchartBars.js +2 -2
  6. package/bpk-component-bottom-sheet/src/BpkBottomSheet.d.ts +6 -11
  7. package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +65 -27
  8. package/bpk-component-bottom-sheet/src/BpkBottomSheet.module.css +1 -1
  9. package/bpk-component-breakpoint/src/BpkBreakpoint.js +0 -1
  10. package/bpk-component-button/src/BpkButtonDestructive.module.css +1 -1
  11. package/bpk-component-button/src/BpkButtonLink.module.css +1 -1
  12. package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +1 -1
  13. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +1 -1
  14. package/bpk-component-button/src/BpkButtonV2/BpkButton.d.ts +1 -1
  15. package/bpk-component-button/src/BpkButtonV2/BpkButton.js +2 -1
  16. package/bpk-component-button/src/BpkButtonV2/BpkButton.module.css +1 -1
  17. package/bpk-component-button/src/BpkButtonV2/common-types.d.ts +1 -0
  18. package/bpk-component-calendar/src/BpkCalendarGrid.js +1 -2
  19. package/bpk-component-calendar/src/Week.js +1 -1
  20. package/bpk-component-calendar/src/composeCalendar.d.ts +4 -1
  21. package/bpk-component-calendar/src/date-utils.d.ts +19 -19
  22. package/bpk-component-calendar/src/date-utils.js +21 -21
  23. package/bpk-component-calendar/test-utils.js +1 -1
  24. package/bpk-component-chip/src/BpkSelectableChip.js +1 -1
  25. package/{bpk-component-bottom-sheet/src/BpkBottomSheetInner.d.ts → bpk-component-datatable/index.d.ts} +3 -11
  26. package/bpk-component-datatable/src/BpkDataTable.d.ts +22 -0
  27. package/bpk-component-datatable/src/BpkDataTable.js +1 -2
  28. package/bpk-component-datatable/src/BpkDataTableHeader.d.ts +27 -0
  29. package/bpk-component-datatable/src/BpkDataTableHeader.js +1 -1
  30. package/bpk-component-datatable/src/common-types.d.ts +111 -0
  31. package/bpk-component-datatable/src/utils.d.ts +30 -0
  32. package/bpk-component-flare/src/BpkFlareBar.js +1 -1
  33. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +0 -1
  34. package/bpk-component-icon/src/withRtlSupport.js +1 -1
  35. package/bpk-component-image/src/BpkBackgroundImage.js +0 -1
  36. package/bpk-component-image/src/BpkImage.js +1 -3
  37. package/bpk-component-info-banner/src/AnimateAndFade.js +2 -3
  38. package/bpk-component-input/src/BpkInput.js +1 -1
  39. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +1 -1
  40. package/bpk-component-modal/src/BpkModal.js +1 -1
  41. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +1 -1
  42. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +1 -1
  43. package/bpk-component-popover/src/BpkPopover.js +1 -1
  44. package/bpk-component-popover/src/BpkPopoverPortal.js +3 -3
  45. package/bpk-component-price/src/BpkPrice.js +1 -1
  46. package/bpk-component-rating/src/BpkRating.js +1 -1
  47. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +1 -1
  48. package/bpk-component-scrollable-calendar/test-utils.js +1 -1
  49. package/bpk-component-section-header/src/BpkSectionHeader.js +1 -0
  50. package/bpk-component-section-header/src/BpkSectionHeader.module.css +1 -1
  51. package/bpk-component-slider/src/BpkSlider.js +1 -2
  52. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +1 -1
  53. package/bpk-component-spinner/src/BpkLargeSpinner.js +1 -1
  54. package/bpk-component-spinner/src/BpkSpinner.js +1 -1
  55. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +1 -1
  56. package/bpk-component-tooltip/src/BpkTooltip.js +1 -1
  57. package/bpk-component-tooltip/src/BpkTooltipPortal.js +2 -2
  58. package/bpk-mixins/_buttons.scss +15 -0
  59. package/bpk-react-utils/index.d.ts +36 -1
  60. package/bpk-react-utils/index.js +4 -2
  61. package/bpk-react-utils/src/BpkDialogWrapper/BpkDialogWrapper.js +144 -0
  62. package/bpk-react-utils/src/BpkDialogWrapper.d.ts +45 -0
  63. package/bpk-react-utils/src/BpkDialogWrapper.module.css +18 -0
  64. package/bpk-react-utils/src/Portal.js +0 -1
  65. package/bpk-scrim-utils/src/withScrim.js +1 -2
  66. package/bpk-stylesheets/base.css +1 -1
  67. package/bpk-stylesheets/index.js +2 -2
  68. package/bpk-stylesheets/index.scss +20 -22
  69. package/package.json +3 -3
  70. package/unstable__bpk-mixins/_buttons.scss +15 -0
  71. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.js +0 -96
  72. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.module.css +0 -18
  73. package/bpk-component-flare/src/corner-radius.d.ts +0 -6
  74. package/bpk-component-flare/src/pointer.d.ts +0 -6
@@ -0,0 +1,27 @@
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
+ /// <reference types="react" />
20
+ /**
21
+ * Internal component to render the header of a column.
22
+ * @returns {JSX.Element} data table header component
23
+ */
24
+ declare const BpkDataTableHeader: ({ column }: {
25
+ column: any;
26
+ }) => JSX.Element;
27
+ export default BpkDataTableHeader;
@@ -22,8 +22,8 @@ import BpkSmallArrowDownIcon from "../../bpk-component-icon/sm/arrow-down";
22
22
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
23
23
  import BpkSmallArrowUpIcon from "../../bpk-component-icon/sm/arrow-up";
24
24
  import { withRtlSupport } from "../../bpk-component-icon";
25
- import { SORT_DIRECTION_TYPES } from "./common-types";
26
25
  import STYLES from "./BpkDataTableHeader.module.css";
26
+ import { SORT_DIRECTION_TYPES } from "./common-types";
27
27
  import { jsx as _jsx } from "react/jsx-runtime";
28
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
29
29
  const DownIcon = withRtlSupport(BpkSmallArrowDownIcon);
@@ -0,0 +1,111 @@
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
+ /// <reference types="react" />
20
+ export declare const SORT_DIRECTION_TYPES: {
21
+ readonly ASC: "ASC";
22
+ readonly DESC: "DESC";
23
+ };
24
+ export type BpkDataTableProps = {
25
+ rows: {
26
+ [key: string]: any;
27
+ };
28
+ columns: ColumnType[];
29
+ /**
30
+ * Table height. Please provide this value in rem.
31
+ */
32
+ height: number | string;
33
+ /**
34
+ * Table width. Please provide this value in rem.
35
+ * If not provided, the table will expand to fill the available space.
36
+ */
37
+ width?: number | string;
38
+ /**
39
+ * Height of the header row. Please provide this value in rem.
40
+ */
41
+ headerHeight?: number | string;
42
+ headerClassName?: string | null;
43
+ /**
44
+ * Height of a row (except for the header row). Please provide this value in rem.
45
+ */
46
+ rowHeight?: number | string;
47
+ rowStyle?: {};
48
+ rowClassName?: string | ((arg0: any) => string);
49
+ className?: string | null;
50
+ /**
51
+ * The data will be sorted by default based on this column.
52
+ */
53
+ defaultColumnSortIndex?: number;
54
+ /**
55
+ * For custom sorting, pass a sort function - must be memoized. It should return 1 if rowA is larger, and -1 if rowB is larger.
56
+ * You can also pass a string: basic, datetime, alphanumeric. By default, alphanumeric sorting will be applied.
57
+ */
58
+ sort?: string | ((rowA: {}, rowB: {}, columnId: string, desc: boolean) => number);
59
+ /**
60
+ * Use sortBy to specify which column the custom sorting will be applied to. To specify the column, use the accessor of the column.
61
+ */
62
+ sortBy?: string;
63
+ /**
64
+ * Use sortDirection to set the direction of sorting. By default, it will be ascending.
65
+ */
66
+ sortDirection?: (typeof SORT_DIRECTION_TYPES)[keyof typeof SORT_DIRECTION_TYPES];
67
+ /**
68
+ * Callback function that will be called when a row is clicked. The entire row object (originally passed in the data prop) will be passed to this function.
69
+ */
70
+ onRowClick?: (arg: {}) => void;
71
+ [rest: string]: any;
72
+ };
73
+ export type ColumnType = {
74
+ accessor: string;
75
+ /**
76
+ * Optional function to format the header data.
77
+ * @returns {string | JSX.Element} The formatted header data.
78
+ */
79
+ Header?: (arg: {
80
+ disableSortBy: boolean;
81
+ accessor: string;
82
+ label: string;
83
+ }) => JSX.Element | string;
84
+ disableSortBy?: boolean;
85
+ /**
86
+ * Width of the column. Please provide this value in rem.
87
+ */
88
+ width?: string | number;
89
+ /**
90
+ * Minimum width of the column. Please provide this value in rem.
91
+ */
92
+ minWidth?: string | number;
93
+ flexGrow?: number;
94
+ className?: string | null;
95
+ headerClassName?: string | null;
96
+ headerStyle?: {};
97
+ /**
98
+ * Optional function to format the cell data.
99
+ * @returns {string | JSX.Element} The formatted cell data.
100
+ */
101
+ Cell?: (arg: {
102
+ rowData: {};
103
+ rowIndex: number;
104
+ accessor: string;
105
+ columnIndex: number;
106
+ cellData: {};
107
+ }) => JSX.Element | string;
108
+ label?: string;
109
+ style?: {};
110
+ defaultSortDirection?: (typeof SORT_DIRECTION_TYPES)[keyof typeof SORT_DIRECTION_TYPES];
111
+ };
@@ -0,0 +1,30 @@
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 type { ColumnType } from './common-types';
20
+ /**
21
+ * This function abstracts the Cell and Header of the react-table API.
22
+ * The columns API defined in Backpack will therefore be independent of the react-table columns API which consumers don't need to be aware of.
23
+ * @param {Array} columns Array of column objects compatible with the API defined in Backpack
24
+ * @returns {Array} An array of column objects that can be directly passed to the hooks of the react-table library
25
+ *
26
+ */
27
+ export declare const createColumnsSchema: (columns: ColumnType[]) => {
28
+ [key: string]: any;
29
+ }[];
30
+ export default createColumnsSchema;
@@ -18,9 +18,9 @@
18
18
 
19
19
  import PropTypes from 'prop-types';
20
20
  import { cssModules } from "../../bpk-react-utils";
21
+ import STYLES from "./bpk-flare-bar.module.css";
21
22
  import Pointer from "./__generated__/js/pointer";
22
23
  import CornerRadius from "./__generated__/js/corner-radius";
23
- import STYLES from "./bpk-flare-bar.module.css";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
26
  const getClassName = cssModules(STYLES);
@@ -15,7 +15,6 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import { useEffect, useState } from 'react';
18
-
19
18
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
19
  import { CSSTransition } from 'react-transition-group';
21
20
  import BpkAriaLive from "../../bpk-component-aria-live";
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import { cssModules } from "../../bpk-react-utils";
20
- import classNameModifierHOCFactory from "./classNameModifierHOCFactory";
21
20
  import STYLES from "./BpkIcon.module.css";
21
+ import classNameModifierHOCFactory from "./classNameModifierHOCFactory";
22
22
  const getClassName = cssModules(STYLES);
23
23
  export default classNameModifierHOCFactory('withRtlSupport', [getClassName('bpk-icon--rtl-support')]);
@@ -19,7 +19,6 @@
19
19
  import { Component } from 'react';
20
20
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
21
21
  import CSSTransition from 'react-transition-group/CSSTransition';
22
-
23
22
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
23
  import { animations } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
25
24
  import { cssModules } from "../../bpk-react-utils";
@@ -17,17 +17,15 @@
17
17
  */
18
18
 
19
19
  import { Component } from 'react';
20
-
21
20
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
21
  import CSSTransition from 'react-transition-group/CSSTransition';
23
-
24
22
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
25
23
  import { animations } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
26
24
  import { cssModules } from "../../bpk-react-utils";
27
25
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
28
26
  import { BpkSpinner } from "../../bpk-component-spinner";
29
- import BORDER_RADIUS_STYLES from "./BpkImageBorderRadiusStyles";
30
27
  import STYLES from "./BpkImage.module.css";
28
+ import BORDER_RADIUS_STYLES from "./BpkImageBorderRadiusStyles";
31
29
  import { jsx as _jsx } from "react/jsx-runtime";
32
30
  import { jsxs as _jsxs } from "react/jsx-runtime";
33
31
  const getClassName = cssModules(STYLES);
@@ -17,11 +17,10 @@
17
17
  */
18
18
 
19
19
  import { Component } from 'react';
20
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
21
- import { TransitionGroup, CSSTransition } from 'react-transition-group';
22
-
23
20
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
21
  import { durationSm } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
22
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
23
+ import { TransitionGroup, CSSTransition } from 'react-transition-group';
25
24
  import { cssModules } from "../../bpk-react-utils";
26
25
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
27
26
  import BpkAnimateHeight from "../../bpk-animate-height";
@@ -19,8 +19,8 @@
19
19
  import { Component } from 'react';
20
20
  import { cssModules } from "../../bpk-react-utils";
21
21
  import BpkClearButton from "./BpkClearButton";
22
- import { CLEAR_BUTTON_MODES, defaultProps } from "./common-types";
23
22
  import STYLES from "./BpkInput.module.css";
23
+ import { CLEAR_BUTTON_MODES, defaultProps } from "./common-types";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
26
  const getClassName = cssModules(STYLES);
@@ -15,8 +15,8 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */import PropTypes from 'prop-types';
18
- import { Component } from 'react';
19
18
  import debounce from 'lodash.debounce';
19
+ import { Component } from 'react';
20
20
  import { cssModules, isRTL } from "../../bpk-react-utils";
21
21
  import STYLES from "./BpkMobileScrollContainer.module.css";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -18,8 +18,8 @@
18
18
 
19
19
  import { withScrim } from "../../bpk-scrim-utils";
20
20
  import { Portal, cssModules, isDeviceIphone } from "../../bpk-react-utils";
21
- import BpkModalInner from "./BpkModalInner";
22
21
  import STYLES from "./BpkModal.module.css";
22
+ import BpkModalInner from "./BpkModalInner";
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
24
  const getClassName = cssModules(STYLES);
25
25
  const ScrimBpkModalInner = withScrim(BpkModalInner);
@@ -19,8 +19,8 @@
19
19
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
20
  import { BpkButtonLink } from "../../bpk-component-link";
21
21
  import { cssModules } from "../../bpk-react-utils";
22
- import { BAR_STYLES } from "./BpkNavigationBar";
23
22
  import STYLES from "./BpkNavigationBarButtonLink.module.css";
23
+ import { BAR_STYLES } from "./BpkNavigationBar";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  const getClassName = cssModules(STYLES);
26
26
  const BpkNavigationBarButtonLink = ({
@@ -19,8 +19,8 @@
19
19
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
20
  import BpkIconButton from "../../bpk-component-close-button";
21
21
  import { cssModules } from "../../bpk-react-utils";
22
- import { BAR_STYLES } from "./BpkNavigationBar";
23
22
  import STYLES from "./BpkNavigationBarIconButton.module.css";
23
+ import { BAR_STYLES } from "./BpkNavigationBar";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  const getClassName = cssModules(STYLES);
26
26
  const BpkNavigationBarIconButton = ({
@@ -19,8 +19,8 @@ import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
19
19
  import { BpkButtonLink } from "../../bpk-component-link";
20
20
  import BpkCloseButton from "../../bpk-component-close-button";
21
21
  import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
22
- import { ARROW_ID } from "./constants";
23
22
  import STYLES from "./BpkPopover.module.css";
23
+ import { ARROW_ID } from "./constants";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
26
  const getClassName = cssModules(STYLES);
@@ -14,14 +14,14 @@
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
- */import PropTypes from 'prop-types';
17
+ */import { createPopper } from '@popperjs/core';
18
+ import PropTypes from 'prop-types';
18
19
  import { Component } from 'react';
19
- import { createPopper } from '@popperjs/core';
20
20
  import focusStore from 'a11y-focus-store';
21
21
  import { Portal, cssModules } from "../../bpk-react-utils";
22
22
  import keyboardFocusScope from "./keyboardFocusScope";
23
- import BpkPopover from "./BpkPopover";
24
23
  import STYLES from "./BpkPopover.module.css";
24
+ import BpkPopover from "./BpkPopover";
25
25
  import { jsx as _jsx } from "react/jsx-runtime";
26
26
  import { Fragment as _Fragment } from "react/jsx-runtime";
27
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -17,8 +17,8 @@
17
17
  */import PropTypes from 'prop-types';
18
18
  import { cssModules } from "../../bpk-react-utils";
19
19
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
20
- import { SIZES, ALIGNS } from "./common-types";
21
20
  import STYLES from "./BpkPrice.module.css";
21
+ import { SIZES, ALIGNS } from "./common-types";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
24
  const getClassName = cssModules(STYLES);
@@ -18,8 +18,8 @@
18
18
  import clamp from 'lodash.clamp';
19
19
  import { cssModules } from "../../bpk-react-utils";
20
20
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
21
- import { RATING_SIZES, RATING_SCALES } from "./common-types";
22
21
  import STYLES from "./BpkRating.module.css";
22
+ import { RATING_SIZES, RATING_SCALES } from "./common-types";
23
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
25
25
  const getClassName = cssModules(STYLES);
@@ -22,9 +22,9 @@ import { VariableSizeList as List } from 'react-window';
22
22
  import AutoSizer from 'react-virtualized-auto-sizer';
23
23
  import { cssModules } from "../../bpk-react-utils";
24
24
  import { CALENDAR_SELECTION_TYPE, DateUtils } from "../../bpk-component-calendar";
25
+ import STYLES from "./BpkScrollableCalendarGridList.module.css";
25
26
  import BpkScrollableCalendarGrid from "./BpkScrollableCalendarGrid";
26
27
  import { getMonthsArray, getMonthItemHeights } from "./utils";
27
- import STYLES from "./BpkScrollableCalendarGridList.module.css";
28
28
  import { jsx as _jsx } from "react/jsx-runtime";
29
29
  const getClassName = cssModules(STYLES);
30
30
 
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import format from 'date-fns/format';
19
+ import { format } from 'date-fns/format';
20
20
  export const formatDateFull = date => format(date, 'EEEE, do MMMM yyyy');
21
21
  export const formatDateFullArabic = date => {
22
22
  const dateString = 'EEEE, dd، MMMM، yyyy';
@@ -40,6 +40,7 @@ const BpkSectionHeader = ({
40
40
  className: getClassName('bpk-section-header__title'),
41
41
  children: title
42
42
  }), description && /*#__PURE__*/_jsx(BpkText, {
43
+ className: getClassName('bpk-section-header__description'),
43
44
  children: description
44
45
  })]
45
46
  }), button]
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- .bpk-section-header{display:flex;justify-content:space-between;align-items:flex-start;background-color:rgba(0,0,0,0)}.bpk-section-header__title-description{display:flex;flex-direction:column}.bpk-section-header__title-description--default{color:#161616}.bpk-section-header__title-description--on-dark{color:#fff}.bpk-section-header__title{font-size:2rem;line-height:2.5rem;font-weight:700}@media(max-width: 32rem){.bpk-section-header__title{font-size:1.5rem;line-height:1.75rem;font-weight:700}}
18
+ .bpk-section-header{display:flex;justify-content:space-between;align-items:flex-start;background-color:rgba(0,0,0,0)}.bpk-section-header__title-description{display:flex;flex-direction:column}.bpk-section-header__title-description--default{color:#161616}.bpk-section-header__title-description--on-dark{color:#fff}.bpk-section-header__title{font-size:2rem;line-height:2.5rem;font-weight:700}@media(max-width: 32rem){.bpk-section-header__title{font-size:1.5rem;line-height:1.75rem;font-weight:700}}.bpk-section-header__description{padding-top:.25rem}
@@ -16,10 +16,9 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import PropTypes from 'prop-types';
20
-
21
19
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
20
  import Slider from 'react-slider';
21
+ import PropTypes from 'prop-types';
23
22
  import { cssModules, isRTL } from "../../bpk-react-utils";
24
23
  import STYLES from "./BpkSlider.module.css";
25
24
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -75,8 +75,8 @@ XlSpinner.defaultProps = {
75
75
  viewBox: "0 0 32 32"
76
76
  };
77
77
  import { cssModules } from "../../bpk-react-utils";
78
- import SPINNER_TYPES from "./spinnerTypes";
79
78
  import STYLES from "./BpkSpinner.module.css";
79
+ import SPINNER_TYPES from "./spinnerTypes";
80
80
  import { jsx as _jsx } from "react/jsx-runtime";
81
81
  import { jsxs as _jsxs } from "react/jsx-runtime";
82
82
  const getClassName = cssModules(STYLES);
@@ -75,8 +75,8 @@ LgSpinner.defaultProps = {
75
75
  viewBox: "0 0 24 24"
76
76
  };
77
77
  import { cssModules } from "../../bpk-react-utils";
78
- import SPINNER_TYPES from "./spinnerTypes";
79
78
  import STYLES from "./BpkSpinner.module.css";
79
+ import SPINNER_TYPES from "./spinnerTypes";
80
80
  import { jsx as _jsx } from "react/jsx-runtime";
81
81
  import { jsxs as _jsxs } from "react/jsx-runtime";
82
82
  const getClassName = cssModules(STYLES);
@@ -62,8 +62,8 @@ SmSpinner.defaultProps = {
62
62
  viewBox: "0 0 16 16"
63
63
  };
64
64
  import { cssModules } from "../../bpk-react-utils";
65
- import SPINNER_TYPES from "./spinnerTypes";
66
65
  import STYLES from "./BpkSpinner.module.css";
66
+ import SPINNER_TYPES from "./spinnerTypes";
67
67
  import { jsx as _jsx } from "react/jsx-runtime";
68
68
  import { jsxs as _jsxs } from "react/jsx-runtime";
69
69
  const getClassName = cssModules(STYLES);
@@ -20,9 +20,9 @@ import { Component } from 'react';
20
20
  import BpkLabel from "../../bpk-component-label";
21
21
  import BpkSelect from "../../bpk-component-select";
22
22
  import { cssModules } from "../../bpk-react-utils";
23
+ import STYLES from "./BpkThemeToggle.module.css";
23
24
  import bpkCustomThemes from "./theming";
24
25
  import { getHtmlElement, THEME_CHANGE_EVENT } from "./utils";
25
- import STYLES from "./BpkThemeToggle.module.css";
26
26
  import { jsx as _jsx } from "react/jsx-runtime";
27
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
28
  const inputId = 'theme-select';
@@ -23,8 +23,8 @@ The actual component that developers create (i.e. the default export from this p
23
23
  */
24
24
 
25
25
  import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
26
- import { ARROW_ID, TOOLTIP_TYPES } from "./constants";
27
26
  import STYLES from "./BpkTooltip.module.css";
27
+ import { ARROW_ID, TOOLTIP_TYPES } from "./constants";
28
28
  import { jsx as _jsx } from "react/jsx-runtime";
29
29
  import { jsxs as _jsxs } from "react/jsx-runtime";
30
30
  const getClassName = cssModules(STYLES);
@@ -16,12 +16,12 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { cloneElement, Component } from 'react';
20
19
  import { createPopper } from '@popperjs/core';
20
+ import { cloneElement, Component } from 'react';
21
21
  import { Portal, cssModules } from "../../bpk-react-utils";
22
22
  import BpkTooltip from "./BpkTooltip";
23
- import { TOOLTIP_TYPES } from "./constants";
24
23
  import STYLES from "./BpkTooltip.module.css";
24
+ import { TOOLTIP_TYPES } from "./constants";
25
25
  import { jsx as _jsx } from "react/jsx-runtime";
26
26
  import { Fragment as _Fragment } from "react/jsx-runtime";
27
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -566,3 +566,18 @@
566
566
  color: $bpk-text-disabled-day;
567
567
  }
568
568
  }
569
+
570
+ /// Full width button. Modifies the bpk-button to horizontally fill its container
571
+ ///
572
+ /// @require {mixin} bpk-button
573
+ ///
574
+ /// @example scss
575
+ /// .selector {
576
+ /// @include bpk-button();
577
+ /// @include bpk-button--full-width();
578
+ /// }
579
+
580
+ @mixin bpk-button--full-width {
581
+ display: block;
582
+ width: 100%;
583
+ }
@@ -25,7 +25,8 @@ import deprecated from './src/deprecated';
25
25
  import { isDeviceIphone, isDeviceIpad, isDeviceIos } from './src/deviceDetection';
26
26
  import withDefaultProps from './src/withDefaultProps';
27
27
  import isRTL from './src/isRTL';
28
- export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, };
28
+ import{ BpkDialogWrapper } from './src/BpkDialogWrapper/BpkDialogWrapper';
29
+ export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, BpkDialogWrapper };
29
30
  declare const _default: {
30
31
  Portal: typeof Portal;
31
32
  TransitionInitialMount: ({ appearActiveClassName, appearClassName, children, transitionTimeout, }: {
@@ -54,5 +55,39 @@ declare const _default: {
54
55
  isDeviceIpad: () => boolean;
55
56
  isDeviceIos: () => boolean;
56
57
  isRTL: () => boolean;
58
+ BpkDialogWrapper: ({
59
+ ariaLabelledby,
60
+ children,
61
+ closeOnEscPressed,
62
+ closeOnScrimClick,
63
+ dialogClassName,
64
+ exiting,
65
+ id,
66
+ isOpen,
67
+ onClose,
68
+ timeout,
69
+ transitionClassNames
70
+ }: {
71
+ ariaLabelledby: string;
72
+ children: import("react").ReactNode;
73
+ closeOnEscPressed?: boolean;
74
+ closeOnScrimClick?: boolean;
75
+ dialogClassName?: string;
76
+ id: string | undefined;
77
+ isOpen: boolean;
78
+ onClose: (
79
+ arg0?: Event | KeyboardEvent | MouseEvent | PointerEvent | TouchEvent,
80
+ arg1?: {
81
+ source: 'ESCAPE' | 'DOCUMENT_CLICK';
82
+ },
83
+ ) => void | null;
84
+ exiting?: boolean;
85
+ transitionClassNames?: {
86
+ appear?: string,
87
+ appearActive?: string,
88
+ exit?: string
89
+ };
90
+ timeout?: {appear?: number, exit?: number};
91
+ }) => JSX.Element;
57
92
  };
58
93
  export default _default;
@@ -25,7 +25,8 @@ import deprecated from "./src/deprecated";
25
25
  import { isDeviceIphone, isDeviceIpad, isDeviceIos } from "./src/deviceDetection";
26
26
  import withDefaultProps from "./src/withDefaultProps";
27
27
  import isRTL from "./src/isRTL";
28
- export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL };
28
+ import { BpkDialogWrapper } from "./src/BpkDialogWrapper/BpkDialogWrapper";
29
+ export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, BpkDialogWrapper };
29
30
  export default {
30
31
  Portal,
31
32
  TransitionInitialMount,
@@ -36,5 +37,6 @@ export default {
36
37
  isDeviceIphone,
37
38
  isDeviceIpad,
38
39
  isDeviceIos,
39
- isRTL
40
+ isRTL,
41
+ BpkDialogWrapper
40
42
  };