@skyscanner/backpack-web 2.0.0 → 3.0.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-animate-height/package.json +26 -0
- package/bpk-component-accordion/package.json +31 -0
- package/bpk-component-accordion/src/BpkAccordion.js +2 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +6 -5
- package/bpk-component-accordion/src/withAccordionItemState.js +2 -1
- package/bpk-component-accordion/src/withSingleItemAccordionState.js +2 -1
- package/bpk-component-aria-live/package.json +31 -0
- package/bpk-component-aria-live/src/BpkAriaLive.js +2 -1
- package/bpk-component-autosuggest/package.json +29 -0
- package/bpk-component-autosuggest/src/BpkAutosuggest.js +3 -2
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +2 -1
- package/bpk-component-badge/package.json +29 -0
- package/bpk-component-badge/src/BpkBadge.js +2 -1
- package/bpk-component-banner-alert/package.json +34 -0
- package/bpk-component-banner-alert/src/AnimateAndFade.js +3 -2
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +8 -7
- package/bpk-component-banner-alert/src/withBannerAlertState.js +2 -1
- package/bpk-component-barchart/package.json +35 -0
- package/bpk-component-barchart/src/BpkBarchart.js +3 -2
- package/bpk-component-barchart/src/BpkBarchartBar.js +5 -3
- package/bpk-component-barchart/src/BpkChartAxis.js +2 -1
- package/bpk-component-barchart/src/BpkChartDataTable.js +2 -1
- package/bpk-component-barchart/src/BpkChartGridLines.js +2 -1
- package/bpk-component-barchart/src/RTLtransforms.js +1 -1
- package/bpk-component-blockquote/package.json +24 -0
- package/bpk-component-blockquote/src/BpkBlockquote.js +2 -1
- package/bpk-component-breadcrumb/package.json +27 -0
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +2 -1
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +6 -5
- package/bpk-component-breakpoint/package.json +28 -0
- package/bpk-component-button/package.json +26 -0
- package/bpk-component-calendar/package.json +34 -0
- package/bpk-component-calendar/src/BpkCalendarContainer.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarDate.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +6 -3
- package/bpk-component-calendar/src/BpkCalendarNav.js +6 -5
- package/bpk-component-calendar/src/Week.js +5 -2
- package/bpk-component-calendar/src/composeCalendar.js +2 -1
- package/bpk-component-card/package.json +28 -0
- package/bpk-component-card/src/BpkCard.js +2 -1
- package/bpk-component-checkbox/package.json +29 -0
- package/bpk-component-checkbox/src/BpkCheckbox.js +2 -1
- package/bpk-component-chip/package.json +29 -0
- package/bpk-component-chip/src/BpkDismissibleChip.js +2 -1
- package/bpk-component-chip/src/BpkSelectableChip.js +3 -2
- package/bpk-component-close-button/package.json +28 -0
- package/bpk-component-close-button/src/BpkCloseButton.js +3 -2
- package/bpk-component-code/package.json +24 -0
- package/bpk-component-code/src/BpkCode.js +2 -1
- package/bpk-component-code/src/BpkCodeBlock.js +2 -1
- package/bpk-component-content-container/package.json +24 -0
- package/bpk-component-content-container/src/BpkContentContainer.js +2 -1
- package/bpk-component-datatable/package.json +30 -0
- package/bpk-component-datatable/src/BpkDataTable.js +2 -1
- package/bpk-component-datatable/src/BpkDataTableColumn.js +2 -1
- package/bpk-component-datatable/src/bpkHeaderRenderer.js +5 -4
- package/bpk-component-datepicker/index.js +1 -1
- package/bpk-component-datepicker/package.json +33 -0
- package/bpk-component-datepicker/src/BpkDatepicker.js +7 -6
- package/bpk-component-datepicker/src/themeAttributes.js +3 -3
- package/bpk-component-description-list/package.json +24 -0
- package/bpk-component-description-list/src/ComponentFactory.js +2 -1
- package/bpk-component-dialog/package.json +32 -0
- package/bpk-component-dialog/src/BpkDialog.js +3 -2
- package/bpk-component-dialog/src/BpkDialogInner.js +4 -3
- package/bpk-component-drawer/package.json +34 -0
- package/bpk-component-drawer/src/BpkDrawer.js +3 -2
- package/bpk-component-drawer/src/BpkDrawerContent.js +4 -3
- package/bpk-component-drawer/src/themeAttributes.js +1 -1
- package/bpk-component-fieldset/package.json +36 -0
- package/bpk-component-fieldset/src/BpkFieldset.js +4 -3
- package/bpk-component-flare/package.json +29 -0
- package/bpk-component-flare/src/BpkContentBubble.js +2 -1
- package/bpk-component-flare/src/BpkFlareBar.js +2 -1
- package/bpk-component-form-validation/package.json +34 -0
- package/bpk-component-form-validation/src/BpkFormValidation.js +5 -4
- package/bpk-component-graphic-promotion/package.json +26 -0
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +5 -4
- package/bpk-component-grid/package.json +24 -0
- package/bpk-component-grid/src/BpkGridColumn.js +2 -1
- package/bpk-component-grid/src/BpkGridContainer.js +2 -1
- package/bpk-component-grid/src/BpkGridRow.js +2 -1
- package/bpk-component-grid-toggle/package.json +25 -0
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +3 -2
- package/bpk-component-horizontal-nav/package.json +30 -0
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +3 -2
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -1
- package/bpk-component-icon/package.json +34 -0
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +2 -1
- package/bpk-component-icon/src/withAlignment.js +2 -1
- package/bpk-component-icon/src/withDescription.js +2 -1
- package/bpk-component-icon/src/withRtlSupport.js +1 -1
- package/bpk-component-image/package.json +31 -0
- package/bpk-component-image/src/BpkBackgroundImage.js +3 -2
- package/bpk-component-image/src/BpkImage.js +3 -2
- package/bpk-component-image/src/withLazyLoading.js +2 -1
- package/bpk-component-image/src/withLoadingBehavior.js +2 -1
- package/bpk-component-infinite-scroll/package.json +31 -0
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +2 -1
- package/bpk-component-input/package.json +30 -0
- package/bpk-component-input/src/BpkClearButton.js +4 -3
- package/bpk-component-input/src/BpkInput.js +2 -1
- package/bpk-component-input/src/withOpenEvents.js +2 -1
- package/bpk-component-label/package.json +24 -0
- package/bpk-component-label/src/BpkLabel.js +2 -1
- package/bpk-component-link/package.json +28 -0
- package/bpk-component-link/src/BpkButtonLink.js +2 -1
- package/bpk-component-link/src/BpkLink.js +2 -1
- package/bpk-component-list/package.json +24 -0
- package/bpk-component-list/src/BpkList.js +2 -1
- package/bpk-component-list/src/BpkListItem.js +2 -1
- package/bpk-component-loading-button/package.json +30 -0
- package/bpk-component-loading-button/src/BpkLoadingButton.js +7 -6
- package/bpk-component-map/package.json +32 -0
- package/bpk-component-map/src/BpkIconMarker.js +2 -1
- package/bpk-component-map/src/BpkIconMarkerBackground.js +2 -1
- package/bpk-component-map/src/BpkMap.js +2 -1
- package/bpk-component-map/src/BpkPriceMarker.js +3 -2
- package/bpk-component-map/src/DefaultLoadingElement.js +3 -2
- package/bpk-component-mobile-scroll-container/package.json +28 -0
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +2 -1
- package/bpk-component-modal/package.json +33 -0
- package/bpk-component-modal/src/BpkModal.js +3 -2
- package/bpk-component-modal/src/BpkModalInner.js +5 -4
- package/bpk-component-modal/src/themeAttributes.js +1 -1
- package/bpk-component-navigation-bar/package.json +32 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +3 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +3 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +3 -2
- package/bpk-component-navigation-stack/package.json +32 -0
- package/bpk-component-navigation-stack/src/BpkNavigationStack.js +2 -1
- package/bpk-component-nudger/package.json +32 -0
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +7 -6
- package/bpk-component-nudger/src/BpkNudger.js +2 -1
- package/bpk-component-nudger/src/themeAttributes.js +1 -1
- package/bpk-component-overlay/package.json +28 -0
- package/bpk-component-overlay/src/BpkOverlay.js +2 -1
- package/bpk-component-pagination/package.json +28 -0
- package/bpk-component-pagination/src/BpkPagination.js +2 -1
- package/bpk-component-pagination/src/BpkPaginationList.js +2 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +5 -4
- package/bpk-component-pagination/src/BpkPaginationPage.js +3 -2
- package/bpk-component-pagination/src/themeAttributes.js +1 -1
- package/bpk-component-panel/package.json +24 -0
- package/bpk-component-panel/src/BpkPanel.js +2 -1
- package/bpk-component-phone-input/package.json +33 -0
- package/bpk-component-phone-input/src/BpkPhoneInput.js +5 -4
- package/bpk-component-popover/README.md +2 -2
- package/bpk-component-popover/package.json +35 -0
- package/bpk-component-popover/src/BpkPopover.js +6 -4
- package/bpk-component-popover/src/BpkPopover.module.scss +28 -26
- package/bpk-component-popover/src/BpkPopoverPortal.js +45 -18
- package/bpk-component-popover/src/themeAttributes.js +1 -1
- package/bpk-component-progress/package.json +30 -0
- package/bpk-component-progress/src/BpkProgress.js +2 -1
- package/bpk-component-radio/package.json +28 -0
- package/bpk-component-radio/src/BpkRadio.js +2 -1
- package/bpk-component-rating/package.json +29 -0
- package/bpk-component-rating/src/BpkRating.js +9 -3
- package/bpk-component-rtl-toggle/package.json +24 -0
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +2 -1
- package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +2 -1
- package/bpk-component-scrollable-calendar/index.js +1 -1
- package/bpk-component-scrollable-calendar/package.json +32 -0
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.js +1 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +2 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +4 -3
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +6 -2
- package/bpk-component-scrollable-calendar/src/utils.js +1 -1
- package/bpk-component-section-list/package.json +30 -0
- package/bpk-component-section-list/src/BpkSectionListItem.js +4 -3
- package/bpk-component-section-list/src/BpkSectionListSection.js +3 -2
- package/bpk-component-select/package.json +27 -0
- package/bpk-component-select/src/BpkSelect.js +2 -1
- package/bpk-component-skip-link/package.json +24 -0
- package/bpk-component-skip-link/src/BpkSkipLink.js +2 -1
- package/bpk-component-slider/package.json +29 -0
- package/bpk-component-slider/src/BpkSlider.js +2 -1
- package/bpk-component-spinner/package.json +25 -0
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +2 -1
- package/bpk-component-spinner/src/BpkLargeSpinner.js +2 -1
- package/bpk-component-spinner/src/BpkSpinner.js +2 -1
- package/bpk-component-star-rating/package.json +29 -0
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +2 -1
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +2 -1
- package/bpk-component-star-rating/src/BpkStar.js +9 -8
- package/bpk-component-star-rating/src/BpkStarRating.js +8 -2
- package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +2 -1
- package/bpk-component-switch/package.json +24 -0
- package/bpk-component-switch/src/BpkSwitch.js +2 -1
- package/bpk-component-table/package.json +24 -0
- package/bpk-component-table/src/BpkTable.js +2 -1
- package/bpk-component-table/src/BpkTableCell.js +2 -1
- package/bpk-component-table/src/BpkTableHeadCell.js +2 -1
- package/bpk-component-text/package.json +24 -0
- package/bpk-component-text/src/BpkText.js +2 -1
- package/bpk-component-textarea/package.json +28 -0
- package/bpk-component-textarea/src/BpkTextarea.js +2 -1
- package/bpk-component-theme-toggle/package.json +28 -0
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +4 -3
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +2 -1
- package/bpk-component-ticket/package.json +28 -0
- package/bpk-component-ticket/src/BpkTicket.js +2 -1
- package/bpk-component-tooltip/README.md +2 -2
- package/bpk-component-tooltip/package.json +29 -0
- package/bpk-component-tooltip/src/BpkTooltip.js +8 -2
- package/bpk-component-tooltip/src/BpkTooltip.module.scss +46 -55
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +23 -13
- package/bpk-react-utils/package.json +25 -0
- package/bpk-scrim-utils/package.json +25 -0
- package/bpk-scrim-utils/src/BpkScrim.js +2 -1
- package/bpk-scrim-utils/src/withScrim.js +2 -1
- package/bpk-theming/package.json +23 -0
- package/package.json +1 -2
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
|
|
19
19
|
/* @flow strict */
|
|
20
20
|
|
|
21
|
-
import { secondaryThemeAttributes as themeAttributes } from 'bpk-component-button/themeAttributes';
|
|
21
|
+
import { secondaryThemeAttributes as themeAttributes } from '../../bpk-component-button/themeAttributes';
|
|
22
22
|
|
|
23
23
|
export default themeAttributes;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-overlay",
|
|
3
|
+
"version": "2.1.11",
|
|
4
|
+
"description": "Backpack overlay component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"bpk-mixins": "^31.1.1",
|
|
17
|
+
"bpk-react-utils": "^4.1.2",
|
|
18
|
+
"prop-types": "^15.5.8"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"bpk-component-image": "^5.1.11",
|
|
25
|
+
"bpk-component-text": "^7.0.4"
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8"
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-pagination",
|
|
3
|
+
"version": "4.0.9",
|
|
4
|
+
"description": "Backpack pagination component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"bpk-component-button": "^6.2.5",
|
|
18
|
+
"bpk-mixins": "^31.1.1",
|
|
19
|
+
"bpk-react-utils": "^4.1.2",
|
|
20
|
+
"prop-types": "^15.7.2"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"bpk-component-icon": "^9.2.11"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
import React from 'react';
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
22
23
|
|
|
23
24
|
import BpkPaginationList from './BpkPaginationList';
|
|
24
25
|
import BpkPaginationNudger from './BpkPaginationNudger';
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import React from 'react';
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
22
23
|
|
|
23
24
|
import BpkPaginationPage from './BpkPaginationPage';
|
|
24
25
|
import BpkPaginationBreak from './BpkPaginationBreak';
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import React from 'react';
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import
|
|
21
|
+
|
|
22
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
23
|
+
import { withButtonAlignment, withRtlSupport } from '../../bpk-component-icon';
|
|
24
|
+
import ArrowLeftIcon from '../../bpk-component-icon/lg/arrow-left';
|
|
25
|
+
import ArrowRightIcon from '../../bpk-component-icon/lg/arrow-right';
|
|
25
26
|
|
|
26
27
|
import STYLES from './BpkPaginationNudger.module.scss';
|
|
27
28
|
|
|
@@ -16,10 +16,11 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import BpkButton from 'bpk-component-button';
|
|
20
19
|
import PropTypes from 'prop-types';
|
|
21
20
|
import React from 'react';
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
import BpkButton from '../../bpk-component-button';
|
|
23
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
23
24
|
|
|
24
25
|
import STYLES from './BpkPaginationPage.module.scss';
|
|
25
26
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { secondaryThemeAttributes } from 'bpk-component-button';
|
|
18
|
+
import { secondaryThemeAttributes } from '../../bpk-component-button';
|
|
19
19
|
|
|
20
20
|
export default [
|
|
21
21
|
...secondaryThemeAttributes,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-panel",
|
|
3
|
+
"version": "3.1.10",
|
|
4
|
+
"description": "Backpack panel component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"bpk-mixins": "^31.1.1",
|
|
18
|
+
"bpk-react-utils": "^4.1.2",
|
|
19
|
+
"prop-types": "^15.7.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-phone-input",
|
|
3
|
+
"version": "7.1.15",
|
|
4
|
+
"description": "Backpack phone input component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
18
|
+
"bpk-component-input": "^6.1.13",
|
|
19
|
+
"bpk-component-label": "^5.1.10",
|
|
20
|
+
"bpk-component-select": "^5.1.10",
|
|
21
|
+
"bpk-component-text": "^7.0.4",
|
|
22
|
+
"bpk-mixins": "^31.1.1",
|
|
23
|
+
"bpk-react-utils": "^4.1.2",
|
|
24
|
+
"prop-types": "^15.7.2"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"bpk-component-fieldset": "^4.1.15",
|
|
31
|
+
"bpk-component-image": "^5.1.11"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import PropTypes from 'prop-types';
|
|
23
|
-
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
23
|
+
|
|
24
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
25
|
+
import BpkInput, { INPUT_TYPES } from '../../bpk-component-input';
|
|
26
|
+
import BpkLabel from '../../bpk-component-label';
|
|
27
|
+
import BpkSelect from '../../bpk-component-select';
|
|
27
28
|
|
|
28
29
|
import STYLES from './BpkPhoneInput.module.scss';
|
|
29
30
|
|
|
@@ -84,7 +84,7 @@ class App extends Component {
|
|
|
84
84
|
| labelAsTitle | bool | false | false |
|
|
85
85
|
| padded | bool | false | true |
|
|
86
86
|
| placement | oneOf(['top', 'right', 'bottom', 'left']) | false | 'bottom' |
|
|
87
|
-
| popperModifiers | object
|
|
87
|
+
| popperModifiers | arrayOf(object) | false | null |
|
|
88
88
|
| portalClassName | string | false | null |
|
|
89
89
|
| portalStyle | object | false | null |
|
|
90
90
|
| renderTarget | func | false | null |
|
|
@@ -118,7 +118,7 @@ const onClose = (event, {
|
|
|
118
118
|
|
|
119
119
|
#### popperModifiers
|
|
120
120
|
|
|
121
|
-
Please refer to the [documentation](https://
|
|
121
|
+
Please refer to the [documentation](https://popper.js.org/docs/v2/modifiers/) for the underlying positioning library "Popper.js". You can achieve various behaviours such as allowing the popover to overflow the viewport etc.
|
|
122
122
|
|
|
123
123
|
## Theme Props
|
|
124
124
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-popover",
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "Backpack popover component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@popperjs/core": "^2.11.5",
|
|
18
|
+
"a11y-focus-scope": "^1.1.3",
|
|
19
|
+
"a11y-focus-store": "^1.0.0",
|
|
20
|
+
"bpk-component-close-button": "^3.1.11",
|
|
21
|
+
"bpk-component-link": "^3.1.10",
|
|
22
|
+
"bpk-component-text": "^7.0.4",
|
|
23
|
+
"bpk-mixins": "^31.1.1",
|
|
24
|
+
"bpk-react-utils": "^4.1.2",
|
|
25
|
+
"prop-types": "^15.7.2"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"bpk-component-button": "^6.2.5",
|
|
32
|
+
"bpk-component-content-container": "^5.0.4",
|
|
33
|
+
"bpk-component-input": "^6.1.13"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
import PropTypes from 'prop-types';
|
|
22
22
|
import React, { type Node } from 'react';
|
|
23
|
-
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
23
|
+
|
|
24
|
+
import BpkText, { TEXT_STYLES } from '../../bpk-component-text';
|
|
25
|
+
import { BpkButtonLink } from '../../bpk-component-link';
|
|
26
|
+
import BpkCloseButton from '../../bpk-component-close-button';
|
|
27
|
+
import { TransitionInitialMount, cssModules } from '../../bpk-react-utils';
|
|
27
28
|
|
|
28
29
|
import STYLES from './BpkPopover.module.scss';
|
|
29
30
|
import { ARROW_ID } from './constants';
|
|
@@ -108,6 +109,7 @@ const BpkPopover = (props: Props) => {
|
|
|
108
109
|
id={ARROW_ID}
|
|
109
110
|
className={getClassName('bpk-popover__arrow')}
|
|
110
111
|
role="presentation"
|
|
112
|
+
data-popper-arrow
|
|
111
113
|
/>
|
|
112
114
|
{labelAsTitle ? (
|
|
113
115
|
<header className={getClassName('bpk-popover__header')}>
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
$bpk-spacing-v2: true;
|
|
22
22
|
|
|
23
|
-
$arrow-size: bpk-spacing-
|
|
23
|
+
$arrow-size: bpk-spacing-lg();
|
|
24
|
+
$arrow-inset-margin: -($bpk-one-pixel-rem * 11);
|
|
24
25
|
|
|
25
26
|
.bpk-popover-portal {
|
|
26
27
|
z-index: $bpk-zindex-popover;
|
|
@@ -29,22 +30,6 @@ $arrow-size: bpk-spacing-sm() * 3;
|
|
|
29
30
|
margin-right: bpk-spacing-base();
|
|
30
31
|
margin-left: bpk-spacing-base();
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
&[x-placement='top'] {
|
|
34
|
-
margin-bottom: $arrow-size;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&[x-placement='right'] {
|
|
38
|
-
margin-left: $arrow-size;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&[x-placement='bottom'] {
|
|
42
|
-
margin-top: $arrow-size;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&[x-placement='left'] {
|
|
46
|
-
margin-right: $arrow-size;
|
|
47
|
-
}
|
|
48
33
|
}
|
|
49
34
|
|
|
50
35
|
.bpk-popover {
|
|
@@ -68,22 +53,39 @@ $arrow-size: bpk-spacing-sm() * 3;
|
|
|
68
53
|
}
|
|
69
54
|
|
|
70
55
|
&__arrow {
|
|
71
|
-
|
|
56
|
+
position: aboslute;
|
|
57
|
+
width: $arrow-size;
|
|
58
|
+
height: $arrow-size;
|
|
59
|
+
transform: rotate(45deg);
|
|
60
|
+
border: $bpk-one-pixel-rem solid transparent;
|
|
61
|
+
background: inherit;
|
|
62
|
+
|
|
63
|
+
.bpk-popover-portal[data-popper-placement='top'] & {
|
|
64
|
+
bottom: $arrow-inset-margin;
|
|
65
|
+
border-right-color: $bpk-color-sky-gray-tint-06;
|
|
66
|
+
border-bottom-color: $bpk-color-sky-gray-tint-06;
|
|
67
|
+
}
|
|
72
68
|
|
|
73
|
-
.bpk-popover-portal[
|
|
74
|
-
|
|
69
|
+
.bpk-popover-portal[data-popper-placement='right'] & {
|
|
70
|
+
left: $arrow-inset-margin;
|
|
71
|
+
border-bottom-color: $bpk-color-sky-gray-tint-06;
|
|
72
|
+
border-left-color: $bpk-color-sky-gray-tint-06;
|
|
75
73
|
}
|
|
76
74
|
|
|
77
|
-
.bpk-popover-portal[
|
|
78
|
-
|
|
75
|
+
.bpk-popover-portal[data-popper-placement='bottom'] & {
|
|
76
|
+
top: $arrow-inset-margin;
|
|
77
|
+
border-top-color: $bpk-color-sky-gray-tint-06;
|
|
78
|
+
border-left-color: $bpk-color-sky-gray-tint-06;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.bpk-popover-portal[
|
|
82
|
-
|
|
81
|
+
.bpk-popover-portal[data-popper-placement='left'] & {
|
|
82
|
+
right: $arrow-inset-margin;
|
|
83
|
+
border-top-color: $bpk-color-sky-gray-tint-06;
|
|
84
|
+
border-right-color: $bpk-color-sky-gray-tint-06;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
&[data-hide] {
|
|
88
|
+
visibility: hidden;
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
|
|
19
19
|
/* @flow strict */
|
|
20
20
|
|
|
21
|
-
import
|
|
21
|
+
import { createPopper, basePlacements } from '@popperjs/core';
|
|
22
22
|
import PropTypes from 'prop-types';
|
|
23
23
|
import React, { Component, type Node } from 'react';
|
|
24
24
|
import focusStore from 'a11y-focus-store';
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
import { Portal, cssModules } from '../../bpk-react-utils';
|
|
26
27
|
|
|
27
28
|
import keyboardFocusScope from './keyboardFocusScope';
|
|
28
29
|
import STYLES from './BpkPopover.module.scss';
|
|
@@ -31,7 +32,6 @@ import BpkPopover, {
|
|
|
31
32
|
defaultProps as popoverDefaultProps,
|
|
32
33
|
type Props as PopoverProps,
|
|
33
34
|
} from './BpkPopover';
|
|
34
|
-
import { ARROW_ID } from './constants';
|
|
35
35
|
|
|
36
36
|
const getClassName = cssModules(STYLES);
|
|
37
37
|
|
|
@@ -51,7 +51,7 @@ export const propTypes = {
|
|
|
51
51
|
target: PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired,
|
|
52
52
|
isOpen: PropTypes.bool.isRequired,
|
|
53
53
|
onClose: PropTypes.func.isRequired,
|
|
54
|
-
placement: PropTypes.oneOf(
|
|
54
|
+
placement: PropTypes.oneOf(basePlacements),
|
|
55
55
|
portalStyle: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
|
56
56
|
portalClassName: PropTypes.string,
|
|
57
57
|
renderTarget: PropTypes.func,
|
|
@@ -68,7 +68,7 @@ export const defaultProps = {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
class BpkPopoverPortal extends Component<Props> {
|
|
71
|
-
popper: ?typeof
|
|
71
|
+
popper: ?typeof createPopper;
|
|
72
72
|
|
|
73
73
|
suppressRestoreFocus: boolean;
|
|
74
74
|
|
|
@@ -139,34 +139,61 @@ class BpkPopoverPortal extends Component<Props> {
|
|
|
139
139
|
this.popper = null;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
// Custom modifier that makes the arrow display at the edge of the target.
|
|
143
|
+
const applyArrowHide = {
|
|
144
|
+
name: 'applyArrowHide',
|
|
145
|
+
enabled: true,
|
|
146
|
+
phase: 'write',
|
|
147
|
+
fn({ state }) {
|
|
148
|
+
const { arrow } = state.elements;
|
|
149
|
+
if (arrow) {
|
|
150
|
+
if (state.modifiersData.arrow.centerOffset !== 0) {
|
|
151
|
+
arrow.setAttribute('data-hide', '');
|
|
152
|
+
} else {
|
|
153
|
+
arrow.removeAttribute('data-hide');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// The default modifiers for the popper
|
|
142
160
|
// Note that GPU acceleration should be disabled otherwise Popper will use `translate3d`
|
|
143
161
|
// which can cause blurriness in Safari and Chrome.
|
|
162
|
+
const stdModifiers = [
|
|
163
|
+
{
|
|
164
|
+
name: 'computeStyles',
|
|
165
|
+
options: {
|
|
166
|
+
gpuAcceleration: false,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'offset',
|
|
171
|
+
options: {
|
|
172
|
+
offset: [0, 17],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
applyArrowHide,
|
|
176
|
+
];
|
|
177
|
+
|
|
144
178
|
if (!this.popper) {
|
|
145
|
-
this.popper =
|
|
179
|
+
this.popper = createPopper(targetElement, popoverElement, {
|
|
146
180
|
placement: this.props.placement,
|
|
147
|
-
|
|
181
|
+
onFirstUpdate: () => {
|
|
148
182
|
if (targetElement) {
|
|
149
183
|
targetElement.focus();
|
|
150
184
|
}
|
|
151
185
|
focusStore.storeFocus();
|
|
152
186
|
keyboardFocusScope.scopeFocus(popoverElement);
|
|
153
187
|
},
|
|
154
|
-
modifiers:
|
|
155
|
-
...this.props.popperModifiers,
|
|
156
|
-
|
|
157
|
-
gpuAcceleration: false,
|
|
158
|
-
},
|
|
159
|
-
arrow: {
|
|
160
|
-
element: `#${ARROW_ID}`,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
188
|
+
modifiers: this.props.popperModifiers
|
|
189
|
+
? [...this.props.popperModifiers, ...stdModifiers]
|
|
190
|
+
: stdModifiers,
|
|
163
191
|
});
|
|
164
192
|
}
|
|
165
193
|
|
|
166
194
|
this.previousTargetElement = targetElement;
|
|
167
|
-
|
|
168
195
|
if (this.popper) {
|
|
169
|
-
this.popper.
|
|
196
|
+
this.popper.update();
|
|
170
197
|
}
|
|
171
198
|
}
|
|
172
199
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-progress",
|
|
3
|
+
"version": "3.1.10",
|
|
4
|
+
"description": "Backpack progress bar component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
18
|
+
"bpk-mixins": "^31.1.1",
|
|
19
|
+
"bpk-react-utils": "^4.1.2",
|
|
20
|
+
"lodash.clamp": "^4.0.3",
|
|
21
|
+
"prop-types": "^15.7.2"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"bpk-component-button": "^6.2.5",
|
|
28
|
+
"bpk-storybook-utils": "^1.1.9"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -22,7 +22,8 @@ import PropTypes from 'prop-types';
|
|
|
22
22
|
import React, { Component } from 'react';
|
|
23
23
|
import { colorWhite } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
24
24
|
import clamp from 'lodash.clamp';
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
26
27
|
|
|
27
28
|
import STYLES from './BpkProgress.module.scss';
|
|
28
29
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-radio",
|
|
3
|
+
"version": "3.1.11",
|
|
4
|
+
"description": "Backpack radio button component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"bpk-mixins": "^31.1.1",
|
|
18
|
+
"bpk-react-utils": "^4.1.2",
|
|
19
|
+
"prop-types": "^15.7.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
26
|
+
"bpk-storybook-utils": "^1.1.9"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-rating",
|
|
3
|
+
"version": "5.0.1",
|
|
4
|
+
"description": "Backpack rating component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"bpk-mixins": "^31.1.1",
|
|
18
|
+
"bpk-react-utils": "^4.1.2",
|
|
19
|
+
"lodash.clamp": "^4.0.3",
|
|
20
|
+
"prop-types": "^15.5.8"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
27
|
+
"bpk-component-text": "^7.0.4"
|
|
28
|
+
}
|
|
29
|
+
}
|