@skyscanner/backpack-web 33.3.1 → 34.0.0-premajor
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-component-accordion/index.js +1 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +12 -13
- package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +5 -3
- package/bpk-component-banner-alert/index.js +1 -1
- package/bpk-component-banner-alert/src/AnimateAndFade.js +37 -35
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +12 -6
- package/bpk-component-barchart/src/BpkBarchart.js +9 -10
- package/bpk-component-barchart/src/BpkBarchartBar.js +1 -2
- package/bpk-component-barchart/src/BpkBarchartBars.js +2 -2
- package/bpk-component-barchart/src/BpkBarchartDefs.js +1 -2
- package/bpk-component-barchart/src/BpkChartAxis.js +1 -2
- package/bpk-component-barchart/src/BpkChartDataTable.js +1 -2
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +4 -6
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +1 -2
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +18 -14
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
- package/bpk-component-breakpoint/index.d.ts +2 -1
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +5 -19
- package/bpk-component-breakpoint/src/useMediaQuery.js +10 -12
- package/bpk-component-button/index.js +5 -5
- package/bpk-component-button/src/BpkButtonDestructive.js +10 -9
- package/bpk-component-button/src/BpkButtonFeatured.js +10 -9
- package/bpk-component-button/src/BpkButtonLink.js +11 -10
- package/bpk-component-button/src/BpkButtonLinkOnDark.js +11 -10
- package/bpk-component-button/src/BpkButtonPrimary.js +2 -2
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +10 -9
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +10 -9
- package/bpk-component-button/src/BpkButtonSecondary.js +10 -10
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +10 -9
- package/bpk-component-calendar/index.js +1 -1
- package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -3
- package/bpk-component-calendar/src/BpkCalendarGrid.js +3 -2
- package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +4 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +6 -4
- package/bpk-component-calendar/src/BpkCalendarNav.js +10 -5
- package/bpk-component-calendar/src/Week.js +6 -3
- package/bpk-component-calendar/src/composeCalendar.js +9 -4
- package/bpk-component-calendar/src/date-utils.js +14 -14
- package/bpk-component-card/src/BpkCardWrapper.js +1 -2
- package/bpk-component-card/src/BpkDividedCard.js +19 -15
- package/bpk-component-card-button/src/BpkSaveButton.js +14 -6
- package/bpk-component-checkbox/src/BpkCheckbox.js +1 -2
- package/bpk-component-chip/index.d.ts +3 -5
- package/bpk-component-chip/index.js +3 -2
- package/bpk-component-chip/src/BpkDismissibleChip.js +7 -2
- package/bpk-component-chip/src/BpkIconChip.d.ts +25 -0
- package/bpk-component-chip/src/BpkIconChip.js +31 -0
- package/bpk-component-chip/src/BpkSelectableChip.d.ts +0 -2
- package/bpk-component-chip/src/BpkSelectableChip.js +5 -6
- package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
- package/bpk-component-chip/src/commonTypes.d.ts +1 -1
- package/bpk-component-chip/src/commonTypes.js +1 -24
- package/bpk-component-close-button/src/BpkCloseButton.js +3 -2
- package/bpk-component-close-button/src/BpkCloseButton.module.css +1 -1
- package/bpk-component-content-cards/src/BpkContentCard.js +9 -4
- package/bpk-component-content-cards/src/BpkContentCards.js +2 -7
- package/bpk-component-content-cards/src/BpkContentCards.module.css +1 -1
- package/bpk-component-datatable/src/BpkDataTable.js +4 -4
- package/bpk-component-datatable/src/BpkDataTableHeader.js +14 -11
- package/bpk-component-datatable/src/BpkDataTableHeader.module.css +1 -1
- package/bpk-component-datepicker/src/BpkDatepicker.js +3 -5
- package/bpk-component-description-list/index.js +1 -1
- package/bpk-component-description-list/src/ComponentFactory.js +10 -5
- package/bpk-component-dialog/src/BpkDialog.js +7 -6
- package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
- package/bpk-component-dialog/src/BpkDialogInner.js +7 -5
- package/bpk-component-drawer/src/BpkDrawer.js +1 -4
- package/bpk-component-drawer/src/BpkDrawerContent.js +8 -7
- package/bpk-component-fieldset/src/BpkFieldset.js +10 -9
- package/bpk-component-flare/index.js +2 -2
- package/bpk-component-flare/src/BpkContentBubble.js +5 -3
- package/bpk-component-flare/src/BpkFlareBar.js +15 -7
- package/bpk-component-flare/src/__generated__/corner-radius.d.ts +6 -0
- package/bpk-component-flare/src/__generated__/pointer.d.ts +6 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +10 -4
- package/bpk-component-form-validation/src/BpkFormValidation.js +6 -6
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +10 -14
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +1 -1
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +8 -6
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +16 -14
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +1 -1
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -2
- package/bpk-component-icon/index.js +1 -1
- package/bpk-component-icon/lg/aircraft.js +1 -2
- package/bpk-component-icon/lg/beach.js +1 -2
- package/bpk-component-icon/lg/call-back.js +1 -2
- package/bpk-component-icon/lg/camper-van.js +1 -2
- package/bpk-component-icon/lg/car-wash.js +1 -2
- package/bpk-component-icon/lg/cars.js +1 -2
- package/bpk-component-icon/lg/clean.js +1 -2
- package/bpk-component-icon/lg/cloakroom.js +1 -2
- package/bpk-component-icon/lg/content--copy.js +1 -2
- package/bpk-component-icon/lg/data.js +1 -2
- package/bpk-component-icon/lg/depart.js +1 -2
- package/bpk-component-icon/lg/download.js +1 -2
- package/bpk-component-icon/lg/education.js +1 -2
- package/bpk-component-icon/lg/explore.js +1 -2
- package/bpk-component-icon/lg/fast-track.js +1 -2
- package/bpk-component-icon/lg/fast-train.js +1 -2
- package/bpk-component-icon/lg/flight-landing.js +1 -2
- package/bpk-component-icon/lg/flight-takeoff.js +1 -2
- package/bpk-component-icon/lg/flight.js +1 -2
- package/bpk-component-icon/lg/legroom--extra.js +1 -2
- package/bpk-component-icon/lg/legroom--normal.js +1 -2
- package/bpk-component-icon/lg/legroom--reduced.js +1 -2
- package/bpk-component-icon/lg/logout.js +1 -2
- package/bpk-component-icon/lg/lounge.js +1 -2
- package/bpk-component-icon/lg/mail.js +1 -2
- package/bpk-component-icon/lg/mileage.js +1 -2
- package/bpk-component-icon/lg/new-window.js +1 -2
- package/bpk-component-icon/lg/plane-seat.js +1 -2
- package/bpk-component-icon/lg/return.js +1 -2
- package/bpk-component-icon/lg/scales.js +1 -2
- package/bpk-component-icon/lg/share--ios.js +1 -2
- package/bpk-component-icon/lg/social-distancing.js +1 -2
- package/bpk-component-icon/lg/speaker.js +1 -2
- package/bpk-component-icon/lg/taxi.js +1 -2
- package/bpk-component-icon/lg/unmute.js +1 -2
- package/bpk-component-icon/lg/wallet.js +1 -2
- package/bpk-component-icon/lg/weather--cloudy.js +1 -2
- package/bpk-component-icon/lg/weather--partly-cloudy.js +1 -2
- package/bpk-component-icon/lg/weather--rain.js +1 -2
- package/bpk-component-icon/lg/weather--thunderstorm.js +1 -2
- package/bpk-component-icon/lg/window--reduce.js +1 -2
- package/bpk-component-icon/lg/world--emea.js +1 -2
- package/bpk-component-icon/sm/aircraft.js +1 -2
- package/bpk-component-icon/sm/beach.js +1 -2
- package/bpk-component-icon/sm/bus.js +1 -2
- package/bpk-component-icon/sm/call-back.js +1 -2
- package/bpk-component-icon/sm/camper-van.js +1 -2
- package/bpk-component-icon/sm/car-wash.js +1 -2
- package/bpk-component-icon/sm/cars.js +1 -2
- package/bpk-component-icon/sm/chauffeur.js +1 -2
- package/bpk-component-icon/sm/clean.js +1 -2
- package/bpk-component-icon/sm/content--copy.js +1 -2
- package/bpk-component-icon/sm/data.js +1 -2
- package/bpk-component-icon/sm/depart.js +1 -2
- package/bpk-component-icon/sm/direct.js +1 -2
- package/bpk-component-icon/sm/download.js +1 -2
- package/bpk-component-icon/sm/education.js +1 -2
- package/bpk-component-icon/sm/explore.js +1 -2
- package/bpk-component-icon/sm/fast-track.js +1 -2
- package/bpk-component-icon/sm/fast-train.js +1 -2
- package/bpk-component-icon/sm/flight-landing.js +1 -2
- package/bpk-component-icon/sm/flight-takeoff.js +1 -2
- package/bpk-component-icon/sm/flight.js +1 -2
- package/bpk-component-icon/sm/hotels--jacuzzi.js +1 -2
- package/bpk-component-icon/sm/infant.js +1 -2
- package/bpk-component-icon/sm/legroom--extra.js +1 -2
- package/bpk-component-icon/sm/legroom--normal.js +1 -2
- package/bpk-component-icon/sm/legroom--reduced.js +1 -2
- package/bpk-component-icon/sm/logout.js +1 -2
- package/bpk-component-icon/sm/mail.js +1 -2
- package/bpk-component-icon/sm/mileage.js +1 -2
- package/bpk-component-icon/sm/new-window.js +1 -2
- package/bpk-component-icon/sm/onsen.js +1 -2
- package/bpk-component-icon/sm/plane-seat.js +1 -2
- package/bpk-component-icon/sm/return.js +1 -2
- package/bpk-component-icon/sm/share--ios.js +1 -2
- package/bpk-component-icon/sm/social-distancing.js +1 -2
- package/bpk-component-icon/sm/taxi.js +1 -2
- package/bpk-component-icon/sm/unmute.js +1 -2
- package/bpk-component-icon/sm/weather--cloudy.js +1 -2
- package/bpk-component-icon/sm/weather--rain.js +1 -2
- package/bpk-component-icon/sm/weather--thunderstorm.js +1 -2
- package/bpk-component-icon/sm/weather--wind.js +1 -2
- package/bpk-component-icon/sm/window--reduce.js +1 -2
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +3 -0
- package/bpk-component-icon/src/withDescription.js +1 -2
- package/bpk-component-icon/src/withRtlSupport.js +1 -1
- package/bpk-component-image/index.js +2 -2
- package/bpk-component-image/src/BpkBackgroundImage.js +4 -3
- package/bpk-component-image/src/BpkImage.js +6 -4
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +4 -5
- package/bpk-component-info-banner/src/AnimateAndFade.js +37 -35
- package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
- package/bpk-component-info-banner/src/BpkInfoBannerInner.js +17 -14
- package/bpk-component-input/index.js +1 -1
- package/bpk-component-input/src/BpkClearButton.js +3 -1
- package/bpk-component-input/src/BpkInput.js +6 -4
- package/bpk-component-input/src/withOpenEvents.js +4 -1
- package/bpk-component-label/src/BpkLabel.js +1 -2
- package/bpk-component-link/index.js +2 -2
- package/bpk-component-list/src/BpkList.js +4 -1
- package/bpk-component-loading-button/src/BpkLoadingButton.js +7 -5
- package/bpk-component-map/index.js +4 -4
- package/bpk-component-map/src/BpkIconMarker.js +2 -3
- package/bpk-component-map/src/BpkMap.js +2 -2
- package/bpk-component-map/src/BpkPriceMarker.js +8 -7
- package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.js +2 -3
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +5 -2
- package/bpk-component-modal/index.js +4 -3
- package/bpk-component-modal/src/BpkModal.d.ts +2 -1
- package/bpk-component-modal/src/BpkModal.js +8 -3
- package/bpk-component-modal/src/BpkModalInner.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalInner.js +25 -10
- package/bpk-component-modal/src/BpkModalInner.module.css +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +1 -1
- package/bpk-component-modal/src/BpkModalV2/BpkModal.d.ts +2 -0
- package/bpk-component-modal/src/BpkModalV2/BpkModal.js +20 -10
- package/bpk-component-navigation-bar/index.js +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +8 -7
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +5 -2
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +5 -2
- package/bpk-component-nudger/index.js +1 -1
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +17 -6
- package/bpk-component-nudger/src/BpkNudger.js +17 -7
- package/bpk-component-overlay/src/BpkOverlay.js +1 -2
- package/bpk-component-page-indicator/src/BpkPageIndicator.js +1 -2
- package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +1 -1
- package/bpk-component-page-indicator/src/NavButton.js +1 -1
- package/bpk-component-pagination/src/BpkPagination.js +1 -2
- package/bpk-component-pagination/src/BpkPaginationList.js +1 -1
- package/bpk-component-pagination/src/BpkPaginationNudger.js +14 -6
- package/bpk-component-pagination/src/BpkPaginationPage.js +4 -1
- package/bpk-component-phone-input/src/BpkPhoneInput.js +16 -6
- package/bpk-component-popover/src/BpkPopover.js +106 -63
- package/bpk-component-popover/src/BpkPopoverPortal.js +123 -119
- package/bpk-component-popover/src/keyboardFocusScope.js +1 -1
- package/bpk-component-price/src/BpkPrice.js +19 -8
- package/bpk-component-progress/src/BpkProgress.js +1 -2
- package/bpk-component-radio/src/BpkRadio.js +1 -2
- package/bpk-component-rating/src/BpkRating.js +19 -8
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +4 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +7 -5
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +7 -4
- package/bpk-component-section-header/src/BpkSectionHeader.js +10 -5
- package/bpk-component-section-list/index.js +1 -1
- package/bpk-component-section-list/src/BpkSectionListItem.js +11 -6
- package/bpk-component-section-list/src/BpkSectionListSection.js +2 -3
- package/bpk-component-select/src/BpkSelect.js +1 -2
- package/bpk-component-slider/src/BpkSlider.js +6 -2
- package/bpk-component-spinner/index.js +3 -3
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +9 -7
- package/bpk-component-spinner/src/BpkLargeSpinner.js +9 -7
- package/bpk-component-spinner/src/BpkSpinner.js +9 -7
- package/bpk-component-split-input/src/BpkInputField.js +2 -2
- package/bpk-component-split-input/src/BpkSplitInput.js +3 -3
- package/bpk-component-star-rating/index.js +4 -4
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +6 -2
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +1 -1
- package/bpk-component-star-rating/src/BpkStar.js +22 -15
- package/bpk-component-swap-button/src/BpkSwapButton.js +2 -1
- package/bpk-component-switch/src/BpkSwitch.js +1 -2
- package/bpk-component-table/index.js +2 -2
- package/bpk-component-text/src/BpkText.js +10 -5
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +6 -4
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
- package/bpk-component-tooltip/src/BpkTooltip.js +2 -3
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +7 -6
- package/bpk-mixins/_chips.scss +9 -0
- package/bpk-react-utils/index.js +3 -3
- package/bpk-react-utils/src/BpkDialogWrapper/BpkDialogWrapper.js +2 -2
- package/bpk-react-utils/src/Portal.js +1 -0
- package/bpk-react-utils/src/withDefaultProps.js +4 -1
- package/bpk-scrim-utils/src/withScrim.js +3 -3
- package/bpk-scrim-utils/src/withScrimmedPortal.js +1 -1
- package/bpk-theming/src/BpkThemeProvider.js +1 -1
- package/package.json +5 -3
- package/unstable__bpk-mixins/_chips.scss +9 -0
- package/bpk-component-button/src/commonButtonTests.js +0 -133
|
@@ -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
|
-
@keyframes bpk-modal-scrim{0%{opacity:0}100%{opacity:1}}@keyframes bpk-modal-scale{0%{transform:scale(0.9)}100%{transform:scale(1)}}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop{position:fixed;z-index:0;margin:0 auto;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal{position:fixed;top:50%;left:50%;display:block;z-index:1;transform:translate(-50%, -50%) scale(1);transition:transform 200ms ease-in-out 200ms}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal:not([data-open=true]),.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop:not([data-open=true]){display:none}.bpk-modal{width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:none;background:#fff;overflow-y:scroll;scrollbar-width:none;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-modal{width:32rem;max-width:none;height:fit-content;max-height:90%;border-radius:.75rem}.bpk-modal--full-screen-desktop{width:100%;height:100%;max-height:100%;border-radius:0}.bpk-modal--wide{width:64rem;max-width:100%}}.bpk-modal[open]{animation:bpk-modal-scale 200ms ease-in-out}.bpk-modal--no-full-screen-mobile{width:90%;max-width:none;height:fit-content;max-height:90%}@media(min-width: 32.0625rem){.bpk-modal--no-full-screen-mobile{width:32rem;max-width:none}}.bpk-modal::backdrop{position:fixed;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal::-webkit-scrollbar{display:none}.bpk-modal__header-title{padding:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__header-title-
|
|
18
|
+
@keyframes bpk-modal-scrim{0%{opacity:0}100%{opacity:1}}@keyframes bpk-modal-scale{0%{transform:scale(0.9)}100%{transform:scale(1)}}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop{position:fixed;z-index:0;margin:0 auto;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal{position:fixed;top:50%;left:50%;display:block;z-index:1;transform:translate(-50%, -50%) scale(1);transition:transform 200ms ease-in-out 200ms}.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal:not([data-open=true]),.bpk-modal-wrapper.bpk-modal-polyfill .bpk-modal-backdrop:not([data-open=true]){display:none}.bpk-modal{width:100%;max-width:none;height:100%;max-height:100%;padding:0;border:none;background:#fff;overflow-y:scroll;scrollbar-width:none;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-modal{width:32rem;max-width:none;height:fit-content;max-height:90%;border-radius:.75rem}.bpk-modal--full-screen-desktop{width:100%;height:100%;max-height:100%;border-radius:0}.bpk-modal--wide{width:64rem;max-width:100%}}.bpk-modal[open]{animation:bpk-modal-scale 200ms ease-in-out}.bpk-modal--no-full-screen-mobile{width:90%;max-width:none;height:fit-content;max-height:90%}@media(min-width: 32.0625rem){.bpk-modal--no-full-screen-mobile{width:32rem;max-width:none}}.bpk-modal::backdrop{position:fixed;background-color:rgba(0,0,0,.7);animation:bpk-modal-scrim 200ms ease-in-out;inset:0;inset-block-end:0;inset-inline:0;inset-inline-end:0}.bpk-modal::-webkit-scrollbar{display:none}.bpk-modal__header-title{padding:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__header-title-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__close-button-style--surface-contrast{color:#fff}.bpk-no-touch-support .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-modal__close-button-style--surface-contrast:hover:not(:active):not(:disabled){color:#fff}.bpk-modal__header-title-container{display:flex;width:100%;justify-content:flex-start}.bpk-modal__button-container{padding-block-start:1rem;padding-inline-end:1rem;display:flex;min-height:1.5rem;flex-wrap:nowrap;justify-content:flex-end;align-items:center}.bpk-modal__button-container-style--surface-contrast{background-color:#05203c;color:#fff}.bpk-modal__container{min-height:100%;padding:1rem}.bpk-modal__container--padded{padding:0}.bpk-modal__container--full-screen-desktop{height:100%}.bpk-modal__container--surface-contrast{background-color:#05203c;color:#fff}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
/// <reference types="react" />
|
|
20
20
|
import type { ReactNode } from 'react';
|
|
21
|
+
import { ModalStyle } from '../BpkModalInner';
|
|
21
22
|
|
|
22
23
|
export type Props = {
|
|
23
24
|
id: string | undefined;
|
|
@@ -32,5 +33,6 @@ export type Props = {
|
|
|
32
33
|
showHeader?: boolean;
|
|
33
34
|
title?: string | null;
|
|
34
35
|
wide?: boolean;
|
|
36
|
+
modalStyle?: ModalStyle;
|
|
35
37
|
};
|
|
36
38
|
export declare const BpkModalV2: (props: Props) => JSX.Element | null;
|
|
@@ -22,34 +22,43 @@ import { useEffect, useRef } from 'react';
|
|
|
22
22
|
import BpkCloseButton from "../../../bpk-component-close-button";
|
|
23
23
|
import BpkText, { TEXT_STYLES } from "../../../bpk-component-text";
|
|
24
24
|
import { cssModules, withDefaultProps } from "../../../bpk-react-utils";
|
|
25
|
+
import { MODAL_STYLING } from "../BpkModalInner";
|
|
25
26
|
import STYLES from "./BpKModal.module.css";
|
|
26
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
28
|
const getClassName = cssModules(STYLES);
|
|
29
29
|
const Header = ({
|
|
30
30
|
closeLabel,
|
|
31
31
|
id,
|
|
32
|
+
modalStyle,
|
|
32
33
|
onClose,
|
|
33
34
|
title
|
|
34
35
|
}) => {
|
|
35
36
|
if (title) {
|
|
36
37
|
return /*#__PURE__*/_jsxs("div", {
|
|
37
38
|
id: id,
|
|
38
|
-
className: getClassName('bpk-modal__header-title'),
|
|
39
|
+
className: [getClassName('bpk-modal__header-title'), getClassName(`bpk-modal__header-title-style--${modalStyle}`)].join(' '),
|
|
39
40
|
children: [/*#__PURE__*/_jsx("div", {
|
|
40
41
|
className: getClassName('bpk-modal__header-title-container'),
|
|
41
42
|
children: /*#__PURE__*/_jsx(Heading, {
|
|
42
43
|
children: title
|
|
43
44
|
})
|
|
44
|
-
}), /*#__PURE__*/_jsx(BpkCloseButton
|
|
45
|
+
}), /*#__PURE__*/_jsx(BpkCloseButton
|
|
46
|
+
// TODO: className to be removed
|
|
47
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
48
|
+
, {
|
|
49
|
+
className: getClassName(`bpk-modal__close-button-style--${modalStyle}`),
|
|
45
50
|
label: closeLabel,
|
|
46
51
|
onClick: onClose
|
|
47
52
|
})]
|
|
48
53
|
});
|
|
49
54
|
}
|
|
50
55
|
return /*#__PURE__*/_jsx("div", {
|
|
51
|
-
className: getClassName('bpk-modal__button-container'),
|
|
52
|
-
children: /*#__PURE__*/_jsx(BpkCloseButton
|
|
56
|
+
className: [getClassName('bpk-modal__button-container'), getClassName(`bpk-modal__button-container-style--${modalStyle}`)].join(' '),
|
|
57
|
+
children: /*#__PURE__*/_jsx(BpkCloseButton
|
|
58
|
+
// TODO: className to be removed
|
|
59
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
60
|
+
, {
|
|
61
|
+
className: getClassName(`bpk-modal__close-button-style--${modalStyle}`),
|
|
53
62
|
label: closeLabel,
|
|
54
63
|
onClick: onClose
|
|
55
64
|
})
|
|
@@ -57,8 +66,7 @@ const Header = ({
|
|
|
57
66
|
};
|
|
58
67
|
const Heading = withDefaultProps(BpkText, {
|
|
59
68
|
textStyle: TEXT_STYLES.label1,
|
|
60
|
-
tagName: 'h2'
|
|
61
|
-
className: getClassName('bpk-modal__title')
|
|
69
|
+
tagName: 'h2'
|
|
62
70
|
});
|
|
63
71
|
// TODO: this check if the browser support the HTML dialog element. We can remove it once we drop support as a business for Safari 14
|
|
64
72
|
const dialogSupported = typeof HTMLDialogElement === 'function';
|
|
@@ -79,6 +87,7 @@ export const BpkModalV2 = props => {
|
|
|
79
87
|
fullScreenOnDesktop,
|
|
80
88
|
id,
|
|
81
89
|
isOpen,
|
|
90
|
+
modalStyle = MODAL_STYLING.default,
|
|
82
91
|
noFullScreenOnMobile,
|
|
83
92
|
onClose,
|
|
84
93
|
padded,
|
|
@@ -131,7 +140,7 @@ export const BpkModalV2 = props => {
|
|
|
131
140
|
};
|
|
132
141
|
}, [id, isOpen, onClose]);
|
|
133
142
|
const classNames = getClassName('bpk-modal', fullScreenOnDesktop && 'bpk-modal--full-screen-desktop', noFullScreenOnMobile && 'bpk-modal--no-full-screen-mobile', wide && 'bpk-modal--wide');
|
|
134
|
-
const contentClassNames = getClassName('bpk-modal__container', fullScreenOnDesktop && 'bpk-modal__container--full-screen-desktop', padded && 'bpk-modal__container--padded');
|
|
143
|
+
const contentClassNames = getClassName('bpk-modal__container', fullScreenOnDesktop && 'bpk-modal__container--full-screen-desktop', padded && 'bpk-modal__container--padded', modalStyle === MODAL_STYLING.surfaceContrast && 'bpk-modal__container--surface-contrast');
|
|
135
144
|
return isOpen ? /*#__PURE__*/_jsxs("div", {
|
|
136
145
|
className: getClassName('bpk-modal-wrapper', dialogSupported ? '' : 'bpk-modal-polyfill'),
|
|
137
146
|
children: [!dialogSupported && /*#__PURE__*/_jsx("div", {
|
|
@@ -149,7 +158,8 @@ export const BpkModalV2 = props => {
|
|
|
149
158
|
id: `${id}-title`,
|
|
150
159
|
title: title,
|
|
151
160
|
closeLabel: closeLabel,
|
|
152
|
-
onClose: onClose
|
|
161
|
+
onClose: onClose,
|
|
162
|
+
modalStyle: modalStyle
|
|
153
163
|
}), /*#__PURE__*/_jsx("div", {
|
|
154
164
|
className: contentClassNames,
|
|
155
165
|
children: children
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import BpkNavigationBar, { BAR_STYLES } from "./src/BpkNavigationBar";
|
|
20
|
-
import BpkNavigationBarIconButton from "./src/BpkNavigationBarIconButton";
|
|
21
20
|
import BpkNavigationBarButtonLink from "./src/BpkNavigationBarButtonLink";
|
|
21
|
+
import BpkNavigationBarIconButton from "./src/BpkNavigationBarIconButton";
|
|
22
22
|
import themeAttributes from "./src/themeAttributes";
|
|
23
23
|
export { BpkNavigationBarIconButton, BpkNavigationBarButtonLink, themeAttributes, BAR_STYLES };
|
|
24
24
|
export default BpkNavigationBar;
|
|
@@ -16,11 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
19
|
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
20
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkNavigationBar.module.css";
|
|
22
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
23
|
const getClassNames = cssModules(STYLES);
|
|
25
24
|
export const BAR_STYLES = {
|
|
26
25
|
default: 'default',
|
|
@@ -48,11 +47,13 @@ const BpkNavigationBar = props => {
|
|
|
48
47
|
children: [leadingButton && /*#__PURE__*/_jsx("div", {
|
|
49
48
|
className: getClassNames('bpk-navigation-bar__leading-item', `bpk-navigation-bar__leading-item--${barStyle}`),
|
|
50
49
|
children: leadingButton
|
|
51
|
-
}), typeof title === 'string' ? /*#__PURE__*/_jsx(
|
|
52
|
-
id: titleId,
|
|
53
|
-
textStyle: TEXT_STYLES.heading5,
|
|
50
|
+
}), typeof title === 'string' ? /*#__PURE__*/_jsx("span", {
|
|
54
51
|
className: getClassNames('bpk-navigation-bar__title', `bpk-navigation-bar__title--${barStyle}`),
|
|
55
|
-
children:
|
|
52
|
+
children: /*#__PURE__*/_jsx(BpkText, {
|
|
53
|
+
id: titleId,
|
|
54
|
+
textStyle: TEXT_STYLES.heading5,
|
|
55
|
+
children: title
|
|
56
|
+
})
|
|
56
57
|
}) : title, trailingButton && /*#__PURE__*/_jsx("div", {
|
|
57
58
|
className: getClassNames('bpk-navigation-bar__trailing-item', `bpk-navigation-bar__trailing-item-${barStyle}`),
|
|
58
59
|
children: trailingButton
|
|
@@ -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 STYLES from "./BpkNavigationBarButtonLink.module.css";
|
|
23
22
|
import { BAR_STYLES } from "./BpkNavigationBar";
|
|
23
|
+
import STYLES from "./BpkNavigationBarButtonLink.module.css";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
26
26
|
const BpkNavigationBarButtonLink = ({
|
|
@@ -28,7 +28,10 @@ const BpkNavigationBarButtonLink = ({
|
|
|
28
28
|
children,
|
|
29
29
|
className,
|
|
30
30
|
...rest
|
|
31
|
-
}) => /*#__PURE__*/_jsx(BpkButtonLink
|
|
31
|
+
}) => /*#__PURE__*/_jsx(BpkButtonLink
|
|
32
|
+
// TODO: className to be removed
|
|
33
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
34
|
+
, {
|
|
32
35
|
className: getClassName('bpk-navigation-bar-button-link', `bpk-navigation-bar-button-link--${barStyle}`, className),
|
|
33
36
|
...rest,
|
|
34
37
|
children: children
|
|
@@ -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 STYLES from "./BpkNavigationBarIconButton.module.css";
|
|
23
22
|
import { BAR_STYLES } from "./BpkNavigationBar";
|
|
23
|
+
import STYLES from "./BpkNavigationBarIconButton.module.css";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
26
26
|
const BpkNavigationBarIconButton = ({
|
|
@@ -29,7 +29,10 @@ const BpkNavigationBarIconButton = ({
|
|
|
29
29
|
icon,
|
|
30
30
|
...rest
|
|
31
31
|
}) => /*#__PURE__*/_jsx(BpkIconButton, {
|
|
32
|
-
customIcon: icon
|
|
32
|
+
customIcon: icon
|
|
33
|
+
// TODO: className to be removed
|
|
34
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
35
|
+
,
|
|
33
36
|
className: getClassName('bpk-navigation-bar-icon-button', `bpk-navigation-bar-icon-button--${barStyle}`, className),
|
|
34
37
|
...rest
|
|
35
38
|
});
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import BpkNudger from "./src/BpkNudger";
|
|
20
19
|
import BpkConfigurableNudger from "./src/BpkConfigurableNudger";
|
|
20
|
+
import BpkNudger from "./src/BpkNudger";
|
|
21
21
|
import themeAttributes from "./src/themeAttributes";
|
|
22
22
|
export default BpkNudger;
|
|
23
23
|
export { themeAttributes, BpkConfigurableNudger };
|
|
@@ -24,8 +24,7 @@ import MinusIcon from "../../bpk-component-icon/sm/minus";
|
|
|
24
24
|
import PlusIcon from "../../bpk-component-icon/sm/plus";
|
|
25
25
|
import { cssModules } from "../../bpk-react-utils";
|
|
26
26
|
import STYLES from "./BpkNudger.module.css";
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
28
|
const getClassName = cssModules(STYLES);
|
|
30
29
|
const AlignedMinusIcon = withButtonAlignment(MinusIcon);
|
|
31
30
|
const AlignedPlusIcon = withButtonAlignment(PlusIcon);
|
|
@@ -60,9 +59,15 @@ const BpkConfigurableNudger = ({
|
|
|
60
59
|
onClick: () => onChange(decrementValue(value)),
|
|
61
60
|
disabled: minButtonDisabled,
|
|
62
61
|
title: decreaseButtonLabel,
|
|
63
|
-
"aria-controls": id
|
|
62
|
+
"aria-controls": id
|
|
63
|
+
// TODO: className to be removed
|
|
64
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
65
|
+
,
|
|
64
66
|
className: getClassName('bpk-nudger__button'),
|
|
65
|
-
children: /*#__PURE__*/_jsx(AlignedMinusIcon
|
|
67
|
+
children: /*#__PURE__*/_jsx(AlignedMinusIcon
|
|
68
|
+
// TODO: className to be removed
|
|
69
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
70
|
+
, {
|
|
66
71
|
className: minusIconClassNames
|
|
67
72
|
})
|
|
68
73
|
}), /*#__PURE__*/_jsx("input", {
|
|
@@ -80,9 +85,15 @@ const BpkConfigurableNudger = ({
|
|
|
80
85
|
onClick: () => onChange(incrementValue(value)),
|
|
81
86
|
disabled: maxButtonDisabled,
|
|
82
87
|
title: increaseButtonLabel,
|
|
83
|
-
"aria-controls": id
|
|
88
|
+
"aria-controls": id
|
|
89
|
+
// TODO: className to be removed
|
|
90
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
91
|
+
,
|
|
84
92
|
className: getClassName('bpk-nudger__button'),
|
|
85
|
-
children: /*#__PURE__*/_jsx(AlignedPlusIcon
|
|
93
|
+
children: /*#__PURE__*/_jsx(AlignedPlusIcon
|
|
94
|
+
// TODO: className to be removed
|
|
95
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
96
|
+
, {
|
|
86
97
|
className: plusIconClassNames
|
|
87
98
|
})
|
|
88
99
|
})]
|
|
@@ -16,14 +16,13 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
20
|
-
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
21
19
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
20
|
import BpkLabel from "../../bpk-component-label";
|
|
21
|
+
import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
|
|
22
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
23
23
|
import BpkConfigurableNudger from "./BpkConfigurableNudger";
|
|
24
24
|
import STYLES from "./BpkNudger.module.css";
|
|
25
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
26
|
const getClassName = cssModules(STYLES);
|
|
28
27
|
const compareValues = (a, b) => a - b;
|
|
29
28
|
const incrementValue = currentValue => currentValue + 1;
|
|
@@ -41,7 +40,11 @@ const BpkNudger = ({
|
|
|
41
40
|
const classNames = getClassName(title && 'bpk-nudger__container');
|
|
42
41
|
return /*#__PURE__*/_jsxs("div", {
|
|
43
42
|
className: classNames,
|
|
44
|
-
children: [title &&
|
|
43
|
+
children: [title &&
|
|
44
|
+
/*#__PURE__*/
|
|
45
|
+
// TODO: className to be removed
|
|
46
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
47
|
+
_jsxs(BpkLabel, {
|
|
45
48
|
htmlFor: id,
|
|
46
49
|
className: getClassName('bpk-nudger__label'),
|
|
47
50
|
children: [icon, /*#__PURE__*/_jsxs("span", {
|
|
@@ -52,7 +55,11 @@ const BpkNudger = ({
|
|
|
52
55
|
children: [/*#__PURE__*/_jsx(BpkText, {
|
|
53
56
|
textStyle: TEXT_STYLES.heading5,
|
|
54
57
|
children: title
|
|
55
|
-
}), subtitle &&
|
|
58
|
+
}), subtitle &&
|
|
59
|
+
/*#__PURE__*/
|
|
60
|
+
// TODO: className to be removed
|
|
61
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
62
|
+
_jsx(BpkText, {
|
|
56
63
|
className: getClassName('bpk-nudger__label--subtitle'),
|
|
57
64
|
children: subtitle
|
|
58
65
|
})]
|
|
@@ -62,7 +69,10 @@ const BpkNudger = ({
|
|
|
62
69
|
compareValues: compareValues,
|
|
63
70
|
incrementValue: incrementValue,
|
|
64
71
|
decrementValue: decrementValue,
|
|
65
|
-
formatValue: formatValue
|
|
72
|
+
formatValue: formatValue
|
|
73
|
+
// TODO: className to be removed
|
|
74
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
75
|
+
,
|
|
66
76
|
className: className,
|
|
67
77
|
buttonType: buttonType,
|
|
68
78
|
id: id,
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { cssModules } from "../../bpk-react-utils";
|
|
20
20
|
import STYLES from "./BpkOverlay.module.css";
|
|
21
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
22
|
const getClassName = cssModules(STYLES);
|
|
24
23
|
export const OVERLAY_TYPES = {
|
|
25
24
|
solidLow: 'solidLow',
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
19
|
import NavButton, { DIRECTIONS } from "./NavButton";
|
|
20
20
|
import STYLES from "./BpkPageIndicator.module.css";
|
|
21
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
22
|
const getClassName = cssModules(STYLES);
|
|
24
23
|
const DISPLAYED_TOTAL = 5;
|
|
25
24
|
const START_SCROLL_INDEX = Math.floor(DISPLAYED_TOTAL / 2);
|
|
@@ -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-page-indicator{display:flex;width:100%;justify-content:center;align-items:center}.bpk-page-indicator__showNav{justify-content:space-between}.bpk-page-indicator__container{max-width:5rem;min-height:.5rem;overflow:hidden}.bpk-page-indicator__indicators-container{--direction: -1;transform:translateX(calc(var(--direction) * var(--scroll-index, 0) * 1rem));transition:transform 200ms ease-in-out;white-space:nowrap}html[dir=rtl] .bpk-page-indicator__indicators-container{--direction: 1}.bpk-page-indicator__indicator{display:inline-block;width:.5rem;height:.5rem;padding:0;border:none;border-radius:50%;margin-inline:.25rem}.bpk-page-indicator__indicator--default{background-color:#c1c7cf}.bpk-page-indicator__indicator--overImage{background-color:rgba(255,255,255,.5)}.bpk-page-indicator__indicator--active-default{background-color:#626971}.bpk-page-indicator__indicator--active-overImage{background-color:#fff}
|
|
18
|
+
.bpk-page-indicator{display:flex;width:100%;justify-content:center;align-items:center}.bpk-page-indicator__showNav{justify-content:space-between}.bpk-page-indicator__container{max-width:5rem;min-height:.5rem;overflow:hidden}.bpk-page-indicator__indicators-container{--direction: -1;transform:translateX(calc(var(--direction) * var(--scroll-index, 0) * 1rem));transition:transform 200ms ease-in-out;white-space:nowrap}html[dir=rtl] .bpk-page-indicator__indicators-container{--direction: 1}.bpk-page-indicator__indicator{display:inline-block;width:.5rem;height:.5rem;padding:0;border:none;border-radius:50%;margin-inline:.25rem}.bpk-page-indicator__indicator:hover{cursor:pointer}.bpk-page-indicator__indicator--default{background-color:#c1c7cf}.bpk-page-indicator__indicator--overImage{background-color:rgba(255,255,255,.5)}.bpk-page-indicator__indicator--active-default{background-color:#626971;pointer-events:none}.bpk-page-indicator__indicator--active-overImage{background-color:#fff;pointer-events:none}
|
|
@@ -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 { withButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
|
|
19
18
|
import { BUTTON_TYPES, BpkButtonV2 } from "../../bpk-component-button";
|
|
19
|
+
import { withButtonAlignment, withRtlSupport } from "../../bpk-component-icon";
|
|
20
20
|
import LeftArrowIcon from "../../bpk-component-icon/lg/chevron-left";
|
|
21
21
|
import RightArrowIcon from "../../bpk-component-icon/lg/chevron-right";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -21,8 +21,7 @@ import { cssModules } from "../../bpk-react-utils";
|
|
|
21
21
|
import BpkPaginationList from "./BpkPaginationList";
|
|
22
22
|
import BpkPaginationNudger from "./BpkPaginationNudger";
|
|
23
23
|
import STYLES from "./BpkPagination.module.css";
|
|
24
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
25
|
const getClassName = cssModules(STYLES);
|
|
27
26
|
const handlePageChange = (onPageChange, pageCount) => nextPageIndex => {
|
|
28
27
|
if (onPageChange && nextPageIndex < pageCount && nextPageIndex >= 0) {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
20
|
import { cssModules } from "../../bpk-react-utils";
|
|
21
|
-
import BpkPaginationPage from "./BpkPaginationPage";
|
|
22
21
|
import BpkPaginationBreak from "./BpkPaginationBreak";
|
|
22
|
+
import BpkPaginationPage from "./BpkPaginationPage";
|
|
23
23
|
import STYLES from "./BpkPaginationList.module.css";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
const getClassName = cssModules(STYLES);
|
|
@@ -17,20 +17,25 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
|
-
import { cssModules } from "../../bpk-react-utils";
|
|
21
20
|
import { BpkButtonV2, BUTTON_TYPES } from "../../bpk-component-button";
|
|
22
21
|
import { withRtlSupport } from "../../bpk-component-icon";
|
|
23
22
|
import ArrowLeftIcon from "../../bpk-component-icon/sm/arrow-left";
|
|
24
23
|
import ArrowRightIcon from "../../bpk-component-icon/sm/arrow-right";
|
|
24
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
25
25
|
import STYLES from "./BpkPaginationNudger.module.css";
|
|
26
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
27
|
const getClassName = cssModules(STYLES);
|
|
29
28
|
const AlignedArrowLeftIcon = withRtlSupport(ArrowLeftIcon);
|
|
30
29
|
const AlignedArrowRightIcon = withRtlSupport(ArrowRightIcon);
|
|
31
|
-
const nudgerIcon = forward => forward ? /*#__PURE__*/_jsx(AlignedArrowRightIcon
|
|
30
|
+
const nudgerIcon = forward => forward ? /*#__PURE__*/_jsx(AlignedArrowRightIcon
|
|
31
|
+
// TODO: className to be removed
|
|
32
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
33
|
+
, {
|
|
32
34
|
className: getClassName('bpk-pagination-nudger__icon')
|
|
33
|
-
}) : /*#__PURE__*/_jsx(AlignedArrowLeftIcon
|
|
35
|
+
}) : /*#__PURE__*/_jsx(AlignedArrowLeftIcon
|
|
36
|
+
// TODO: className to be removed
|
|
37
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
38
|
+
, {
|
|
34
39
|
className: getClassName('bpk-pagination-nudger__icon')
|
|
35
40
|
});
|
|
36
41
|
const BpkPaginationNudger = props => {
|
|
@@ -43,7 +48,10 @@ const BpkPaginationNudger = props => {
|
|
|
43
48
|
return /*#__PURE__*/_jsxs(BpkButtonV2, {
|
|
44
49
|
type: BUTTON_TYPES.link,
|
|
45
50
|
onClick: onNudge,
|
|
46
|
-
disabled: disabled
|
|
51
|
+
disabled: disabled
|
|
52
|
+
// TODO: className to be removed
|
|
53
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
54
|
+
,
|
|
47
55
|
className: getClassName('bpk-pagination-nudger'),
|
|
48
56
|
children: [nudgerIcon(forward), /*#__PURE__*/_jsx("span", {
|
|
49
57
|
className: getClassName('bpk-pagination-nudger__text--hidden'),
|
|
@@ -35,7 +35,10 @@ const BpkPaginationPage = props => {
|
|
|
35
35
|
}
|
|
36
36
|
return /*#__PURE__*/_jsx(BpkButtonV2, {
|
|
37
37
|
type: !isSelected ? BUTTON_TYPES.primaryOnDark : BUTTON_TYPES.primary,
|
|
38
|
-
onClick: onSelect
|
|
38
|
+
onClick: onSelect
|
|
39
|
+
// TODO: className to be removed
|
|
40
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
41
|
+
,
|
|
39
42
|
className: classNames.join(' '),
|
|
40
43
|
"aria-label": pageLabel(page, isSelected),
|
|
41
44
|
"aria-current": isSelected,
|
|
@@ -15,13 +15,12 @@
|
|
|
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 { cssModules } from "../../bpk-react-utils";
|
|
19
18
|
import BpkInput, { INPUT_TYPES } from "../../bpk-component-input";
|
|
20
19
|
import BpkLabel from "../../bpk-component-label";
|
|
21
20
|
import BpkSelect from "../../bpk-component-select";
|
|
21
|
+
import { cssModules } from "../../bpk-react-utils";
|
|
22
22
|
import STYLES from "./BpkPhoneInput.module.css";
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
24
|
const getClassName = cssModules(STYLES);
|
|
26
25
|
const BpkPhoneInput = props => {
|
|
27
26
|
const {
|
|
@@ -87,12 +86,17 @@ const BpkPhoneInput = props => {
|
|
|
87
86
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
88
87
|
children: [/*#__PURE__*/_jsx(BpkLabel, {
|
|
89
88
|
htmlFor: dialingCodeProps.id,
|
|
90
|
-
disabled: disabled
|
|
89
|
+
disabled: disabled
|
|
90
|
+
// TODO: className to be removed
|
|
91
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
92
|
+
,
|
|
91
93
|
className: getClassName('bpk-phone-input__label'),
|
|
92
94
|
children: dialingCodeProps.label
|
|
93
95
|
}), /*#__PURE__*/_jsx(BpkSelect, {
|
|
94
96
|
...commonProps,
|
|
95
97
|
...dialingCodeProps,
|
|
98
|
+
// TODO: className to be removed
|
|
99
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
96
100
|
className: getClassName(dialingCodeProps.className),
|
|
97
101
|
wrapperClassName: getClassName(dialingCodeProps.wrapperClassName),
|
|
98
102
|
value: dialingCode,
|
|
@@ -114,7 +118,10 @@ const BpkPhoneInput = props => {
|
|
|
114
118
|
className: getClassName('bpk-phone-input__phone-number'),
|
|
115
119
|
children: [/*#__PURE__*/_jsx(BpkLabel, {
|
|
116
120
|
htmlFor: id,
|
|
117
|
-
disabled: disabled
|
|
121
|
+
disabled: disabled
|
|
122
|
+
// TODO: className to be removed
|
|
123
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
124
|
+
,
|
|
118
125
|
className: getClassName('bpk-phone-input__label'),
|
|
119
126
|
children: label
|
|
120
127
|
}), /*#__PURE__*/_jsx(BpkInput, {
|
|
@@ -124,7 +131,10 @@ const BpkPhoneInput = props => {
|
|
|
124
131
|
name: name,
|
|
125
132
|
value: displayValue,
|
|
126
133
|
type: INPUT_TYPES.tel,
|
|
127
|
-
onChange: handleChange
|
|
134
|
+
onChange: handleChange
|
|
135
|
+
// TODO: className to be removed
|
|
136
|
+
// eslint-disable-next-line @skyscanner/rules/forbid-component-props
|
|
137
|
+
,
|
|
128
138
|
className: getClassName(className)
|
|
129
139
|
})]
|
|
130
140
|
})]
|