@skyscanner/backpack-web 0.0.6 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-animate-height/package.json +3 -3
- package/bpk-component-accordion/README.md +0 -5
- package/bpk-component-accordion/index.js +1 -2
- package/bpk-component-accordion/package.json +8 -8
- package/bpk-component-accordion/src/BpkAccordion.js +1 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +5 -18
- package/bpk-component-accordion/src/withAccordionItemState.js +1 -1
- package/bpk-component-accordion/src/withSingleItemAccordionState.js +1 -1
- package/bpk-component-aria-live/package.json +8 -8
- package/bpk-component-aria-live/src/BpkAriaLive.js +1 -1
- package/bpk-component-autosuggest/package.json +5 -5
- package/bpk-component-autosuggest/src/BpkAutosuggest.js +2 -2
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +1 -1
- package/bpk-component-badge/package.json +6 -6
- package/bpk-component-badge/src/BpkBadge.js +1 -1
- package/bpk-component-banner-alert/package.json +10 -10
- package/bpk-component-banner-alert/src/AnimateAndFade.js +2 -2
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +7 -7
- package/bpk-component-banner-alert/src/withBannerAlertState.js +1 -1
- package/bpk-component-barchart/package.json +9 -9
- package/bpk-component-barchart/src/BpkBarchart.js +2 -2
- package/bpk-component-barchart/src/BpkBarchartBar.js +1 -1
- package/bpk-component-barchart/src/BpkChartAxis.js +1 -1
- package/bpk-component-barchart/src/BpkChartDataTable.js +1 -1
- package/bpk-component-barchart/src/BpkChartGridLines.js +1 -1
- package/bpk-component-barchart/src/RTLtransforms.js +1 -1
- package/bpk-component-blockquote/package.json +3 -3
- package/bpk-component-blockquote/src/BpkBlockquote.js +1 -1
- package/bpk-component-breadcrumb/package.json +6 -6
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +1 -1
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +5 -5
- package/bpk-component-breakpoint/package.json +4 -4
- package/{bpk-component-rating/examples.module.scss → bpk-component-button/BpkButtonPrimaryOnDark.js} +2 -4
- package/{bpk-component-dialog/examples.module.scss → bpk-component-button/BpkButtonPrimaryOnLight.js} +2 -6
- package/bpk-component-button/README.md +40 -21
- package/bpk-component-button/index.js +4 -0
- package/bpk-component-button/package.json +3 -3
- package/bpk-component-button/src/BpkButton.js +27 -7
- package/bpk-component-button/src/BpkButtonLink.js +6 -8
- package/bpk-component-button/src/BpkButtonLink.module.scss +0 -4
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +48 -0
- package/bpk-component-button/{BpkButtonStory.module.scss → src/BpkButtonPrimaryOnDark.module.scss} +2 -2
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +48 -0
- package/{bpk-component-nudger/BpkNudgerStory.module.scss → bpk-component-button/src/BpkButtonPrimaryOnLight.module.scss} +2 -6
- package/bpk-component-button/src/themeAttributes.js +18 -0
- package/bpk-component-calendar/package.json +10 -10
- package/bpk-component-calendar/src/BpkCalendarContainer.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarDate.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.js +5 -5
- package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.module.scss +1 -7
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarNav.js +5 -5
- package/bpk-component-calendar/src/Week.js +5 -5
- package/bpk-component-calendar/src/composeCalendar.js +1 -1
- package/bpk-component-calendar/src/custom-proptypes.js +6 -8
- package/bpk-component-card/package.json +5 -5
- package/bpk-component-card/src/BpkCard.js +1 -1
- package/bpk-component-checkbox/package.json +6 -6
- package/bpk-component-checkbox/src/BpkCheckbox.js +1 -1
- package/bpk-component-chip/package.json +6 -6
- package/bpk-component-chip/src/BpkDismissibleChip.js +1 -1
- package/bpk-component-chip/src/BpkSelectableChip.js +2 -2
- package/bpk-component-close-button/package.json +5 -5
- package/bpk-component-close-button/src/BpkCloseButton.js +2 -2
- package/bpk-component-code/package.json +3 -3
- package/bpk-component-code/src/BpkCode.js +1 -1
- package/bpk-component-code/src/BpkCodeBlock.js +1 -1
- package/bpk-component-content-container/package.json +3 -3
- package/bpk-component-content-container/src/BpkContentContainer.js +1 -1
- package/bpk-component-datatable/package.json +5 -5
- package/bpk-component-datatable/src/BpkDataTable.js +1 -1
- package/bpk-component-datatable/src/BpkDataTableColumn.js +1 -1
- package/bpk-component-datatable/src/bpkHeaderRenderer.js +4 -4
- package/bpk-component-datepicker/index.js +1 -1
- package/bpk-component-datepicker/package.json +10 -10
- package/bpk-component-datepicker/src/BpkDatepicker.js +6 -6
- package/bpk-component-datepicker/src/themeAttributes.js +3 -3
- package/bpk-component-description-list/package.json +3 -3
- package/bpk-component-description-list/src/ComponentFactory.js +1 -1
- package/bpk-component-dialog/package.json +9 -9
- package/bpk-component-dialog/src/BpkDialog.js +2 -2
- package/bpk-component-dialog/src/BpkDialogInner.js +3 -3
- package/bpk-component-drawer/package.json +10 -10
- package/bpk-component-drawer/src/BpkDrawer.js +2 -2
- package/bpk-component-drawer/src/BpkDrawerContent.js +3 -3
- package/bpk-component-drawer/src/themeAttributes.js +1 -1
- package/bpk-component-fieldset/package.json +13 -13
- package/bpk-component-fieldset/src/BpkFieldset.js +3 -3
- package/bpk-component-flare/package.json +5 -5
- package/bpk-component-flare/src/BpkContentBubble.js +1 -1
- package/bpk-component-flare/src/BpkFlareBar.js +1 -1
- package/bpk-component-form-validation/package.json +11 -11
- package/bpk-component-form-validation/src/BpkFormValidation.js +4 -4
- package/bpk-component-graphic-promotion/README.md +70 -0
- package/{bpk-component-close-button/examples.js → bpk-component-graphic-promotion/index.js} +9 -11
- package/bpk-component-graphic-promotion/package.json +26 -0
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +202 -0
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.scss +255 -0
- package/bpk-component-graphic-promotion/src/custom-breakpoints.module.scss +70 -0
- package/bpk-component-grid/package.json +3 -3
- package/bpk-component-grid/src/BpkGridColumn.js +1 -1
- package/bpk-component-grid/src/BpkGridContainer.js +1 -1
- package/bpk-component-grid/src/BpkGridRow.js +1 -1
- package/bpk-component-grid-toggle/package.json +4 -4
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +2 -2
- package/bpk-component-horizontal-nav/package.json +7 -7
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +2 -2
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +1 -1
- package/bpk-component-icon/package.json +8 -8
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +1 -1
- package/bpk-component-icon/src/withAlignment.js +1 -1
- package/bpk-component-icon/src/withDescription.js +1 -1
- package/bpk-component-icon/src/withRtlSupport.js +1 -1
- package/bpk-component-image/package.json +7 -7
- package/bpk-component-image/src/BpkBackgroundImage.js +2 -2
- package/bpk-component-image/src/BpkImage.js +2 -2
- package/bpk-component-image/src/withLazyLoading.js +1 -1
- package/bpk-component-image/src/withLoadingBehavior.js +1 -1
- package/bpk-component-infinite-scroll/package.json +7 -7
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +1 -1
- package/bpk-component-input/package.json +7 -7
- package/bpk-component-input/src/BpkClearButton.js +3 -3
- package/bpk-component-input/src/BpkInput.js +1 -1
- package/bpk-component-input/src/withOpenEvents.js +1 -1
- package/bpk-component-label/package.json +3 -3
- package/bpk-component-label/src/BpkLabel.js +1 -1
- package/bpk-component-link/package.json +5 -5
- package/bpk-component-link/src/BpkButtonLink.js +1 -1
- package/bpk-component-link/src/BpkLink.js +1 -1
- package/bpk-component-list/package.json +3 -3
- package/bpk-component-list/src/BpkList.js +1 -1
- package/bpk-component-list/src/BpkListItem.js +1 -1
- package/bpk-component-loading-button/package.json +7 -7
- package/bpk-component-loading-button/src/BpkLoadingButton.js +43 -19
- package/{bpk-component-fieldset/examples.module.scss → bpk-component-loading-button/src/BpkLoadingButton.module.scss} +25 -16
- package/bpk-component-map/package.json +7 -7
- package/bpk-component-map/src/BpkIconMarker.js +1 -1
- package/bpk-component-map/src/BpkIconMarkerBackground.js +1 -1
- package/bpk-component-map/src/BpkPriceMarker.js +2 -2
- package/bpk-component-map/src/DefaultLoadingElement.js +2 -2
- package/bpk-component-mobile-scroll-container/package.json +4 -4
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +1 -1
- package/bpk-component-modal/package.json +10 -10
- package/bpk-component-modal/src/BpkModal.js +2 -2
- package/bpk-component-modal/src/BpkModalInner.js +4 -4
- package/bpk-component-modal/src/themeAttributes.js +1 -1
- package/bpk-component-navigation-bar/package.json +9 -9
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +2 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +2 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +2 -2
- package/bpk-component-navigation-stack/package.json +8 -8
- package/bpk-component-navigation-stack/src/BpkNavigationStack.js +1 -1
- package/bpk-component-nudger/package.json +8 -8
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +6 -6
- package/bpk-component-nudger/src/BpkNudger.js +1 -1
- package/bpk-component-nudger/src/themeAttributes.js +1 -1
- package/bpk-component-overlay/package.json +5 -5
- package/bpk-component-overlay/src/BpkOverlay.js +1 -1
- package/bpk-component-pagination/package.json +5 -5
- package/bpk-component-pagination/src/BpkPagination.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationList.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +4 -4
- package/bpk-component-pagination/src/BpkPaginationPage.js +2 -2
- package/bpk-component-pagination/src/themeAttributes.js +1 -1
- package/bpk-component-panel/package.json +3 -3
- package/bpk-component-panel/src/BpkPanel.js +1 -1
- package/bpk-component-phone-input/package.json +10 -10
- package/bpk-component-phone-input/src/BpkPhoneInput.js +4 -4
- package/bpk-component-popover/package.json +9 -9
- package/bpk-component-popover/src/BpkPopover.js +4 -4
- package/bpk-component-popover/src/BpkPopoverPortal.js +1 -1
- package/bpk-component-popover/src/themeAttributes.js +1 -1
- package/bpk-component-progress/package.json +6 -6
- package/bpk-component-progress/src/BpkProgress.js +1 -1
- package/bpk-component-radio/package.json +5 -5
- package/bpk-component-radio/src/BpkRadio.js +1 -1
- package/bpk-component-rating/package.json +5 -5
- package/bpk-component-rating/src/BpkRating.js +2 -2
- package/bpk-component-rtl-toggle/package.json +3 -3
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +1 -1
- package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +1 -1
- package/bpk-component-scrollable-calendar/index.js +1 -1
- package/bpk-component-scrollable-calendar/package.json +7 -7
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.js +1 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +1 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +3 -3
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +2 -2
- package/bpk-component-scrollable-calendar/src/utils.js +1 -1
- package/bpk-component-section-list/package.json +7 -7
- package/bpk-component-section-list/src/BpkSectionListItem.js +3 -3
- package/bpk-component-section-list/src/BpkSectionListSection.js +2 -2
- package/bpk-component-select/package.json +4 -4
- package/bpk-component-select/src/BpkSelect.js +1 -1
- package/bpk-component-skip-link/package.json +3 -3
- package/bpk-component-skip-link/src/BpkSkipLink.js +1 -1
- package/bpk-component-slider/package.json +5 -5
- package/bpk-component-slider/src/BpkSlider.js +1 -1
- package/bpk-component-spinner/package.json +4 -4
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +1 -1
- package/bpk-component-spinner/src/BpkLargeSpinner.js +1 -1
- package/bpk-component-spinner/src/BpkSpinner.js +1 -1
- package/bpk-component-star-rating/package.json +6 -6
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +1 -1
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
- package/bpk-component-star-rating/src/BpkStar.js +8 -8
- package/bpk-component-star-rating/src/BpkStarRating.js +1 -1
- package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +1 -1
- package/bpk-component-switch/package.json +3 -3
- package/bpk-component-switch/src/BpkSwitch.js +1 -1
- package/bpk-component-table/package.json +3 -3
- package/bpk-component-table/src/BpkTable.js +1 -1
- package/bpk-component-table/src/BpkTableCell.js +1 -1
- package/bpk-component-table/src/BpkTableHeadCell.js +1 -1
- package/bpk-component-text/package.json +3 -3
- package/bpk-component-text/src/BpkText.js +1 -1
- package/bpk-component-textarea/package.json +5 -5
- package/bpk-component-textarea/src/BpkTextarea.js +1 -1
- package/bpk-component-theme-toggle/package.json +6 -6
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +3 -3
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
- package/bpk-component-ticket/package.json +5 -5
- package/bpk-component-ticket/src/BpkTicket.js +1 -1
- package/bpk-component-tooltip/package.json +5 -5
- package/bpk-component-tooltip/src/BpkTooltip.js +1 -1
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +1 -1
- package/bpk-react-utils/index.js +1 -2
- package/bpk-react-utils/package.json +2 -3
- package/bpk-react-utils/src/withDefaultProps.js +2 -1
- package/{bpk-component-chip/examples.module.scss → bpk-react-utils/src/wrapDisplayName.js} +11 -13
- package/bpk-scrim-utils/package.json +3 -3
- package/bpk-scrim-utils/src/BpkScrim.js +1 -1
- package/bpk-scrim-utils/src/withScrim.js +1 -1
- package/bpk-theming/package.json +2 -2
- package/package.json +4 -5
- package/bpk-animate-height/examples.js +0 -67
- package/bpk-component-accordion/examples.js +0 -316
- package/bpk-component-aria-live/examples.js +0 -248
- package/bpk-component-aria-live/examples.module.css +0 -18
- package/bpk-component-aria-live/examples.module.scss +0 -65
- package/bpk-component-autosuggest/examples.js +0 -201
- package/bpk-component-badge/BadgeLayout.js +0 -54
- package/bpk-component-badge/BpkBadgeLayout.module.css +0 -18
- package/bpk-component-badge/BpkBadgeLayout.module.scss +0 -36
- package/bpk-component-badge/examples.js +0 -207
- package/bpk-component-banner-alert/examples.js +0 -253
- package/bpk-component-banner-alert/examples.module.css +0 -18
- package/bpk-component-banner-alert/examples.module.scss +0 -27
- package/bpk-component-barchart/examples.js +0 -334
- package/bpk-component-barchart/hocs.js +0 -67
- package/bpk-component-barchart/stories.module.css +0 -18
- package/bpk-component-barchart/stories.module.scss +0 -37
- package/bpk-component-blockquote/examples.js +0 -33
- package/bpk-component-breadcrumb/examples.js +0 -57
- package/bpk-component-breakpoint/examples.js +0 -72
- package/bpk-component-breakpoint/examples.module.css +0 -18
- package/bpk-component-breakpoint/examples.module.scss +0 -36
- package/bpk-component-button/BpkButtonStory.module.css +0 -18
- package/bpk-component-button/examples.js +0 -213
- package/bpk-component-calendar/coloured-calendar-example.js +0 -106
- package/bpk-component-calendar/examples-components.js +0 -299
- package/bpk-component-calendar/examples.js +0 -369
- package/bpk-component-card/examples.js +0 -91
- package/bpk-component-checkbox/examples.js +0 -197
- package/bpk-component-chip/examples.js +0 -339
- package/bpk-component-chip/examples.module.css +0 -18
- package/bpk-component-code/examples.js +0 -56
- package/bpk-component-content-container/examples.js +0 -307
- package/bpk-component-datatable/examples.js +0 -138
- package/bpk-component-datepicker/examples.js +0 -660
- package/bpk-component-description-list/examples.js +0 -49
- package/bpk-component-dialog/examples.js +0 -182
- package/bpk-component-dialog/examples.module.css +0 -18
- package/bpk-component-dialog/stories.css +0 -1
- package/bpk-component-drawer/examples.js +0 -271
- package/bpk-component-drawer/examples.module.css +0 -18
- package/bpk-component-drawer/examples.module.scss +0 -34
- package/bpk-component-fieldset/examples.js +0 -527
- package/bpk-component-fieldset/examples.module.css +0 -18
- package/bpk-component-flare/examples.js +0 -158
- package/bpk-component-flare/examples.module.css +0 -18
- package/bpk-component-flare/examples.module.scss +0 -66
- package/bpk-component-form-validation/examples.js +0 -171
- package/bpk-component-form-validation/examples.module.css +0 -18
- package/bpk-component-form-validation/examples.module.scss +0 -39
- package/bpk-component-grid/examples.js +0 -796
- package/bpk-component-grid-toggle/examples.js +0 -25
- package/bpk-component-horizontal-nav/examples.js +0 -189
- package/bpk-component-horizontal-nav/examples.module.css +0 -18
- package/bpk-component-horizontal-nav/examples.module.scss +0 -48
- package/bpk-component-icon/examples.js +0 -152
- package/bpk-component-image/examples.js +0 -216
- package/bpk-component-infinite-scroll/examples.js +0 -279
- package/bpk-component-infinite-scroll/examples.module.css +0 -18
- package/bpk-component-infinite-scroll/examples.module.scss +0 -46
- package/bpk-component-input/examples.js +0 -490
- package/bpk-component-input/examples.module.css +0 -18
- package/bpk-component-input/examples.module.scss +0 -57
- package/bpk-component-label/examples.js +0 -67
- package/bpk-component-link/examples.js +0 -110
- package/bpk-component-list/examples.js +0 -56
- package/bpk-component-loading-button/examples.js +0 -660
- package/bpk-component-map/examples.js +0 -305
- package/bpk-component-mobile-scroll-container/examples.js +0 -76
- package/bpk-component-mobile-scroll-container/examples.module.css +0 -18
- package/bpk-component-mobile-scroll-container/examples.module.scss +0 -46
- package/bpk-component-modal/examples.js +0 -304
- package/bpk-component-modal/examples.module.css +0 -18
- package/bpk-component-modal/examples.module.scss +0 -35
- package/bpk-component-navigation-bar/AirlineLogo.js +0 -42
- package/bpk-component-navigation-bar/AirlineLogo.module.css +0 -18
- package/bpk-component-navigation-bar/AirlineLogo.module.scss +0 -27
- package/bpk-component-navigation-bar/examples.js +0 -193
- package/bpk-component-navigation-bar/examples.module.css +0 -18
- package/bpk-component-navigation-bar/examples.module.scss +0 -32
- package/bpk-component-navigation-stack/examples.js +0 -73
- package/bpk-component-navigation-stack/examples.module.css +0 -18
- package/bpk-component-navigation-stack/examples.module.scss +0 -43
- package/bpk-component-navigation-stack/stories-components.js +0 -202
- package/bpk-component-nudger/BpkNudgerStory.module.css +0 -18
- package/bpk-component-nudger/examples.js +0 -204
- package/bpk-component-overlay/examples.js +0 -163
- package/bpk-component-overlay/examples.module.css +0 -18
- package/bpk-component-overlay/examples.module.scss +0 -38
- package/bpk-component-pagination/examples.js +0 -93
- package/bpk-component-panel/examples.js +0 -63
- package/bpk-component-phone-input/examples.js +0 -181
- package/bpk-component-popover/examples.js +0 -267
- package/bpk-component-popover/examples.module.css +0 -18
- package/bpk-component-popover/examples.module.scss +0 -33
- package/bpk-component-progress/examples.js +0 -130
- package/bpk-component-progress/examples.module.css +0 -18
- package/bpk-component-progress/examples.module.scss +0 -29
- package/bpk-component-radio/examples.js +0 -126
- package/bpk-component-rating/examples.js +0 -373
- package/bpk-component-rating/examples.module.css +0 -18
- package/bpk-component-scrollable-calendar/examples.js +0 -383
- package/bpk-component-section-list/examples.js +0 -55
- package/bpk-component-select/examples.js +0 -274
- package/bpk-component-skip-link/examples.js +0 -40
- package/bpk-component-slider/examples.js +0 -122
- package/bpk-component-spinner/SpinnerLayout.js +0 -56
- package/bpk-component-spinner/SpinnerLayout.module.css +0 -18
- package/bpk-component-spinner/SpinnerLayout.module.scss +0 -36
- package/bpk-component-spinner/examples.js +0 -56
- package/bpk-component-star-rating/examples.js +0 -195
- package/bpk-component-switch/examples.js +0 -40
- package/bpk-component-table/examples.js +0 -97
- package/bpk-component-text/examples.js +0 -135
- package/bpk-component-text/examples.module.css +0 -18
- package/bpk-component-text/examples.module.scss +0 -25
- package/bpk-component-textarea/examples.js +0 -116
- package/bpk-component-ticket/examples.js +0 -203
- package/bpk-component-ticket/examples.module.css +0 -18
- package/bpk-component-ticket/examples.module.scss +0 -79
- package/bpk-component-tooltip/examples.js +0 -181
|
@@ -1,304 +0,0 @@
|
|
|
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
|
-
/* @flow strict */
|
|
20
|
-
|
|
21
|
-
import PropTypes from 'prop-types';
|
|
22
|
-
import React, { type Node, Component, type Element } from 'react';
|
|
23
|
-
import { cssModules, withDefaultProps } from '../bpk-react-utils';
|
|
24
|
-
import BpkButton from '../bpk-component-button';
|
|
25
|
-
import { BpkNavigationBarButtonLink } from '../bpk-component-navigation-bar';
|
|
26
|
-
import { withAlignment, withRtlSupport } from '../bpk-component-icon';
|
|
27
|
-
import ArrowIcon from '../bpk-component-icon/sm/long-arrow-left';
|
|
28
|
-
import BpkText, { TEXT_STYLES } from '../bpk-component-text';
|
|
29
|
-
import {
|
|
30
|
-
lineHeightBase,
|
|
31
|
-
iconSizeSm,
|
|
32
|
-
} from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
33
|
-
|
|
34
|
-
import STYLES from './examples.module.scss';
|
|
35
|
-
|
|
36
|
-
import BpkModal from './index';
|
|
37
|
-
|
|
38
|
-
const ArrowIconWithRtl = withAlignment(
|
|
39
|
-
withRtlSupport(ArrowIcon),
|
|
40
|
-
lineHeightBase,
|
|
41
|
-
iconSizeSm,
|
|
42
|
-
);
|
|
43
|
-
const getClassName = cssModules(STYLES);
|
|
44
|
-
|
|
45
|
-
const Paragraph = withDefaultProps(BpkText, {
|
|
46
|
-
textStyle: TEXT_STYLES.bodyDefault,
|
|
47
|
-
tagName: 'p',
|
|
48
|
-
className: getClassName('bpk-modal-paragraph'),
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const content = [
|
|
52
|
-
<Paragraph>
|
|
53
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut egestas sit amet
|
|
54
|
-
nisi nec ultrices. In efficitur justo ac tristique ultricies. Mauris luctus
|
|
55
|
-
felis arcu, a porttitor turpis aliquet faucibus. Aenean nibh nulla, dictum
|
|
56
|
-
sit amet efficitur cursus, molestie vitae enim. Aenean vel nunc purus.
|
|
57
|
-
Vestibulum consectetur luctus eros ac bibendum. Donec pretium nunc mi, sed
|
|
58
|
-
iaculis nibh aliquet in. Integer ut accumsan orci, non hendrerit nunc.
|
|
59
|
-
Quisque ante enim, convallis lacinia arcu eu, tincidunt dignissim nunc.
|
|
60
|
-
Nulla facilisi. Curabitur mattis sapien imperdiet, dignissim ligula id,
|
|
61
|
-
maximus erat. Morbi sed eros vitae augue accumsan dictum sit amet eu lectus.
|
|
62
|
-
Integer vitae consectetur libero, sed porttitor urna.
|
|
63
|
-
</Paragraph>,
|
|
64
|
-
<Paragraph>
|
|
65
|
-
In arcu leo, bibendum in vestibulum quis, vulputate sed nisl. Donec sit amet
|
|
66
|
-
turpis quis metus viverra rutrum id id elit. Duis luctus, mauris ut accumsan
|
|
67
|
-
vehicula, magna lorem posuere velit, nec laoreet magna ante ut nulla.
|
|
68
|
-
Vivamus vestibulum bibendum purus quis dictum. In accumsan convallis tempor.
|
|
69
|
-
Proin porta massa et metus viverra feugiat. Aenean blandit pellentesque
|
|
70
|
-
nunc, in interdum magna molestie non. Suspendisse pretium lectus et libero
|
|
71
|
-
fringilla placerat. Aliquam pellentesque odio non maximus egestas. Nam
|
|
72
|
-
feugiat mi ac neque sodales, in euismod dolor varius.
|
|
73
|
-
</Paragraph>,
|
|
74
|
-
<Paragraph>
|
|
75
|
-
Aenean tempus tempus lorem in consequat. Quisque nec felis vitae mi commodo
|
|
76
|
-
ultricies sit amet in lectus. Praesent imperdiet auctor nisl sit amet
|
|
77
|
-
ultricies. Donec posuere placerat nulla a scelerisque. Nulla sit amet
|
|
78
|
-
eleifend magna. Ut eu cursus metus, id pulvinar lectus. Proin euismod sed ex
|
|
79
|
-
vel dignissim. Donec faucibus nec risus eu pellentesque. Cras vulputate
|
|
80
|
-
varius volutpat. Duis ut nisi nulla. Duis volutpat lectus purus. Aliquam
|
|
81
|
-
placerat dignissim mauris vitae interdum. Donec venenatis mattis mi eu
|
|
82
|
-
facilisis. Maecenas pellentesque eros elementum, tincidunt tortor ac,
|
|
83
|
-
fringilla massa. Cras sed orci nec erat porttitor lacinia vitae sed arcu.
|
|
84
|
-
</Paragraph>,
|
|
85
|
-
<Paragraph>
|
|
86
|
-
Nunc lobortis arcu eget tellus tincidunt commodo. Phasellus ac tortor
|
|
87
|
-
turpis. Cras ac quam non metus iaculis sollicitudin. Vestibulum ante ipsum
|
|
88
|
-
primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi
|
|
89
|
-
aliquam consectetur nisl at fermentum. Phasellus nisi arcu, fermentum ut
|
|
90
|
-
malesuada eu, ultrices nec enim. Donec eleifend eros mauris, eu rutrum
|
|
91
|
-
tellus suscipit ac. Pellentesque finibus mollis arcu, non tempor lorem
|
|
92
|
-
gravida at. Nam laoreet neque quis gravida blandit. Mauris pharetra urna
|
|
93
|
-
hendrerit pretium auctor. Aliquam erat volutpat. Class aptent taciti
|
|
94
|
-
sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
|
|
95
|
-
Fusce quis felis non lectus egestas pretium id sed erat. Aliquam dapibus
|
|
96
|
-
erat sit amet facilisis luctus.
|
|
97
|
-
</Paragraph>,
|
|
98
|
-
<Paragraph>
|
|
99
|
-
Vestibulum convallis ut nulla in iaculis. Aliquam erat volutpat. Nullam non
|
|
100
|
-
semper sem. Ut gravida est eu nisi condimentum, lobortis gravida ipsum
|
|
101
|
-
tincidunt. Duis lacinia tincidunt suscipit. Maecenas tincidunt quam ipsum,
|
|
102
|
-
non sodales ante placerat in. Suspendisse malesuada auctor erat, vel
|
|
103
|
-
pulvinar erat dignissim vitae.
|
|
104
|
-
</Paragraph>,
|
|
105
|
-
];
|
|
106
|
-
|
|
107
|
-
class ModalContainer extends Component<
|
|
108
|
-
{
|
|
109
|
-
children: Node,
|
|
110
|
-
accessoryView: ?Element<any>,
|
|
111
|
-
buttonLabel: ?string,
|
|
112
|
-
wrapperProps: ?Object,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
isOpen: boolean,
|
|
116
|
-
},
|
|
117
|
-
> {
|
|
118
|
-
static propTypes = {
|
|
119
|
-
children: PropTypes.node.isRequired,
|
|
120
|
-
accessoryView: PropTypes.func,
|
|
121
|
-
buttonLabel: PropTypes.string,
|
|
122
|
-
wrapperProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
static defaultProps = {
|
|
126
|
-
accessoryView: null,
|
|
127
|
-
buttonLabel: null,
|
|
128
|
-
wrapperProps: null,
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
constructor() {
|
|
132
|
-
super();
|
|
133
|
-
|
|
134
|
-
this.state = {
|
|
135
|
-
isOpen: false,
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
onOpen = () => {
|
|
140
|
-
this.setState({
|
|
141
|
-
isOpen: true,
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
onClose = () => {
|
|
146
|
-
this.setState({
|
|
147
|
-
isOpen: false,
|
|
148
|
-
});
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
render() {
|
|
152
|
-
const { accessoryView, buttonLabel, children, wrapperProps, ...rest } =
|
|
153
|
-
this.props;
|
|
154
|
-
|
|
155
|
-
return (
|
|
156
|
-
<div id="modal-container" {...wrapperProps}>
|
|
157
|
-
<div id="pagewrap">
|
|
158
|
-
<BpkButton onClick={this.onOpen}>
|
|
159
|
-
{buttonLabel || 'Open modal'}
|
|
160
|
-
</BpkButton>
|
|
161
|
-
{/* $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'. */}
|
|
162
|
-
<BpkModal
|
|
163
|
-
id="my-modal"
|
|
164
|
-
className="my-classname"
|
|
165
|
-
isOpen={this.state.isOpen}
|
|
166
|
-
onClose={this.onClose}
|
|
167
|
-
getApplicationElement={() => document.getElementById('pagewrap')}
|
|
168
|
-
renderTarget={() => document.getElementById('modal-container')}
|
|
169
|
-
accessoryView={accessoryView}
|
|
170
|
-
{...rest}
|
|
171
|
-
>
|
|
172
|
-
{children}
|
|
173
|
-
</BpkModal>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
const DefaultExample = () => (
|
|
181
|
-
<ModalContainer title="Modal title" closeLabel="Close modal">
|
|
182
|
-
This is a default modal. You can put anything you want in here.
|
|
183
|
-
</ModalContainer>
|
|
184
|
-
);
|
|
185
|
-
|
|
186
|
-
const WideExample = () => (
|
|
187
|
-
<ModalContainer title="Modal title" closeLabel="Close modal" wide>
|
|
188
|
-
This is a wide modal.
|
|
189
|
-
</ModalContainer>
|
|
190
|
-
);
|
|
191
|
-
|
|
192
|
-
const OverflowingExample = () => (
|
|
193
|
-
<ModalContainer title="Modal title" closeLabel="Close modal">
|
|
194
|
-
{React.Children.toArray(content)}
|
|
195
|
-
</ModalContainer>
|
|
196
|
-
);
|
|
197
|
-
|
|
198
|
-
const CloseButtonTextExample = () => (
|
|
199
|
-
<ModalContainer title="Modal title" closeText="Done">
|
|
200
|
-
This is a default modal. You can put anything you want in here.
|
|
201
|
-
</ModalContainer>
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
const LongTitleExample = () => (
|
|
205
|
-
<ModalContainer
|
|
206
|
-
title="We have to remember what's important in life: friends, waffles, and work. Or waffles, friends, work. But work has to come third."
|
|
207
|
-
closeText="Done"
|
|
208
|
-
>
|
|
209
|
-
This is a default modal. You can put anything you want in here.
|
|
210
|
-
</ModalContainer>
|
|
211
|
-
);
|
|
212
|
-
|
|
213
|
-
const NotFullScreenOnMobileExample = () => (
|
|
214
|
-
<ModalContainer
|
|
215
|
-
title="Modal title"
|
|
216
|
-
closeLabel="Close modal"
|
|
217
|
-
fullScreenOnMobile={false}
|
|
218
|
-
>
|
|
219
|
-
This is a default modal. You can put anything you want in here.
|
|
220
|
-
</ModalContainer>
|
|
221
|
-
);
|
|
222
|
-
|
|
223
|
-
const FullScreenExample = () => (
|
|
224
|
-
<ModalContainer title="Modal title" closeLabel="Close modal" fullScreen>
|
|
225
|
-
This is a default modal. You can put anything you want in here.
|
|
226
|
-
</ModalContainer>
|
|
227
|
-
);
|
|
228
|
-
|
|
229
|
-
const FullScreenOverflowingExample = () => (
|
|
230
|
-
<ModalContainer title="Modal title" closeLabel="Close modal" fullScreen>
|
|
231
|
-
{React.Children.toArray(content)}
|
|
232
|
-
</ModalContainer>
|
|
233
|
-
);
|
|
234
|
-
|
|
235
|
-
const NestedExample = () => (
|
|
236
|
-
<ModalContainer title="Modal title" closeLabel="Close modal" fullScreen>
|
|
237
|
-
This is a full-screen modal. You can put anything you want in here,
|
|
238
|
-
including other modals!
|
|
239
|
-
<ModalContainer
|
|
240
|
-
title="Inner modal title"
|
|
241
|
-
closeLabel="Close modal"
|
|
242
|
-
wrapperProps={{ id: 'inner-modal-container' }}
|
|
243
|
-
buttonLabel="Open another modal from this modal"
|
|
244
|
-
id="inner-modal"
|
|
245
|
-
renderTarget={() => document.getElementById('inner-modal-container')}
|
|
246
|
-
>
|
|
247
|
-
This is a default modal. You can put anything you want in here.
|
|
248
|
-
</ModalContainer>
|
|
249
|
-
</ModalContainer>
|
|
250
|
-
);
|
|
251
|
-
|
|
252
|
-
const NoHeaderExample = () => (
|
|
253
|
-
<ModalContainer
|
|
254
|
-
title="Modal title"
|
|
255
|
-
closeLabel="Close modal"
|
|
256
|
-
showHeader={false}
|
|
257
|
-
>
|
|
258
|
-
This is a default modal. You can put anything you want in here.
|
|
259
|
-
</ModalContainer>
|
|
260
|
-
);
|
|
261
|
-
|
|
262
|
-
const NoPaddingExample = () => (
|
|
263
|
-
<ModalContainer title="Modal title" closeLabel="Close modal" padded={false}>
|
|
264
|
-
This is a default modal. You can put anything you want in here.
|
|
265
|
-
</ModalContainer>
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
const WithAccessoryViewExample = () => (
|
|
269
|
-
<ModalContainer
|
|
270
|
-
title="Modal title"
|
|
271
|
-
closeLabel="Close modal"
|
|
272
|
-
accessoryView={
|
|
273
|
-
<BpkNavigationBarButtonLink
|
|
274
|
-
label="Close"
|
|
275
|
-
onClick={() => {}}
|
|
276
|
-
className={getClassName('bpk-modal__leading-button')}
|
|
277
|
-
>
|
|
278
|
-
<div>
|
|
279
|
-
<BpkText>
|
|
280
|
-
<ArrowIconWithRtl /> Back to results
|
|
281
|
-
</BpkText>
|
|
282
|
-
</div>
|
|
283
|
-
</BpkNavigationBarButtonLink>
|
|
284
|
-
}
|
|
285
|
-
>
|
|
286
|
-
The left hand button is intentally not functional. You can put anything you
|
|
287
|
-
want in here.
|
|
288
|
-
</ModalContainer>
|
|
289
|
-
);
|
|
290
|
-
|
|
291
|
-
export {
|
|
292
|
-
DefaultExample,
|
|
293
|
-
WideExample,
|
|
294
|
-
OverflowingExample,
|
|
295
|
-
CloseButtonTextExample,
|
|
296
|
-
LongTitleExample,
|
|
297
|
-
NotFullScreenOnMobileExample,
|
|
298
|
-
FullScreenExample,
|
|
299
|
-
FullScreenOverflowingExample,
|
|
300
|
-
NestedExample,
|
|
301
|
-
NoHeaderExample,
|
|
302
|
-
NoPaddingExample,
|
|
303
|
-
WithAccessoryViewExample,
|
|
304
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-modal-paragraph{margin-bottom:0.5rem}.bpk-modal__leading-button{color:#0770e3;fill:#0770e3}.bpk-modal__leading-button :hover{color:#084eb2;fill:#084eb2}
|
|
@@ -1,35 +0,0 @@
|
|
|
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 '~bpk-mixins';
|
|
20
|
-
|
|
21
|
-
$bpk-spacing-v2: true;
|
|
22
|
-
|
|
23
|
-
.bpk-modal-paragraph {
|
|
24
|
-
margin-bottom: bpk-spacing-md();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.bpk-modal__leading-button {
|
|
28
|
-
color: $bpk-color-sky-blue;
|
|
29
|
-
fill: $bpk-color-sky-blue;
|
|
30
|
-
|
|
31
|
-
:hover {
|
|
32
|
-
color: $bpk-color-sky-blue-shade-01;
|
|
33
|
-
fill: $bpk-color-sky-blue-shade-01;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
/* @flow strict */
|
|
20
|
-
|
|
21
|
-
import React from 'react';
|
|
22
|
-
import { cssModules } from '../bpk-react-utils';
|
|
23
|
-
|
|
24
|
-
import STYLES from './AirlineLogo.module.scss';
|
|
25
|
-
|
|
26
|
-
const getClassNames = cssModules(STYLES);
|
|
27
|
-
|
|
28
|
-
const AirlineLogo = () => (
|
|
29
|
-
<span>
|
|
30
|
-
<svg
|
|
31
|
-
width="110px"
|
|
32
|
-
height="13px"
|
|
33
|
-
viewBox="0 0 110 13"
|
|
34
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
35
|
-
className={getClassNames('bpk-airline-logo')}
|
|
36
|
-
>
|
|
37
|
-
<path d="M28.412,7.584 L31.372,7.584 L29.932,3.392 L29.9,3.392 L28.412,7.584 Z M28.652,0.576 L31.228,0.576 L35.5,12 L32.892,12 L32.028,9.456 L27.756,9.456 L26.86,12 L24.332,12 L28.652,0.576 Z M38.588,2.448 L36.316,2.448 L36.316,0.576 L38.588,0.576 L38.588,2.448 Z M36.316,3.728 L38.588,3.728 L38.588,12 L36.316,12 L36.316,3.728 Z M40.38,3.728 L42.54,3.728 L42.54,5.264 L42.572,5.264 C42.6786672,5.00799872 42.8226658,4.77066776 43.004,4.552 C43.1853342,4.33333224 43.3933322,4.14666744 43.628,3.992 C43.8626678,3.83733256 44.113332,3.71733376 44.38,3.632 C44.646668,3.54666624 44.9239986,3.504 45.212,3.504 C45.3613341,3.504 45.5266658,3.5306664 45.708,3.584 L45.708,5.696 C45.6013328,5.67466656 45.4733341,5.65600008 45.324,5.64 C45.1746659,5.62399992 45.0306674,5.616 44.892,5.616 C44.4759979,5.616 44.1240014,5.68533264 43.836,5.824 C43.5479986,5.96266736 43.3160009,6.1519988 43.14,6.392 C42.9639991,6.6320012 42.838667,6.9119984 42.764,7.232 C42.689333,7.5520016 42.652,7.8986648 42.652,8.272 L42.652,12 L40.38,12 L40.38,3.728 Z M46.668,0.576 L48.94,0.576 L48.94,12 L46.668,12 L46.668,0.576 Z M53.068,2.448 L50.796,2.448 L50.796,0.576 L53.068,0.576 L53.068,2.448 Z M50.796,3.728 L53.068,3.728 L53.068,12 L50.796,12 L50.796,3.728 Z M54.86,3.728 L57.02,3.728 L57.02,4.88 L57.068,4.88 C57.3560014,4.3999976 57.729331,4.05066776 58.188,3.832 C58.646669,3.61333224 59.1159976,3.504 59.596,3.504 C60.204003,3.504 60.7026647,3.58666584 61.092,3.752 C61.4813353,3.91733416 61.7879989,4.1466652 62.012,4.44 C62.2360011,4.7333348 62.3933329,5.09066456 62.484,5.512 C62.5746671,5.93333544 62.62,6.39999744 62.62,6.912 L62.62,12 L60.348,12 L60.348,7.328 C60.348,6.64532992 60.2413344,6.13600168 60.028,5.8 C59.8146656,5.46399832 59.4360027,5.296 58.892,5.296 C58.2733302,5.296 57.8253347,5.47999816 57.548,5.848 C57.2706653,6.21600184 57.132,6.82132912 57.132,7.664 L57.132,12 L54.86,12 L54.86,3.728 Z M69.916,6.976 C69.8093328,6.39999712 69.6200014,5.96266816 69.348,5.664 C69.0759986,5.36533184 68.6626694,5.216 68.108,5.216 C67.7453315,5.216 67.4440012,5.27733272 67.204,5.4 C66.9639988,5.52266728 66.7720007,5.67466576 66.628,5.856 C66.4839993,6.03733424 66.382667,6.22933232 66.324,6.432 C66.265333,6.63466768 66.2306667,6.8159992 66.22,6.976 L69.916,6.976 Z M66.22,8.416 C66.2520002,9.15200368 66.438665,9.68533168 66.78,10.016 C67.121335,10.3466683 67.6119968,10.512 68.252,10.512 C68.710669,10.512 69.1053317,10.3973345 69.436,10.168 C69.7666683,9.93866552 69.969333,9.69600128 70.044,9.44 L72.044,9.44 C71.7239984,10.432005 71.2333366,11.1413312 70.572,11.568 C69.9106634,11.9946688 69.1106714,12.208 68.172,12.208 C67.5213301,12.208 66.9346693,12.104001 66.412,11.896 C65.8893307,11.687999 65.4466685,11.3920019 65.084,11.008 C64.7213315,10.6239981 64.4413343,10.165336 64.244,9.632 C64.0466657,9.098664 63.948,8.5120032 63.948,7.872 C63.948,7.25333024 64.0493323,6.677336 64.252,6.144 C64.4546677,5.610664 64.7426648,5.14933528 65.116,4.76 C65.4893352,4.37066472 65.9346641,4.06400112 66.452,3.84 C66.9693359,3.61599888 67.5426635,3.504 68.172,3.504 C68.8760035,3.504 69.4893307,3.63999864 70.012,3.912 C70.5346693,4.18400136 70.9639983,4.54933104 71.3,5.008 C71.6360017,5.46666896 71.8786659,5.9893304 72.028,6.576 C72.1773341,7.1626696 72.2306669,7.7759968 72.188,8.416 L66.22,8.416 Z M73.628,9.536 L76.14,9.536 L76.14,12 L73.628,12 L73.628,9.536 Z M83.612,6.64 C83.4626659,5.69066192 82.9026715,5.216 81.932,5.216 C81.5693315,5.216 81.2653346,5.29866584 81.02,5.464 C80.7746654,5.62933416 80.5746674,5.84266536 80.42,6.104 C80.2653326,6.36533464 80.1560003,6.65333176 80.092,6.968 C80.0279997,7.28266824 79.996,7.59466512 79.996,7.904 C79.996,8.20266816 80.0279997,8.50666512 80.092,8.816 C80.1560003,9.12533488 80.2599993,9.40533208 80.404,9.656 C80.5480007,9.90666792 80.7426654,10.1119992 80.988,10.272 C81.2333346,10.4320008 81.5319982,10.512 81.884,10.512 C82.4280027,10.512 82.8466652,10.3600015 83.14,10.056 C83.4333348,9.75199848 83.617333,9.34400256 83.692,8.832 L85.884,8.832 C85.7346659,9.93067216 85.3080035,10.7679971 84.604,11.344 C83.8999965,11.9200029 82.9986722,12.208 81.9,12.208 C81.2813302,12.208 80.7133359,12.104001 80.196,11.896 C79.6786641,11.687999 79.2386685,11.3973352 78.876,11.024 C78.5133315,10.6506648 78.2306677,10.2053359 78.028,9.688 C77.8253323,9.17066408 77.724,8.60266976 77.724,7.984 C77.724,7.3439968 77.8173324,6.74933608 78.004,6.2 C78.1906676,5.65066392 78.4653315,5.176002 78.828,4.776 C79.1906685,4.375998 79.6333307,4.06400112 80.156,3.84 C80.6786693,3.61599888 81.2759966,3.504 81.948,3.504 C82.4386691,3.504 82.9106644,3.56799936 83.364,3.696 C83.8173356,3.82400064 84.2226649,4.01866536 84.58,4.28 C84.9373351,4.54133464 85.2279989,4.86666472 85.452,5.256 C85.6760011,5.64533528 85.8039998,6.106664 85.836,6.64 L83.612,6.64 Z M89.18,7.872 C89.18,8.20266832 89.2119997,8.52533176 89.276,8.84 C89.3400003,9.15466824 89.4493326,9.43733208 89.604,9.688 C89.7586674,9.93866792 89.9639987,10.1386659 90.22,10.288 C90.4760013,10.4373341 90.7959981,10.512 91.18,10.512 C91.5640019,10.512 91.8866654,10.4373341 92.148,10.288 C92.4093346,10.1386659 92.6173326,9.93866792 92.772,9.688 C92.9266674,9.43733208 93.0359997,9.15466824 93.1,8.84 C93.1640003,8.52533176 93.196,8.20266832 93.196,7.872 C93.196,7.54133168 93.1640003,7.2160016 93.1,6.896 C93.0359997,6.5759984 92.9266674,6.29333456 92.772,6.048 C92.6173326,5.80266544 92.4093346,5.60266744 92.148,5.448 C91.8866654,5.29333256 91.5640019,5.216 91.18,5.216 C90.7959981,5.216 90.4760013,5.29333256 90.22,5.448 C89.9639987,5.60266744 89.7586674,5.80266544 89.604,6.048 C89.4493326,6.29333456 89.3400003,6.5759984 89.276,6.896 C89.2119997,7.2160016 89.18,7.54133168 89.18,7.872 Z M86.908,7.872 C86.908,7.21066336 87.0093323,6.61066936 87.212,6.072 C87.4146677,5.53333064 87.7026648,5.07466856 88.076,4.696 C88.4493352,4.31733144 88.8973307,4.02400104 89.42,3.816 C89.9426693,3.60799896 90.5293301,3.504 91.18,3.504 C91.8306699,3.504 92.4199974,3.60799896 92.948,3.816 C93.4760026,4.02400104 93.9266648,4.31733144 94.3,4.696 C94.6733352,5.07466856 94.9613323,5.53333064 95.164,6.072 C95.3666677,6.61066936 95.468,7.21066336 95.468,7.872 C95.468,8.53333664 95.3666677,9.130664 95.164,9.664 C94.9613323,10.197336 94.6733352,10.6533314 94.3,11.032 C93.9266648,11.4106686 93.4760026,11.7013323 92.948,11.904 C92.4199974,12.1066677 91.8306699,12.208 91.18,12.208 C90.5293301,12.208 89.9426693,12.1066677 89.42,11.904 C88.8973307,11.7013323 88.4493352,11.4106686 88.076,11.032 C87.7026648,10.6533314 87.4146677,10.197336 87.212,9.664 C87.0093323,9.130664 86.908,8.53333664 86.908,7.872 Z M97.004,3.728 L99.148,3.728 L99.148,4.848 L99.18,4.848 C99.4786682,4.4213312 99.8386646,4.09066784 100.26,3.856 C100.681335,3.62133216 101.163997,3.504 101.708,3.504 C102.230669,3.504 102.707998,3.60533232 103.14,3.808 C103.572002,4.01066768 103.899999,4.36799744 104.124,4.88 C104.369335,4.51733152 104.702665,4.19733472 105.124,3.92 C105.545335,3.64266528 106.043997,3.504 106.62,3.504 C107.057336,3.504 107.462665,3.5573328 107.836,3.664 C108.209335,3.7706672 108.529332,3.94133216 108.796,4.176 C109.062668,4.41066784 109.270666,4.71733144 109.42,5.096 C109.569334,5.47466856 109.644,5.930664 109.644,6.464 L109.644,12 L107.372,12 L107.372,7.312 C107.372,7.03466528 107.361333,6.77333456 107.34,6.528 C107.318667,6.28266544 107.26,6.06933424 107.164,5.888 C107.068,5.70666576 106.926668,5.5626672 106.74,5.456 C106.553332,5.3493328 106.300002,5.296 105.98,5.296 C105.659998,5.296 105.401334,5.35733272 105.204,5.48 C105.006666,5.60266728 104.852001,5.76266568 104.74,5.96 C104.627999,6.15733432 104.553334,6.38133208 104.516,6.632 C104.478666,6.88266792 104.46,7.13599872 104.46,7.392 L104.46,12 L102.188,12 L102.188,7.36 C102.188,7.11466544 102.182667,6.8720012 102.172,6.632 C102.161333,6.3919988 102.116,6.17066768 102.036,5.968 C101.956,5.76533232 101.822668,5.60266728 101.636,5.48 C101.449332,5.35733272 101.174668,5.296 100.812,5.296 C100.705333,5.296 100.564001,5.31999976 100.388,5.368 C100.211999,5.41600024 100.041334,5.506666 99.876,5.64 C99.7106658,5.773334 99.5693339,5.96533208 99.452,6.216 C99.3346661,6.46666792 99.276,6.79466464 99.276,7.2 L99.276,12 L97.004,12 L97.004,3.728 Z M6.5,11.6 L16.9,1.1 C17.2,0.8 17.6,0.6 18.1,0.6 L19.3,0.6 C19.8,0.6 20.1,1.1 19.9,1.6 L16.1,11.6 L6.5,11.6 Z M12,3.4 L10.7,6.3 L5.5,11.6 L7.10542736e-15,11.6 L9.2,3 C9.5,2.7 9.9,2.6 10.3,2.6 L11.4,2.6 C11.9,2.6 12.2,3 12,3.4 Z" />
|
|
38
|
-
</svg>
|
|
39
|
-
</span>
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export default AirlineLogo;
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-airline-logo{fill:#fff;fill:var(--bpk-navigation-bar-title-color, #fff)}
|
|
@@ -1,27 +0,0 @@
|
|
|
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 '~bpk-mixins/index';
|
|
20
|
-
|
|
21
|
-
.bpk-airline-logo {
|
|
22
|
-
@include bpk-themeable-property(
|
|
23
|
-
fill,
|
|
24
|
-
--bpk-navigation-bar-title-color,
|
|
25
|
-
$bpk-color-white
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,193 +0,0 @@
|
|
|
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
|
-
/* @flow strict */
|
|
20
|
-
|
|
21
|
-
import React from 'react';
|
|
22
|
-
import { action } from '../bpk-storybook-utils';
|
|
23
|
-
import { withRtlSupport } from '../bpk-component-icon';
|
|
24
|
-
import ArrowIcon from '../bpk-component-icon/sm/long-arrow-left';
|
|
25
|
-
import CloseIcon from '../bpk-component-icon/sm/close';
|
|
26
|
-
import { cssModules } from '../bpk-react-utils';
|
|
27
|
-
|
|
28
|
-
import STYLES from './examples.module.scss';
|
|
29
|
-
import AirlineLogo from './AirlineLogo';
|
|
30
|
-
|
|
31
|
-
import BpkNavigationBar, {
|
|
32
|
-
BpkNavigationBarButtonLink,
|
|
33
|
-
BpkNavigationBarIconButton,
|
|
34
|
-
} from './index';
|
|
35
|
-
|
|
36
|
-
const getClassNames = cssModules(STYLES);
|
|
37
|
-
const ArrowIconWithRtl = withRtlSupport(ArrowIcon);
|
|
38
|
-
|
|
39
|
-
const DefaultExample = () => (
|
|
40
|
-
<div className={getClassNames('bpk-navigation-bar-story')}>
|
|
41
|
-
<BpkNavigationBar
|
|
42
|
-
id="test"
|
|
43
|
-
title="Backpack"
|
|
44
|
-
leadingButton={
|
|
45
|
-
<BpkNavigationBarIconButton
|
|
46
|
-
onClick={action('back clicked')}
|
|
47
|
-
icon={ArrowIconWithRtl}
|
|
48
|
-
label="back"
|
|
49
|
-
/>
|
|
50
|
-
}
|
|
51
|
-
trailingButton={
|
|
52
|
-
<BpkNavigationBarIconButton
|
|
53
|
-
onClick={action('close clicked')}
|
|
54
|
-
icon={CloseIcon}
|
|
55
|
-
label="close"
|
|
56
|
-
/>
|
|
57
|
-
}
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
const LeadingIconOnlyExample = () => (
|
|
63
|
-
<div className={getClassNames('bpk-navigation-bar-story')}>
|
|
64
|
-
<BpkNavigationBar
|
|
65
|
-
id="test"
|
|
66
|
-
title="Backpack"
|
|
67
|
-
leadingButton={
|
|
68
|
-
<BpkNavigationBarIconButton
|
|
69
|
-
onClick={action('back clicked')}
|
|
70
|
-
icon={ArrowIconWithRtl}
|
|
71
|
-
label="back"
|
|
72
|
-
/>
|
|
73
|
-
}
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
const TrailingIconOnlyExample = () => (
|
|
79
|
-
<div className={getClassNames('bpk-navigation-bar-story')}>
|
|
80
|
-
<BpkNavigationBar
|
|
81
|
-
id="test"
|
|
82
|
-
title="Backpack"
|
|
83
|
-
trailingButton={
|
|
84
|
-
<BpkNavigationBarIconButton
|
|
85
|
-
onClick={action('close clicked')}
|
|
86
|
-
icon={CloseIcon}
|
|
87
|
-
label="close"
|
|
88
|
-
/>
|
|
89
|
-
}
|
|
90
|
-
/>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
const WithLinksExample = () => (
|
|
95
|
-
<div className={getClassNames('bpk-navigation-bar-story')}>
|
|
96
|
-
<BpkNavigationBar
|
|
97
|
-
id="test"
|
|
98
|
-
title="Backpack"
|
|
99
|
-
leadingButton={
|
|
100
|
-
<BpkNavigationBarIconButton
|
|
101
|
-
onClick={action('back clicked')}
|
|
102
|
-
icon={ArrowIconWithRtl}
|
|
103
|
-
label="back"
|
|
104
|
-
/>
|
|
105
|
-
}
|
|
106
|
-
trailingButton={
|
|
107
|
-
<BpkNavigationBarButtonLink onClick={action('done clicked')}>
|
|
108
|
-
Done
|
|
109
|
-
</BpkNavigationBarButtonLink>
|
|
110
|
-
}
|
|
111
|
-
/>
|
|
112
|
-
</div>
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
const WithLogoExample = () => (
|
|
116
|
-
<div className={getClassNames('bpk-navigation-bar-story')}>
|
|
117
|
-
<BpkNavigationBar
|
|
118
|
-
id="test"
|
|
119
|
-
title={<AirlineLogo />}
|
|
120
|
-
leadingButton={
|
|
121
|
-
<BpkNavigationBarIconButton
|
|
122
|
-
onClick={action('back clicked')}
|
|
123
|
-
icon={ArrowIconWithRtl}
|
|
124
|
-
label="back"
|
|
125
|
-
/>
|
|
126
|
-
}
|
|
127
|
-
trailingButton={
|
|
128
|
-
<BpkNavigationBarButtonLink onClick={action('done clicked')}>
|
|
129
|
-
Done
|
|
130
|
-
</BpkNavigationBarButtonLink>
|
|
131
|
-
}
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
const StickyExample = () => {
|
|
137
|
-
const items = [];
|
|
138
|
-
for (let i = 0; i < 5; i += 1) {
|
|
139
|
-
items.push(
|
|
140
|
-
<li>Curabitur congue leo non viverra tristique</li>,
|
|
141
|
-
<li>Orci varius natoque penatibus</li>,
|
|
142
|
-
<li>Duis pellentesque dictum lectus</li>,
|
|
143
|
-
<li>Sit amet egestas velit gravida et</li>,
|
|
144
|
-
<li>Donec porttitor libero sem</li>,
|
|
145
|
-
<li>Id efficitur massa sagittis venenatis</li>,
|
|
146
|
-
<li>Interdum et malesuada fames ac ante</li>,
|
|
147
|
-
<li>Primis in faucibus</li>,
|
|
148
|
-
<li>In ullamcorper tristique lectus</li>,
|
|
149
|
-
<li>Class aptent taciti sociosqu</li>,
|
|
150
|
-
<li>Maecenas vitae diam posuere</li>,
|
|
151
|
-
<li>Donec mattis lorem ante ut eleifend</li>,
|
|
152
|
-
<li>Donec quis ex rhoncus dapibus</li>,
|
|
153
|
-
<li>Mauris bibendum accumsan tincidunt</li>,
|
|
154
|
-
<li>Pellentesque habitant morbi tristique senectus</li>,
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
return (
|
|
158
|
-
<div
|
|
159
|
-
className={getClassNames('bpk-navigation-bar-story')}
|
|
160
|
-
style={{ marginTop: '40px' }}
|
|
161
|
-
>
|
|
162
|
-
<BpkNavigationBar
|
|
163
|
-
id="test"
|
|
164
|
-
title="Sticky"
|
|
165
|
-
sticky
|
|
166
|
-
leadingButton={
|
|
167
|
-
<BpkNavigationBarIconButton
|
|
168
|
-
onClick={action('back clicked')}
|
|
169
|
-
icon={ArrowIconWithRtl}
|
|
170
|
-
label="back"
|
|
171
|
-
/>
|
|
172
|
-
}
|
|
173
|
-
trailingButton={
|
|
174
|
-
<BpkNavigationBarIconButton
|
|
175
|
-
onClick={action('close clicked')}
|
|
176
|
-
icon={CloseIcon}
|
|
177
|
-
label="close"
|
|
178
|
-
/>
|
|
179
|
-
}
|
|
180
|
-
/>
|
|
181
|
-
<ul>{items}</ul>
|
|
182
|
-
</div>
|
|
183
|
-
);
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
export {
|
|
187
|
-
DefaultExample,
|
|
188
|
-
LeadingIconOnlyExample,
|
|
189
|
-
TrailingIconOnlyExample,
|
|
190
|
-
WithLinksExample,
|
|
191
|
-
WithLogoExample,
|
|
192
|
-
StickyExample,
|
|
193
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar-story{padding:.0625rem .0625rem 5rem;background-color:#f1f2f8;box-shadow:0 0 0 1px #f1f2f8 inset}.bpk-navigation-bar-story>*{margin-bottom:1rem}
|