@skyscanner/backpack-web 25.7.0-beta.2 → 25.8.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/README.md +2 -2
- package/bpk-animate-height/index.js +10 -3
- package/bpk-animate-height/src/AnimateHeight.js +67 -55
- package/bpk-component-accordion/index.js +34 -21
- package/bpk-component-accordion/src/BpkAccordion.js +41 -23
- package/bpk-component-accordion/src/BpkAccordionItem.js +65 -47
- package/bpk-component-accordion/src/withAccordionItemState.js +64 -48
- package/bpk-component-accordion/src/withSingleItemAccordionState.js +62 -46
- package/bpk-component-aria-live/index.js +17 -4
- package/bpk-component-aria-live/src/BpkAriaLive.js +33 -17
- package/bpk-component-autosuggest/index.js +18 -4
- package/bpk-component-autosuggest/src/BpkAutosuggest.js +34 -18
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +48 -32
- package/bpk-component-badge/index.js +25 -5
- package/bpk-component-badge/src/BpkBadge.js +34 -18
- package/bpk-component-badge/src/themeAttributes.js +8 -2
- package/bpk-component-banner-alert/index.js +45 -9
- package/bpk-component-banner-alert/src/AnimateAndFade.js +76 -68
- package/bpk-component-banner-alert/src/BpkBannerAlert.js +34 -17
- package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +30 -12
- package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +35 -16
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +80 -66
- package/bpk-component-banner-alert/src/common-types.js +9 -2
- package/bpk-component-banner-alert/src/themeAttributes.js +8 -2
- package/bpk-component-banner-alert/src/withBannerAlertState.js +94 -77
- package/bpk-component-barchart/index.js +53 -9
- package/bpk-component-barchart/src/BpkBarchart.js +174 -154
- package/bpk-component-barchart/src/BpkBarchartBar.js +56 -41
- package/bpk-component-barchart/src/BpkBarchartBars.js +67 -51
- package/bpk-component-barchart/src/BpkBarchartDefs.js +22 -11
- package/bpk-component-barchart/src/BpkChartAxis.js +74 -59
- package/bpk-component-barchart/src/BpkChartDataTable.js +29 -22
- package/bpk-component-barchart/src/BpkChartGridLines.js +53 -38
- package/bpk-component-barchart/src/BpkChartMargin.js +34 -17
- package/bpk-component-barchart/src/RTLtransforms.js +36 -13
- package/bpk-component-barchart/src/customPropTypes.js +10 -2
- package/bpk-component-barchart/src/orientation.js +10 -2
- package/bpk-component-barchart/src/themeAttributes.js +9 -1
- package/bpk-component-barchart/src/utils.js +9 -1
- package/bpk-component-blockquote/index.js +17 -5
- package/bpk-component-blockquote/src/BpkBlockquote.js +17 -9
- package/bpk-component-blockquote/src/themeAttributes.js +8 -2
- package/bpk-component-boilerplate/index.js +10 -3
- package/bpk-component-boilerplate/src/BpkBoilerplate.js +30 -14
- package/bpk-component-breadcrumb/index.js +18 -4
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +63 -46
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +52 -36
- package/bpk-component-breakpoint/index.js +17 -4
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +25 -16
- package/bpk-component-button/BpkButtonDestructive.js +13 -17
- package/bpk-component-button/BpkButtonFeatured.js +13 -17
- package/bpk-component-button/BpkButtonLink.js +13 -17
- package/bpk-component-button/BpkButtonLinkOnDark.js +13 -17
- package/bpk-component-button/BpkButtonPrimary.js +13 -17
- package/bpk-component-button/BpkButtonPrimaryOnDark.js +13 -17
- package/bpk-component-button/BpkButtonPrimaryOnLight.js +13 -17
- package/bpk-component-button/BpkButtonSecondary.js +13 -17
- package/bpk-component-button/BpkButtonSecondaryOnDark.js +13 -17
- package/bpk-component-button/index.js +144 -15
- package/bpk-component-button/src/BpkButton.js +53 -57
- package/bpk-component-button/src/BpkButtonBase.js +45 -33
- package/bpk-component-button/src/BpkButtonDestructive.js +33 -19
- package/bpk-component-button/src/BpkButtonFeatured.js +33 -19
- package/bpk-component-button/src/BpkButtonLink.js +34 -20
- package/bpk-component-button/src/BpkButtonLinkOnDark.js +34 -20
- package/bpk-component-button/src/BpkButtonPrimary.js +35 -30
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +33 -19
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +33 -19
- package/bpk-component-button/src/BpkButtonSecondary.js +33 -19
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +33 -19
- package/bpk-component-button/src/BpkButtonV2/BpkButton.js +46 -29
- package/bpk-component-button/src/BpkButtonV2/common-types.js +11 -3
- package/bpk-component-button/src/common-types.js +21 -13
- package/bpk-component-button/src/commonButtonTests.js +21 -14
- package/bpk-component-button/src/themeAttributes.js +22 -8
- package/bpk-component-button/themeAttributes.js +54 -17
- package/bpk-component-calendar/index.js +107 -14
- package/bpk-component-calendar/src/BpkCalendarContainer.js +200 -185
- package/bpk-component-calendar/src/BpkCalendarDate.js +83 -63
- package/bpk-component-calendar/src/BpkCalendarGrid.js +66 -60
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +44 -35
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +76 -63
- package/bpk-component-calendar/src/BpkCalendarNav.js +47 -37
- package/bpk-component-calendar/src/Week.js +101 -92
- package/bpk-component-calendar/src/composeCalendar.js +43 -36
- package/bpk-component-calendar/src/custom-proptypes-legacy.js +63 -52
- package/bpk-component-calendar/src/custom-proptypes.js +9 -2
- package/bpk-component-calendar/src/date-utils.js +161 -33
- package/bpk-component-calendar/src/themeAttributes.js +8 -2
- package/bpk-component-calendar/src/utils.js +15 -7
- package/bpk-component-calendar/test-utils.js +31 -14
- package/bpk-component-card/index.js +32 -6
- package/bpk-component-card/src/BpkCard.js +43 -29
- package/bpk-component-card/src/BpkCardWrapper.js +16 -9
- package/bpk-component-card/src/BpkDividedCard.js +40 -24
- package/bpk-component-checkbox/index.js +18 -4
- package/bpk-component-checkbox/src/BpkCheckbox.js +50 -35
- package/bpk-component-checkbox/src/themeAttributes.js +9 -1
- package/bpk-component-chip/index.js +38 -8
- package/bpk-component-chip/src/BpkDismissibleChip.js +34 -20
- package/bpk-component-chip/src/BpkDropdownChip.js +38 -21
- package/bpk-component-chip/src/BpkSelectableChip.js +46 -29
- package/bpk-component-chip/src/commonTypes.js +24 -15
- package/bpk-component-chip/src/themeAttributes.js +8 -2
- package/bpk-component-close-button/index.js +11 -2
- package/bpk-component-close-button/src/BpkCloseButton.js +40 -23
- package/bpk-component-code/index.js +20 -19
- package/bpk-component-code/src/BpkCode.js +35 -18
- package/bpk-component-code/src/BpkCodeBlock.js +36 -19
- package/bpk-component-content-cards/index.js +10 -3
- package/bpk-component-content-cards/src/BpkContentCard.js +22 -13
- package/bpk-component-content-cards/src/BpkContentCards.js +22 -13
- package/bpk-component-datatable/index.js +20 -20
- package/bpk-component-datatable/src/BpkDataTable.js +98 -88
- package/bpk-component-datatable/src/BpkDataTableColumn.js +47 -36
- package/bpk-component-datatable/src/BpkDataTableHeader.js +55 -45
- package/bpk-component-datatable/src/common-types.js +1 -0
- package/bpk-component-datatable/src/hasChildrenOfType.js +13 -5
- package/bpk-component-datatable/src/sort-types.js +9 -2
- package/bpk-component-datatable/src/utils.js +20 -8
- package/bpk-component-datepicker/index.js +24 -6
- package/bpk-component-datepicker/src/BpkDatepicker.js +200 -190
- package/bpk-component-datepicker/src/themeAttributes.js +11 -5
- package/bpk-component-description-list/index.js +26 -21
- package/bpk-component-description-list/src/BpkDescriptionDetails.js +10 -3
- package/bpk-component-description-list/src/BpkDescriptionList.js +10 -3
- package/bpk-component-description-list/src/BpkDescriptionTerm.js +10 -3
- package/bpk-component-description-list/src/ComponentFactory.js +34 -18
- package/bpk-component-dialog/index.js +17 -5
- package/bpk-component-dialog/src/BpkDialog.js +43 -28
- package/bpk-component-dialog/src/BpkDialogInner.js +20 -12
- package/bpk-component-dialog/src/common-types.js +9 -2
- package/bpk-component-drawer/index.js +18 -4
- package/bpk-component-drawer/src/BpkDrawer.js +68 -52
- package/bpk-component-drawer/src/BpkDrawerContent.js +73 -57
- package/bpk-component-drawer/src/themeAttributes.js +10 -2
- package/bpk-component-fieldset/index.js +32 -4
- package/bpk-component-fieldset/src/BpkFieldset.js +64 -50
- package/bpk-component-fieldset/src/themeAttributes.js +8 -2
- package/bpk-component-flare/index.js +24 -4
- package/bpk-component-flare/src/BpkContentBubble.js +46 -33
- package/bpk-component-flare/src/BpkFlareBar.js +39 -25
- package/bpk-component-flare/src/__generated__/js/corner-radius.js +31 -12
- package/bpk-component-flare/src/__generated__/js/pointer.js +31 -12
- package/bpk-component-floating-notification/index.js +11 -2
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +63 -45
- package/bpk-component-form-validation/index.js +17 -5
- package/bpk-component-form-validation/src/BpkFormValidation.js +50 -36
- package/bpk-component-form-validation/src/themeAttributes.js +8 -2
- package/bpk-component-graphic-promotion/index.js +17 -4
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +29 -21
- package/bpk-component-grid-toggle/index.js +10 -3
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +50 -41
- package/bpk-component-horizontal-nav/index.js +31 -4
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +115 -96
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +79 -62
- package/bpk-component-icon/all.js +10 -2
- package/bpk-component-icon/index.js +33 -11
- package/bpk-component-icon/lg/accessibility.js +37 -18
- package/bpk-component-icon/lg/account--add.js +37 -18
- package/bpk-component-icon/lg/account--female.js +37 -18
- package/bpk-component-icon/lg/account--id-card.js +37 -18
- package/bpk-component-icon/lg/account--name.js +37 -18
- package/bpk-component-icon/lg/account--permit.js +37 -18
- package/bpk-component-icon/lg/account-circle.js +37 -18
- package/bpk-component-icon/lg/account.js +37 -18
- package/bpk-component-icon/lg/add-circle.js +37 -18
- package/bpk-component-icon/lg/adult.js +37 -18
- package/bpk-component-icon/lg/ai.js +38 -19
- package/bpk-component-icon/lg/aircon.js +37 -18
- package/bpk-component-icon/lg/aircraft.js +39 -21
- package/bpk-component-icon/lg/airline--multiple.js +37 -18
- package/bpk-component-icon/lg/airline.js +37 -18
- package/bpk-component-icon/lg/airports.js +37 -18
- package/bpk-component-icon/lg/alert--active.js +37 -18
- package/bpk-component-icon/lg/alert--add.js +37 -18
- package/bpk-component-icon/lg/alert--expired.js +37 -18
- package/bpk-component-icon/lg/alert--remove.js +37 -18
- package/bpk-component-icon/lg/arrow-down.js +37 -18
- package/bpk-component-icon/lg/arrow-left.js +37 -18
- package/bpk-component-icon/lg/arrow-right.js +37 -18
- package/bpk-component-icon/lg/arrow-up.js +37 -18
- package/bpk-component-icon/lg/award.js +37 -18
- package/bpk-component-icon/lg/baby-carriage.js +37 -18
- package/bpk-component-icon/lg/baggage--add.js +37 -18
- package/bpk-component-icon/lg/baggage--remove.js +37 -18
- package/bpk-component-icon/lg/baggage-cabin-add.js +37 -18
- package/bpk-component-icon/lg/baggage-cabin-not-included.js +37 -18
- package/bpk-component-icon/lg/baggage-cabin.js +37 -18
- package/bpk-component-icon/lg/baggage-checked-add.js +37 -18
- package/bpk-component-icon/lg/baggage-checked-not-included.js +37 -18
- package/bpk-component-icon/lg/baggage-checked.js +37 -18
- package/bpk-component-icon/lg/baggage-cross.js +37 -18
- package/bpk-component-icon/lg/baggage-generic.js +37 -18
- package/bpk-component-icon/lg/baggage-tick.js +37 -18
- package/bpk-component-icon/lg/baggage.js +37 -18
- package/bpk-component-icon/lg/bar.js +37 -18
- package/bpk-component-icon/lg/beach.js +39 -21
- package/bpk-component-icon/lg/beer.js +37 -18
- package/bpk-component-icon/lg/breakfast-cross.js +37 -18
- package/bpk-component-icon/lg/breakfast-tick.js +37 -18
- package/bpk-component-icon/lg/bus.js +37 -18
- package/bpk-component-icon/lg/business.js +37 -18
- package/bpk-component-icon/lg/cafe.js +37 -18
- package/bpk-component-icon/lg/calendar.js +37 -18
- package/bpk-component-icon/lg/call-back.js +39 -21
- package/bpk-component-icon/lg/camera.js +37 -18
- package/bpk-component-icon/lg/camper-van.js +39 -21
- package/bpk-component-icon/lg/car-door.js +37 -18
- package/bpk-component-icon/lg/car-wash.js +39 -21
- package/bpk-component-icon/lg/cars-flexible.js +37 -18
- package/bpk-component-icon/lg/cars.js +39 -21
- package/bpk-component-icon/lg/center-location.js +37 -18
- package/bpk-component-icon/lg/chart.js +37 -18
- package/bpk-component-icon/lg/chauffeur.js +37 -18
- package/bpk-component-icon/lg/chevron-down.js +37 -18
- package/bpk-component-icon/lg/chevron-left.js +37 -18
- package/bpk-component-icon/lg/chevron-right.js +37 -18
- package/bpk-component-icon/lg/chevron-up.js +37 -18
- package/bpk-component-icon/lg/child-seat.js +37 -18
- package/bpk-component-icon/lg/child.js +37 -18
- package/bpk-component-icon/lg/city-center.js +37 -18
- package/bpk-component-icon/lg/city.js +37 -18
- package/bpk-component-icon/lg/clean-policy.js +37 -18
- package/bpk-component-icon/lg/clean.js +41 -23
- package/bpk-component-icon/lg/cleaning-medical.js +37 -18
- package/bpk-component-icon/lg/cloakroom.js +41 -23
- package/bpk-component-icon/lg/close-circle.js +37 -18
- package/bpk-component-icon/lg/close.js +37 -18
- package/bpk-component-icon/lg/collapse.js +37 -18
- package/bpk-component-icon/lg/content--copy.js +39 -21
- package/bpk-component-icon/lg/content--event.js +37 -18
- package/bpk-component-icon/lg/content--guides.js +37 -18
- package/bpk-component-icon/lg/currency.js +37 -18
- package/bpk-component-icon/lg/data.js +39 -21
- package/bpk-component-icon/lg/deals.js +37 -18
- package/bpk-component-icon/lg/depart.js +39 -21
- package/bpk-component-icon/lg/device-mid.js +37 -18
- package/bpk-component-icon/lg/device-wide.js +37 -18
- package/bpk-component-icon/lg/direct.js +37 -18
- package/bpk-component-icon/lg/document-csv.js +37 -18
- package/bpk-component-icon/lg/document-pdf.js +37 -18
- package/bpk-component-icon/lg/download.js +39 -21
- package/bpk-component-icon/lg/duration.js +37 -18
- package/bpk-component-icon/lg/eco-leaf.js +37 -18
- package/bpk-component-icon/lg/edit.js +37 -18
- package/bpk-component-icon/lg/education.js +39 -21
- package/bpk-component-icon/lg/electric.js +37 -18
- package/bpk-component-icon/lg/end-call.js +37 -18
- package/bpk-component-icon/lg/estimated.js +37 -18
- package/bpk-component-icon/lg/exclamation-circle.js +37 -18
- package/bpk-component-icon/lg/exclamation.js +37 -18
- package/bpk-component-icon/lg/expand.js +37 -18
- package/bpk-component-icon/lg/explore.js +37 -18
- package/bpk-component-icon/lg/face--blank.js +37 -18
- package/bpk-component-icon/lg/face--happy.js +37 -18
- package/bpk-component-icon/lg/face--sad.js +37 -18
- package/bpk-component-icon/lg/face-id.js +37 -18
- package/bpk-component-icon/lg/face-mask.js +37 -18
- package/bpk-component-icon/lg/family.js +37 -18
- package/bpk-component-icon/lg/fast-track.js +39 -21
- package/bpk-component-icon/lg/fast-train.js +39 -21
- package/bpk-component-icon/lg/filter.js +38 -19
- package/bpk-component-icon/lg/fingerprint.js +37 -18
- package/bpk-component-icon/lg/flag.js +37 -18
- package/bpk-component-icon/lg/flask.js +37 -18
- package/bpk-component-icon/lg/flight-flexible.js +37 -18
- package/bpk-component-icon/lg/flight-landing.js +41 -23
- package/bpk-component-icon/lg/flight-takeoff.js +39 -21
- package/bpk-component-icon/lg/flight.js +39 -21
- package/bpk-component-icon/lg/food.js +37 -18
- package/bpk-component-icon/lg/gears-automatic-circle.js +37 -18
- package/bpk-component-icon/lg/gears-automatic.js +37 -18
- package/bpk-component-icon/lg/gears-manual-circle.js +37 -18
- package/bpk-component-icon/lg/gears-manual.js +37 -18
- package/bpk-component-icon/lg/globe.js +37 -18
- package/bpk-component-icon/lg/grid-layout.js +37 -18
- package/bpk-component-icon/lg/headset.js +37 -18
- package/bpk-component-icon/lg/health-fitness.js +37 -18
- package/bpk-component-icon/lg/heart--outline.js +37 -18
- package/bpk-component-icon/lg/heart.js +37 -18
- package/bpk-component-icon/lg/help-circle.js +37 -18
- package/bpk-component-icon/lg/help.js +37 -18
- package/bpk-component-icon/lg/hide.js +37 -18
- package/bpk-component-icon/lg/hotel-flexible.js +37 -18
- package/bpk-component-icon/lg/hotels--disabled-facilities.js +37 -18
- package/bpk-component-icon/lg/hotels--jacuzzi.js +37 -18
- package/bpk-component-icon/lg/hotels--pets-allowed.js +37 -18
- package/bpk-component-icon/lg/hotels--smoking.js +37 -18
- package/bpk-component-icon/lg/hotels.js +37 -18
- package/bpk-component-icon/lg/infant.js +37 -18
- package/bpk-component-icon/lg/information--language-alert.js +37 -18
- package/bpk-component-icon/lg/information--language-question.js +37 -18
- package/bpk-component-icon/lg/information--language.js +37 -18
- package/bpk-component-icon/lg/information-circle.js +37 -18
- package/bpk-component-icon/lg/information.js +37 -18
- package/bpk-component-icon/lg/insurance.js +37 -18
- package/bpk-component-icon/lg/key.js +37 -18
- package/bpk-component-icon/lg/keypad.js +37 -18
- package/bpk-component-icon/lg/landmark.js +37 -18
- package/bpk-component-icon/lg/language.js +37 -18
- package/bpk-component-icon/lg/legroom--extra.js +39 -21
- package/bpk-component-icon/lg/legroom--normal.js +39 -21
- package/bpk-component-icon/lg/legroom--reduced.js +39 -21
- package/bpk-component-icon/lg/leisure.js +37 -18
- package/bpk-component-icon/lg/lightning.js +37 -18
- package/bpk-component-icon/lg/list.js +37 -18
- package/bpk-component-icon/lg/location.js +37 -18
- package/bpk-component-icon/lg/lock.js +37 -18
- package/bpk-component-icon/lg/logout.js +39 -21
- package/bpk-component-icon/lg/long-arrow-down.js +37 -18
- package/bpk-component-icon/lg/long-arrow-left.js +37 -18
- package/bpk-component-icon/lg/long-arrow-right.js +37 -18
- package/bpk-component-icon/lg/long-arrow-up.js +37 -18
- package/bpk-component-icon/lg/lounge.js +39 -21
- package/bpk-component-icon/lg/luggageall.js +37 -18
- package/bpk-component-icon/lg/mail.js +39 -21
- package/bpk-component-icon/lg/map.js +37 -18
- package/bpk-component-icon/lg/meal.js +37 -18
- package/bpk-component-icon/lg/media.js +37 -18
- package/bpk-component-icon/lg/menu--horizontal.js +37 -18
- package/bpk-component-icon/lg/menu--vertical.js +37 -18
- package/bpk-component-icon/lg/menu.js +37 -18
- package/bpk-component-icon/lg/mileage.js +39 -21
- package/bpk-component-icon/lg/minus.js +37 -18
- package/bpk-component-icon/lg/mobile.js +37 -18
- package/bpk-component-icon/lg/money.js +37 -18
- package/bpk-component-icon/lg/multiple-bookings.js +37 -18
- package/bpk-component-icon/lg/music.js +37 -18
- package/bpk-component-icon/lg/mute.js +37 -18
- package/bpk-component-icon/lg/native-android--back.js +37 -18
- package/bpk-component-icon/lg/native-android--close.js +37 -18
- package/bpk-component-icon/lg/native-android--forward.js +37 -18
- package/bpk-component-icon/lg/native-ios-close.js +37 -18
- package/bpk-component-icon/lg/navigation.js +37 -18
- package/bpk-component-icon/lg/new-window.js +39 -21
- package/bpk-component-icon/lg/news.js +37 -18
- package/bpk-component-icon/lg/night.js +37 -18
- package/bpk-component-icon/lg/not-allowed.js +37 -18
- package/bpk-component-icon/lg/onsen.js +37 -18
- package/bpk-component-icon/lg/origin.js +37 -18
- package/bpk-component-icon/lg/paid.js +37 -18
- package/bpk-component-icon/lg/paperclip.js +37 -18
- package/bpk-component-icon/lg/parking.js +37 -18
- package/bpk-component-icon/lg/passport.js +37 -18
- package/bpk-component-icon/lg/pause.js +37 -18
- package/bpk-component-icon/lg/payment-card.js +37 -18
- package/bpk-component-icon/lg/petrol.js +37 -18
- package/bpk-component-icon/lg/phone-call.js +37 -18
- package/bpk-component-icon/lg/picture.js +37 -18
- package/bpk-component-icon/lg/pin.js +37 -18
- package/bpk-component-icon/lg/plane-seat.js +39 -21
- package/bpk-component-icon/lg/play.js +37 -18
- package/bpk-component-icon/lg/plus.js +37 -18
- package/bpk-component-icon/lg/policy.js +37 -18
- package/bpk-component-icon/lg/powerplug.js +37 -18
- package/bpk-component-icon/lg/ppe.js +37 -18
- package/bpk-component-icon/lg/price-alerts.js +37 -18
- package/bpk-component-icon/lg/price-tag.js +37 -18
- package/bpk-component-icon/lg/print.js +37 -18
- package/bpk-component-icon/lg/recent-searches.js +37 -18
- package/bpk-component-icon/lg/redo.js +37 -18
- package/bpk-component-icon/lg/refresh.js +37 -18
- package/bpk-component-icon/lg/return.js +39 -21
- package/bpk-component-icon/lg/room.js +37 -18
- package/bpk-component-icon/lg/scales.js +39 -21
- package/bpk-component-icon/lg/search.js +37 -18
- package/bpk-component-icon/lg/self-service.js +37 -18
- package/bpk-component-icon/lg/send-message.js +37 -18
- package/bpk-component-icon/lg/services.js +37 -18
- package/bpk-component-icon/lg/settings.js +37 -18
- package/bpk-component-icon/lg/share--android.js +37 -18
- package/bpk-component-icon/lg/share--ios.js +39 -21
- package/bpk-component-icon/lg/share.js +37 -18
- package/bpk-component-icon/lg/single-booking.js +37 -18
- package/bpk-component-icon/lg/social-distancing.js +39 -21
- package/bpk-component-icon/lg/social-like.js +37 -18
- package/bpk-component-icon/lg/sort-down.js +37 -18
- package/bpk-component-icon/lg/sort-up.js +37 -18
- package/bpk-component-icon/lg/sort.js +37 -18
- package/bpk-component-icon/lg/speaker.js +39 -21
- package/bpk-component-icon/lg/star-half.js +37 -18
- package/bpk-component-icon/lg/star-outline.js +37 -18
- package/bpk-component-icon/lg/star.js +37 -18
- package/bpk-component-icon/lg/stops.js +37 -18
- package/bpk-component-icon/lg/swap--horizontal.js +37 -18
- package/bpk-component-icon/lg/swap--vertical.js +37 -18
- package/bpk-component-icon/lg/swap.js +37 -18
- package/bpk-component-icon/lg/taxi.js +39 -21
- package/bpk-component-icon/lg/thumbs-down.js +37 -18
- package/bpk-component-icon/lg/thumbs-up.js +37 -18
- package/bpk-component-icon/lg/tick-circle.js +37 -18
- package/bpk-component-icon/lg/tick.js +37 -18
- package/bpk-component-icon/lg/ticket-flexible.js +37 -18
- package/bpk-component-icon/lg/ticket.js +37 -18
- package/bpk-component-icon/lg/time.js +37 -18
- package/bpk-component-icon/lg/toilets.js +37 -18
- package/bpk-component-icon/lg/train.js +37 -18
- package/bpk-component-icon/lg/transmission-automatic.js +37 -18
- package/bpk-component-icon/lg/transmission-manual.js +37 -18
- package/bpk-component-icon/lg/trash.js +37 -18
- package/bpk-component-icon/lg/trend--down.js +37 -18
- package/bpk-component-icon/lg/trend--steady.js +37 -18
- package/bpk-component-icon/lg/trend--will-rise.js +37 -18
- package/bpk-component-icon/lg/trend.js +37 -18
- package/bpk-component-icon/lg/trips.js +37 -18
- package/bpk-component-icon/lg/undo.js +37 -18
- package/bpk-component-icon/lg/unlock.js +37 -18
- package/bpk-component-icon/lg/unmute.js +39 -21
- package/bpk-component-icon/lg/upgrade.js +37 -18
- package/bpk-component-icon/lg/upload.js +38 -19
- package/bpk-component-icon/lg/use-location.js +37 -18
- package/bpk-component-icon/lg/view.js +37 -18
- package/bpk-component-icon/lg/virus.js +37 -18
- package/bpk-component-icon/lg/wallet.js +39 -21
- package/bpk-component-icon/lg/weather--clear.js +37 -18
- package/bpk-component-icon/lg/weather--cloudy.js +39 -21
- package/bpk-component-icon/lg/weather--fog.js +37 -18
- package/bpk-component-icon/lg/weather--partly-cloudy.js +39 -21
- package/bpk-component-icon/lg/weather--rain.js +41 -23
- package/bpk-component-icon/lg/weather--snow.js +37 -18
- package/bpk-component-icon/lg/weather--thunderstorm.js +41 -23
- package/bpk-component-icon/lg/weather--tornado.js +37 -18
- package/bpk-component-icon/lg/weather--wind.js +37 -18
- package/bpk-component-icon/lg/weather.js +37 -18
- package/bpk-component-icon/lg/wifi.js +37 -18
- package/bpk-component-icon/lg/window--reduce.js +39 -21
- package/bpk-component-icon/lg/window.js +37 -18
- package/bpk-component-icon/lg/world--amer.js +37 -18
- package/bpk-component-icon/lg/world--apac.js +37 -18
- package/bpk-component-icon/lg/world--emea.js +39 -21
- package/bpk-component-icon/sm/accessibility.js +38 -19
- package/bpk-component-icon/sm/account--add.js +38 -19
- package/bpk-component-icon/sm/account--female.js +38 -19
- package/bpk-component-icon/sm/account--id-card.js +38 -19
- package/bpk-component-icon/sm/account--name.js +38 -19
- package/bpk-component-icon/sm/account--permit.js +38 -19
- package/bpk-component-icon/sm/account-circle.js +38 -19
- package/bpk-component-icon/sm/account.js +38 -19
- package/bpk-component-icon/sm/add-circle.js +38 -19
- package/bpk-component-icon/sm/adult.js +38 -19
- package/bpk-component-icon/sm/ai.js +39 -20
- package/bpk-component-icon/sm/aircon.js +38 -19
- package/bpk-component-icon/sm/aircraft.js +40 -22
- package/bpk-component-icon/sm/airline--multiple.js +38 -19
- package/bpk-component-icon/sm/airline.js +38 -19
- package/bpk-component-icon/sm/airports.js +38 -19
- package/bpk-component-icon/sm/alert--active.js +38 -19
- package/bpk-component-icon/sm/alert--add.js +38 -19
- package/bpk-component-icon/sm/alert--expired.js +38 -19
- package/bpk-component-icon/sm/alert--remove.js +38 -19
- package/bpk-component-icon/sm/arrow-down.js +38 -19
- package/bpk-component-icon/sm/arrow-left.js +38 -19
- package/bpk-component-icon/sm/arrow-right.js +38 -19
- package/bpk-component-icon/sm/arrow-up.js +38 -19
- package/bpk-component-icon/sm/award.js +38 -19
- package/bpk-component-icon/sm/baby-carriage.js +38 -19
- package/bpk-component-icon/sm/baggage--add.js +38 -19
- package/bpk-component-icon/sm/baggage--remove.js +38 -19
- package/bpk-component-icon/sm/baggage-cabin-add.js +38 -19
- package/bpk-component-icon/sm/baggage-cabin-not-included.js +40 -21
- package/bpk-component-icon/sm/baggage-cabin.js +38 -19
- package/bpk-component-icon/sm/baggage-checked-add.js +38 -19
- package/bpk-component-icon/sm/baggage-checked-not-included.js +40 -21
- package/bpk-component-icon/sm/baggage-checked.js +38 -19
- package/bpk-component-icon/sm/baggage-cross.js +38 -19
- package/bpk-component-icon/sm/baggage-generic.js +40 -21
- package/bpk-component-icon/sm/baggage-tick.js +38 -19
- package/bpk-component-icon/sm/baggage.js +38 -19
- package/bpk-component-icon/sm/bar.js +38 -19
- package/bpk-component-icon/sm/beach.js +40 -22
- package/bpk-component-icon/sm/beer.js +38 -19
- package/bpk-component-icon/sm/breakfast-cross.js +38 -19
- package/bpk-component-icon/sm/breakfast-tick.js +38 -19
- package/bpk-component-icon/sm/bus.js +40 -22
- package/bpk-component-icon/sm/business.js +38 -19
- package/bpk-component-icon/sm/cafe.js +38 -19
- package/bpk-component-icon/sm/calendar.js +38 -19
- package/bpk-component-icon/sm/call-back.js +40 -22
- package/bpk-component-icon/sm/camera.js +38 -19
- package/bpk-component-icon/sm/camper-van.js +40 -22
- package/bpk-component-icon/sm/car-door.js +38 -19
- package/bpk-component-icon/sm/car-wash.js +40 -22
- package/bpk-component-icon/sm/cars-flexible.js +38 -19
- package/bpk-component-icon/sm/cars.js +40 -22
- package/bpk-component-icon/sm/center-location.js +38 -19
- package/bpk-component-icon/sm/chart.js +38 -19
- package/bpk-component-icon/sm/chauffeur.js +40 -22
- package/bpk-component-icon/sm/chevron-down.js +38 -19
- package/bpk-component-icon/sm/chevron-left.js +38 -19
- package/bpk-component-icon/sm/chevron-right.js +38 -19
- package/bpk-component-icon/sm/chevron-up.js +38 -19
- package/bpk-component-icon/sm/child-seat.js +38 -19
- package/bpk-component-icon/sm/child.js +38 -19
- package/bpk-component-icon/sm/city-center.js +38 -19
- package/bpk-component-icon/sm/city.js +38 -19
- package/bpk-component-icon/sm/clean-policy.js +38 -19
- package/bpk-component-icon/sm/clean.js +40 -22
- package/bpk-component-icon/sm/cleaning-medical.js +38 -19
- package/bpk-component-icon/sm/cloakroom.js +38 -19
- package/bpk-component-icon/sm/close-circle.js +38 -19
- package/bpk-component-icon/sm/close.js +38 -19
- package/bpk-component-icon/sm/collapse.js +38 -19
- package/bpk-component-icon/sm/content--copy.js +40 -22
- package/bpk-component-icon/sm/content--event.js +38 -19
- package/bpk-component-icon/sm/content--guides.js +38 -19
- package/bpk-component-icon/sm/currency.js +38 -19
- package/bpk-component-icon/sm/data.js +40 -22
- package/bpk-component-icon/sm/deals.js +38 -19
- package/bpk-component-icon/sm/depart.js +42 -24
- package/bpk-component-icon/sm/device-mid.js +38 -19
- package/bpk-component-icon/sm/device-wide.js +38 -19
- package/bpk-component-icon/sm/direct.js +40 -22
- package/bpk-component-icon/sm/document-csv.js +38 -19
- package/bpk-component-icon/sm/document-pdf.js +38 -19
- package/bpk-component-icon/sm/download.js +40 -22
- package/bpk-component-icon/sm/duration.js +38 -19
- package/bpk-component-icon/sm/eco-leaf.js +38 -19
- package/bpk-component-icon/sm/edit.js +38 -19
- package/bpk-component-icon/sm/education.js +40 -22
- package/bpk-component-icon/sm/electric.js +38 -19
- package/bpk-component-icon/sm/end-call.js +38 -19
- package/bpk-component-icon/sm/estimated.js +38 -19
- package/bpk-component-icon/sm/exclamation-circle.js +38 -19
- package/bpk-component-icon/sm/exclamation.js +38 -19
- package/bpk-component-icon/sm/expand.js +38 -19
- package/bpk-component-icon/sm/explore.js +38 -19
- package/bpk-component-icon/sm/face--blank.js +38 -19
- package/bpk-component-icon/sm/face--happy.js +38 -19
- package/bpk-component-icon/sm/face--sad.js +38 -19
- package/bpk-component-icon/sm/face-id.js +38 -19
- package/bpk-component-icon/sm/face-mask.js +38 -19
- package/bpk-component-icon/sm/family.js +38 -19
- package/bpk-component-icon/sm/fast-track.js +40 -22
- package/bpk-component-icon/sm/fast-train.js +40 -22
- package/bpk-component-icon/sm/filter.js +39 -20
- package/bpk-component-icon/sm/fingerprint.js +38 -19
- package/bpk-component-icon/sm/flag.js +38 -19
- package/bpk-component-icon/sm/flask.js +38 -19
- package/bpk-component-icon/sm/flight-flexible.js +38 -19
- package/bpk-component-icon/sm/flight-landing.js +42 -24
- package/bpk-component-icon/sm/flight-takeoff.js +40 -22
- package/bpk-component-icon/sm/flight.js +40 -22
- package/bpk-component-icon/sm/food.js +38 -19
- package/bpk-component-icon/sm/gears-automatic-circle.js +38 -19
- package/bpk-component-icon/sm/gears-automatic.js +38 -19
- package/bpk-component-icon/sm/gears-manual-circle.js +38 -19
- package/bpk-component-icon/sm/gears-manual.js +38 -19
- package/bpk-component-icon/sm/globe.js +38 -19
- package/bpk-component-icon/sm/grid-layout.js +38 -19
- package/bpk-component-icon/sm/headset.js +38 -19
- package/bpk-component-icon/sm/health-fitness.js +38 -19
- package/bpk-component-icon/sm/heart--outline.js +38 -19
- package/bpk-component-icon/sm/heart.js +38 -19
- package/bpk-component-icon/sm/help-circle.js +38 -19
- package/bpk-component-icon/sm/help.js +38 -19
- package/bpk-component-icon/sm/hide.js +38 -19
- package/bpk-component-icon/sm/hotel-flexible.js +38 -19
- package/bpk-component-icon/sm/hotels--disabled-facilities.js +38 -19
- package/bpk-component-icon/sm/hotels--jacuzzi.js +40 -22
- package/bpk-component-icon/sm/hotels--pets-allowed.js +38 -19
- package/bpk-component-icon/sm/hotels--smoking.js +38 -19
- package/bpk-component-icon/sm/hotels.js +38 -19
- package/bpk-component-icon/sm/infant.js +40 -22
- package/bpk-component-icon/sm/information--language-alert.js +38 -19
- package/bpk-component-icon/sm/information--language-question.js +38 -19
- package/bpk-component-icon/sm/information--language.js +38 -19
- package/bpk-component-icon/sm/information-circle.js +38 -19
- package/bpk-component-icon/sm/information.js +38 -19
- package/bpk-component-icon/sm/insurance.js +38 -19
- package/bpk-component-icon/sm/key.js +38 -19
- package/bpk-component-icon/sm/keypad.js +38 -19
- package/bpk-component-icon/sm/landmark.js +38 -19
- package/bpk-component-icon/sm/language.js +38 -19
- package/bpk-component-icon/sm/legroom--extra.js +40 -22
- package/bpk-component-icon/sm/legroom--normal.js +40 -22
- package/bpk-component-icon/sm/legroom--reduced.js +40 -22
- package/bpk-component-icon/sm/leisure.js +38 -19
- package/bpk-component-icon/sm/lightning.js +38 -19
- package/bpk-component-icon/sm/list.js +38 -19
- package/bpk-component-icon/sm/location.js +38 -19
- package/bpk-component-icon/sm/lock.js +38 -19
- package/bpk-component-icon/sm/logout.js +40 -22
- package/bpk-component-icon/sm/long-arrow-down.js +39 -20
- package/bpk-component-icon/sm/long-arrow-left.js +39 -20
- package/bpk-component-icon/sm/long-arrow-right.js +39 -20
- package/bpk-component-icon/sm/long-arrow-up.js +39 -20
- package/bpk-component-icon/sm/lounge.js +38 -19
- package/bpk-component-icon/sm/luggageall.js +38 -19
- package/bpk-component-icon/sm/mail.js +40 -22
- package/bpk-component-icon/sm/map.js +38 -19
- package/bpk-component-icon/sm/meal.js +38 -19
- package/bpk-component-icon/sm/media.js +38 -19
- package/bpk-component-icon/sm/menu--horizontal.js +38 -19
- package/bpk-component-icon/sm/menu--vertical.js +38 -19
- package/bpk-component-icon/sm/menu.js +38 -19
- package/bpk-component-icon/sm/mileage.js +40 -22
- package/bpk-component-icon/sm/minus.js +38 -19
- package/bpk-component-icon/sm/mobile.js +38 -19
- package/bpk-component-icon/sm/money.js +38 -19
- package/bpk-component-icon/sm/multiple-bookings.js +38 -19
- package/bpk-component-icon/sm/music.js +38 -19
- package/bpk-component-icon/sm/mute.js +38 -19
- package/bpk-component-icon/sm/native-android--back.js +38 -19
- package/bpk-component-icon/sm/native-android--close.js +38 -19
- package/bpk-component-icon/sm/native-android--forward.js +38 -19
- package/bpk-component-icon/sm/native-ios-close.js +38 -19
- package/bpk-component-icon/sm/navigation.js +38 -19
- package/bpk-component-icon/sm/new-window.js +44 -26
- package/bpk-component-icon/sm/news.js +38 -19
- package/bpk-component-icon/sm/night.js +38 -19
- package/bpk-component-icon/sm/not-allowed.js +38 -19
- package/bpk-component-icon/sm/onsen.js +40 -22
- package/bpk-component-icon/sm/origin.js +38 -19
- package/bpk-component-icon/sm/paid.js +38 -19
- package/bpk-component-icon/sm/paperclip.js +38 -19
- package/bpk-component-icon/sm/parking.js +38 -19
- package/bpk-component-icon/sm/passport.js +38 -19
- package/bpk-component-icon/sm/pause.js +38 -19
- package/bpk-component-icon/sm/payment-card.js +38 -19
- package/bpk-component-icon/sm/petrol.js +38 -19
- package/bpk-component-icon/sm/phone-call.js +38 -19
- package/bpk-component-icon/sm/picture.js +38 -19
- package/bpk-component-icon/sm/pin.js +38 -19
- package/bpk-component-icon/sm/plane-seat.js +40 -22
- package/bpk-component-icon/sm/play.js +38 -19
- package/bpk-component-icon/sm/plus.js +38 -19
- package/bpk-component-icon/sm/policy.js +38 -19
- package/bpk-component-icon/sm/powerplug.js +38 -19
- package/bpk-component-icon/sm/ppe.js +38 -19
- package/bpk-component-icon/sm/price-alerts.js +38 -19
- package/bpk-component-icon/sm/price-tag.js +38 -19
- package/bpk-component-icon/sm/print.js +38 -19
- package/bpk-component-icon/sm/recent-searches.js +38 -19
- package/bpk-component-icon/sm/redo.js +38 -19
- package/bpk-component-icon/sm/refresh.js +38 -19
- package/bpk-component-icon/sm/return.js +42 -24
- package/bpk-component-icon/sm/room.js +38 -19
- package/bpk-component-icon/sm/scales.js +38 -19
- package/bpk-component-icon/sm/search.js +38 -19
- package/bpk-component-icon/sm/self-service.js +38 -19
- package/bpk-component-icon/sm/send-message.js +38 -19
- package/bpk-component-icon/sm/services.js +38 -19
- package/bpk-component-icon/sm/settings.js +38 -19
- package/bpk-component-icon/sm/share--android.js +38 -19
- package/bpk-component-icon/sm/share--ios.js +42 -24
- package/bpk-component-icon/sm/share.js +38 -19
- package/bpk-component-icon/sm/single-booking.js +38 -19
- package/bpk-component-icon/sm/social-distancing.js +40 -22
- package/bpk-component-icon/sm/social-like.js +38 -19
- package/bpk-component-icon/sm/sort-down.js +38 -19
- package/bpk-component-icon/sm/sort-up.js +38 -19
- package/bpk-component-icon/sm/sort.js +38 -19
- package/bpk-component-icon/sm/speaker.js +38 -19
- package/bpk-component-icon/sm/star-half.js +38 -19
- package/bpk-component-icon/sm/star-outline.js +38 -19
- package/bpk-component-icon/sm/star.js +38 -19
- package/bpk-component-icon/sm/stops.js +38 -19
- package/bpk-component-icon/sm/swap--horizontal.js +39 -20
- package/bpk-component-icon/sm/swap--vertical.js +38 -19
- package/bpk-component-icon/sm/swap.js +39 -20
- package/bpk-component-icon/sm/taxi.js +40 -22
- package/bpk-component-icon/sm/thumbs-down.js +38 -19
- package/bpk-component-icon/sm/thumbs-up.js +38 -19
- package/bpk-component-icon/sm/tick-circle.js +38 -19
- package/bpk-component-icon/sm/tick.js +38 -19
- package/bpk-component-icon/sm/ticket-flexible.js +38 -19
- package/bpk-component-icon/sm/ticket.js +38 -19
- package/bpk-component-icon/sm/time.js +38 -19
- package/bpk-component-icon/sm/toilets.js +38 -19
- package/bpk-component-icon/sm/train.js +38 -19
- package/bpk-component-icon/sm/transmission-automatic.js +38 -19
- package/bpk-component-icon/sm/transmission-manual.js +38 -19
- package/bpk-component-icon/sm/trash.js +38 -19
- package/bpk-component-icon/sm/trend--down.js +38 -19
- package/bpk-component-icon/sm/trend--steady.js +39 -20
- package/bpk-component-icon/sm/trend--will-rise.js +38 -19
- package/bpk-component-icon/sm/trend.js +38 -19
- package/bpk-component-icon/sm/trips.js +38 -19
- package/bpk-component-icon/sm/undo.js +38 -19
- package/bpk-component-icon/sm/unlock.js +38 -19
- package/bpk-component-icon/sm/unmute.js +40 -22
- package/bpk-component-icon/sm/upgrade.js +38 -19
- package/bpk-component-icon/sm/upload.js +39 -20
- package/bpk-component-icon/sm/use-location.js +38 -19
- package/bpk-component-icon/sm/view.js +38 -19
- package/bpk-component-icon/sm/virus.js +38 -19
- package/bpk-component-icon/sm/wallet.js +38 -19
- package/bpk-component-icon/sm/weather--clear.js +38 -19
- package/bpk-component-icon/sm/weather--cloudy.js +40 -22
- package/bpk-component-icon/sm/weather--fog.js +38 -19
- package/bpk-component-icon/sm/weather--partly-cloudy.js +38 -19
- package/bpk-component-icon/sm/weather--rain.js +40 -22
- package/bpk-component-icon/sm/weather--snow.js +38 -19
- package/bpk-component-icon/sm/weather--thunderstorm.js +42 -24
- package/bpk-component-icon/sm/weather--tornado.js +38 -19
- package/bpk-component-icon/sm/weather--wind.js +40 -22
- package/bpk-component-icon/sm/weather.js +38 -19
- package/bpk-component-icon/sm/wifi.js +38 -19
- package/bpk-component-icon/sm/window--reduce.js +40 -22
- package/bpk-component-icon/sm/window.js +38 -19
- package/bpk-component-icon/sm/world--amer.js +38 -19
- package/bpk-component-icon/sm/world--apac.js +38 -19
- package/bpk-component-icon/sm/world--emea.js +38 -19
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +26 -13
- package/bpk-component-icon/src/withAlignment.js +32 -25
- package/bpk-component-icon/src/withDescription.js +35 -28
- package/bpk-component-icon/src/withRtlSupport.js +13 -5
- package/bpk-component-image/index.js +38 -8
- package/bpk-component-image/src/BpkBackgroundImage.js +80 -72
- package/bpk-component-image/src/BpkImage.js +110 -93
- package/bpk-component-image/src/BpkImageBorderRadiusStyles.js +8 -1
- package/bpk-component-image/src/withLazyLoading.js +98 -87
- package/bpk-component-image/src/withLoadingBehavior.js +41 -32
- package/bpk-component-infinite-scroll/index.js +26 -3
- package/bpk-component-infinite-scroll/src/DataSource.js +19 -5
- package/bpk-component-infinite-scroll/src/intersection-observer.js +2 -0
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +218 -206
- package/bpk-component-input/index.js +49 -7
- package/bpk-component-input/src/BpkClearButton.js +36 -20
- package/bpk-component-input/src/BpkInput.js +65 -52
- package/bpk-component-input/src/common-types.js +32 -20
- package/bpk-component-input/src/themeAttributes.js +8 -2
- package/bpk-component-input/src/withOpenEvents.js +98 -83
- package/bpk-component-label/index.js +11 -2
- package/bpk-component-label/src/BpkLabel.js +42 -26
- package/bpk-component-link/index.js +33 -5
- package/bpk-component-link/src/BpkButtonLink.js +44 -22
- package/bpk-component-link/src/BpkLink.js +60 -30
- package/bpk-component-link/src/themeAttributes.js +10 -2
- package/bpk-component-list/index.js +20 -19
- package/bpk-component-list/src/BpkList.js +18 -10
- package/bpk-component-list/src/BpkListItem.js +17 -9
- package/bpk-component-loading-button/index.js +18 -3
- package/bpk-component-loading-button/src/BpkLoadingButton.js +66 -49
- package/bpk-component-map/index.js +60 -8
- package/bpk-component-map/src/BpkBasicMapMarker.js +32 -15
- package/bpk-component-map/src/BpkIconMarker.js +52 -36
- package/bpk-component-map/src/BpkIconMarkerBackground.js +37 -20
- package/bpk-component-map/src/BpkMap.js +41 -33
- package/bpk-component-map/src/BpkOverlayView.js +32 -15
- package/bpk-component-map/src/BpkPriceMarker.js +59 -40
- package/bpk-component-map/src/DefaultLoadingElement.js +17 -9
- package/bpk-component-map/src/common-types.js +13 -5
- package/bpk-component-map/src/themeAttributes.js +13 -4
- package/bpk-component-map/src/withGoogleMapsScript.js +38 -21
- package/bpk-component-mobile-scroll-container/index.js +11 -2
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +109 -91
- package/bpk-component-modal/index.js +37 -7
- package/bpk-component-modal/src/BpkModal.js +50 -35
- package/bpk-component-modal/src/BpkModalInner.js +28 -18
- package/bpk-component-modal/src/BpkModalV2/BpkModal.js +35 -26
- package/bpk-component-modal/src/customPropTypes.js +11 -3
- package/bpk-component-modal/src/legacy-prop-types.js +64 -52
- package/bpk-component-modal/src/themeAttributes.js +9 -3
- package/bpk-component-navigation-bar/index.js +32 -6
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +63 -47
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +43 -23
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +43 -24
- package/bpk-component-navigation-bar/src/themeAttributes.js +9 -1
- package/bpk-component-nudger/index.js +24 -6
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +54 -40
- package/bpk-component-nudger/src/BpkNudger.js +38 -21
- package/bpk-component-nudger/src/common-types.js +5 -1
- package/bpk-component-nudger/src/themeAttributes.js +9 -3
- package/bpk-component-nudger-row/index.js +10 -3
- package/bpk-component-nudger-row/src/BpkNudgerRow.js +26 -16
- package/bpk-component-overlay/index.js +18 -3
- package/bpk-component-overlay/src/BpkOverlay.js +34 -19
- package/bpk-component-page-indicator/index.js +25 -4
- package/bpk-component-page-indicator/src/BpkPageIndicator.js +38 -28
- package/bpk-component-page-indicator/src/NavButton.js +26 -17
- package/bpk-component-pagination/index.js +17 -5
- package/bpk-component-pagination/src/BpkPagination.js +51 -37
- package/bpk-component-pagination/src/BpkPaginationBreak.js +13 -5
- package/bpk-component-pagination/src/BpkPaginationList.js +25 -17
- package/bpk-component-pagination/src/BpkPaginationNudger.js +28 -21
- package/bpk-component-pagination/src/BpkPaginationPage.js +21 -13
- package/bpk-component-pagination/src/themeAttributes.js +9 -2
- package/bpk-component-panel/index.js +10 -3
- package/bpk-component-panel/src/BpkPanel.js +36 -21
- package/bpk-component-phone-input/index.js +11 -2
- package/bpk-component-phone-input/src/BpkPhoneInput.js +95 -77
- package/bpk-component-popover/index.js +32 -4
- package/bpk-component-popover/src/BpkPopover.js +80 -65
- package/bpk-component-popover/src/BpkPopoverPortal.js +119 -104
- package/bpk-component-popover/src/constants.js +11 -3
- package/bpk-component-popover/src/keyboardFocusScope.js +14 -6
- package/bpk-component-popover/src/themeAttributes.js +10 -2
- package/bpk-component-price/index.js +24 -4
- package/bpk-component-price/src/BpkPrice.js +62 -45
- package/bpk-component-price/src/common-types.js +11 -3
- package/bpk-component-progress/index.js +18 -4
- package/bpk-component-progress/src/BpkProgress.js +91 -72
- package/bpk-component-progress/src/themeAttributes.js +9 -1
- package/bpk-component-radio/index.js +18 -4
- package/bpk-component-radio/src/BpkRadio.js +44 -29
- package/bpk-component-radio/src/themeAttributes.js +9 -1
- package/bpk-component-rating/index.js +24 -4
- package/bpk-component-rating/src/BpkRating.js +72 -54
- package/bpk-component-rating/src/common-types.js +11 -3
- package/bpk-component-rtl-toggle/index.js +17 -5
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +50 -44
- package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +46 -34
- package/bpk-component-rtl-toggle/src/utils.js +9 -1
- package/bpk-component-scrollable-calendar/index.js +38 -8
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.js +12 -5
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +44 -32
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +39 -23
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +112 -101
- package/bpk-component-scrollable-calendar/src/utils.js +11 -4
- package/bpk-component-scrollable-calendar/test-utils.js +31 -14
- package/bpk-component-section-header/index.js +17 -4
- package/bpk-component-section-header/src/BpkSectionHeader.js +20 -12
- package/bpk-component-section-list/index.js +25 -5
- package/bpk-component-section-list/src/BpkSectionList.js +26 -10
- package/bpk-component-section-list/src/BpkSectionListItem.js +52 -36
- package/bpk-component-section-list/src/BpkSectionListSection.js +40 -23
- package/bpk-component-select/index.js +18 -4
- package/bpk-component-select/src/BpkSelect.js +54 -39
- package/bpk-component-select/src/themeAttributes.js +8 -2
- package/bpk-component-skip-link/index.js +18 -4
- package/bpk-component-skip-link/src/BpkSkipLink.js +35 -18
- package/bpk-component-skip-link/src/themeAttributes.js +8 -2
- package/bpk-component-slider/index.js +17 -5
- package/bpk-component-slider/src/BpkSlider.js +30 -16
- package/bpk-component-slider/src/themeAttributes.js +8 -2
- package/bpk-component-spinner/index.js +41 -22
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +49 -35
- package/bpk-component-spinner/src/BpkLargeSpinner.js +51 -37
- package/bpk-component-spinner/src/BpkSpinner.js +51 -37
- package/bpk-component-spinner/src/spinnerTypes.js +10 -2
- package/bpk-component-spinner/src/themeAttributes.js +9 -1
- package/bpk-component-split-input/index.js +18 -3
- package/bpk-component-split-input/src/BpkInputField.js +44 -27
- package/bpk-component-split-input/src/BpkSplitInput.js +217 -201
- package/bpk-component-star-rating/index.js +66 -8
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +44 -28
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +54 -37
- package/bpk-component-star-rating/src/BpkStar.js +59 -42
- package/bpk-component-star-rating/src/BpkStarRating.js +50 -30
- package/bpk-component-star-rating/src/themeAttributes.js +9 -1
- package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +67 -55
- package/bpk-component-switch/index.js +18 -4
- package/bpk-component-switch/src/BpkSwitch.js +36 -21
- package/bpk-component-switch/src/themeAttributes.js +8 -2
- package/bpk-component-table/index.js +48 -23
- package/bpk-component-table/src/BpkTable.js +33 -16
- package/bpk-component-table/src/BpkTableBody.js +33 -22
- package/bpk-component-table/src/BpkTableCell.js +32 -15
- package/bpk-component-table/src/BpkTableHead.js +33 -22
- package/bpk-component-table/src/BpkTableHeadCell.js +30 -14
- package/bpk-component-table/src/BpkTableRow.js +33 -22
- package/bpk-component-text/index.js +17 -4
- package/bpk-component-text/src/BpkText.js +35 -18
- package/bpk-component-textarea/index.js +18 -4
- package/bpk-component-textarea/src/BpkTextarea.js +37 -21
- package/bpk-component-textarea/src/themeAttributes.js +9 -1
- package/bpk-component-theme-toggle/index.js +17 -5
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +79 -70
- package/bpk-component-theme-toggle/src/theming.js +47 -39
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +51 -41
- package/bpk-component-theme-toggle/src/utils.js +8 -1
- package/bpk-component-ticket/index.js +11 -2
- package/bpk-component-ticket/src/BpkTicket.js +56 -39
- package/bpk-component-tooltip/index.js +17 -5
- package/bpk-component-tooltip/src/BpkTooltip.js +41 -27
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +116 -101
- package/bpk-component-tooltip/src/constants.js +13 -4
- package/bpk-mixins/sass-functions.js +29 -0
- package/bpk-react-utils/index.js +88 -22
- package/bpk-react-utils/src/Portal.js +48 -38
- package/bpk-react-utils/src/TransitionInitialMount.js +15 -6
- package/bpk-react-utils/src/cssModules.js +9 -3
- package/bpk-react-utils/src/deprecated.js +8 -1
- package/bpk-react-utils/src/deviceDetection.js +9 -1
- package/bpk-react-utils/src/isRTL.js +8 -1
- package/bpk-react-utils/src/withDefaultProps.js +34 -18
- package/bpk-react-utils/src/wrapDisplayName.js +8 -1
- package/bpk-scrim-utils/index.js +18 -6
- package/bpk-scrim-utils/src/BpkScrim.js +15 -7
- package/bpk-scrim-utils/src/scroll-utils.js +19 -7
- package/bpk-scrim-utils/src/withScrim.js +82 -65
- package/bpk-storybook-utils/index.js +26 -6
- package/bpk-storybook-utils/src/BpkDarkExampleWrapper.js +28 -12
- package/bpk-storybook-utils/src/BpkStorybookUtils.js +10 -3
- package/bpk-stylesheets/base.css +1670 -0
- package/bpk-stylesheets/base.js +171 -0
- package/bpk-stylesheets/build.js +46 -0
- package/bpk-stylesheets/font.css +18 -0
- package/bpk-stylesheets/font.js +3 -0
- package/bpk-stylesheets/index.css +18 -0
- package/bpk-stylesheets/index.js +38 -0
- package/bpk-stylesheets/license-header.js +32 -0
- package/bpk-stylesheets/webpack.config.babel.js +85 -0
- package/bpk-theming/index.js +10 -3
- package/bpk-theming/src/BpkThemeProvider.js +40 -29
- package/package.json +3 -2
- package/bpk-component-flare/src/corner-radius.d.ts +0 -6
- package/bpk-component-flare/src/pointer.d.ts +0 -6
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _arrowLeft = _interopRequireDefault(require("../../bpk-component-icon/lg/arrow-left"));
|
|
8
|
+
var _arrowRight = _interopRequireDefault(require("../../bpk-component-icon/lg/arrow-right"));
|
|
9
|
+
var _bpkComponentSelect = _interopRequireDefault(require("../../bpk-component-select"));
|
|
10
|
+
var _bpkReactUtils = require("../../bpk-react-utils");
|
|
11
|
+
var _bpkComponentAriaLive = _interopRequireDefault(require("../../bpk-component-aria-live"));
|
|
12
|
+
var _dateUtils = require("./date-utils");
|
|
13
|
+
var _BpkCalendarNavModule = _interopRequireDefault(require("./BpkCalendarNav.module.css"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1
16
|
/*
|
|
2
17
|
* Backpack - Skyscanner's Design System
|
|
3
18
|
*
|
|
@@ -17,18 +32,12 @@
|
|
|
17
32
|
*/
|
|
18
33
|
|
|
19
34
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
|
-
|
|
35
|
+
|
|
21
36
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
|
-
|
|
37
|
+
|
|
23
38
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import BpkAriaLive from "../../bpk-component-aria-live";
|
|
27
|
-
import { addMonths, formatIsoMonth, getMonthRange, getMonthsInRange, isWithinRange, parseIsoDate, startOfMonth } from "./date-utils";
|
|
28
|
-
import STYLES from "./BpkCalendarNav.module.css";
|
|
29
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
30
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
|
-
const getClassName = cssModules(STYLES);
|
|
39
|
+
|
|
40
|
+
const getClassName = (0, _bpkReactUtils.cssModules)(_BpkCalendarNavModule.default);
|
|
32
41
|
const changeMonth = ({
|
|
33
42
|
callback,
|
|
34
43
|
max,
|
|
@@ -38,7 +47,7 @@ const changeMonth = ({
|
|
|
38
47
|
}) => event => {
|
|
39
48
|
// Safeguard for disabled buttons is due to React bug in Chrome: https://github.com/facebook/react/issues/8308
|
|
40
49
|
// PR: https://github.com/facebook/react/pull/8329 - unresolved as of 22/12/2016
|
|
41
|
-
if (isWithinRange(month, {
|
|
50
|
+
if ((0, _dateUtils.isWithinRange)(month, {
|
|
42
51
|
start: min,
|
|
43
52
|
end: max
|
|
44
53
|
})) {
|
|
@@ -61,23 +70,23 @@ const BpkCalendarNav = ({
|
|
|
61
70
|
onMonthChange = () => {},
|
|
62
71
|
previousMonthLabel
|
|
63
72
|
}) => {
|
|
64
|
-
const baseMonth = startOfMonth(month);
|
|
73
|
+
const baseMonth = (0, _dateUtils.startOfMonth)(month);
|
|
65
74
|
const {
|
|
66
75
|
max,
|
|
67
76
|
min
|
|
68
|
-
} = getMonthRange(minDate, maxDate);
|
|
69
|
-
const navigatableMonths = getMonthsInRange(minDate, maxDate);
|
|
70
|
-
const prevMonth = addMonths(baseMonth, -1);
|
|
71
|
-
const nextMonth = addMonths(baseMonth, 1);
|
|
72
|
-
return /*#__PURE__*/
|
|
77
|
+
} = (0, _dateUtils.getMonthRange)(minDate, maxDate);
|
|
78
|
+
const navigatableMonths = (0, _dateUtils.getMonthsInRange)(minDate, maxDate);
|
|
79
|
+
const prevMonth = (0, _dateUtils.addMonths)(baseMonth, -1);
|
|
80
|
+
const nextMonth = (0, _dateUtils.addMonths)(baseMonth, 1);
|
|
81
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
82
|
className: getClassName('bpk-calendar-nav'),
|
|
74
|
-
children: /*#__PURE__*/
|
|
83
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
75
84
|
style: {
|
|
76
85
|
display: 'table-row'
|
|
77
86
|
},
|
|
78
|
-
children: [/*#__PURE__*/
|
|
87
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
88
|
className: getClassName('bpk-calendar-nav__nudger'),
|
|
80
|
-
children: /*#__PURE__*/
|
|
89
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
81
90
|
type: "button",
|
|
82
91
|
className: getClassName('bpk-calendar-nav__button'),
|
|
83
92
|
id: `${id}_month_nudger_previous`,
|
|
@@ -88,43 +97,43 @@ const BpkCalendarNav = ({
|
|
|
88
97
|
callback: onMonthChange,
|
|
89
98
|
source: 'PREV'
|
|
90
99
|
}),
|
|
91
|
-
disabled: disabled || !isWithinRange(prevMonth, {
|
|
100
|
+
disabled: disabled || !(0, _dateUtils.isWithinRange)(prevMonth, {
|
|
92
101
|
start: min,
|
|
93
102
|
end: max
|
|
94
103
|
}),
|
|
95
|
-
children: [/*#__PURE__*/
|
|
104
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_arrowLeft.default, {
|
|
96
105
|
className: getClassName('bpk-calendar-nav__icon')
|
|
97
|
-
}), /*#__PURE__*/
|
|
106
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
98
107
|
className: getClassName('bpk-calendar-nav__text--hidden'),
|
|
99
108
|
children: previousMonthLabel
|
|
100
109
|
})]
|
|
101
110
|
})
|
|
102
|
-
}), /*#__PURE__*/
|
|
111
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
103
112
|
className: getClassName('bpk-calendar-nav__month'),
|
|
104
|
-
children: [/*#__PURE__*/
|
|
113
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
105
114
|
htmlFor: `${id}_select`,
|
|
106
115
|
className: getClassName('bpk-calendar-nav__text--hidden'),
|
|
107
116
|
children: changeMonthLabel
|
|
108
|
-
}), /*#__PURE__*/
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bpkComponentSelect.default, {
|
|
109
118
|
id: `${id}_select`,
|
|
110
119
|
name: "months",
|
|
111
|
-
value: formatIsoMonth(baseMonth),
|
|
120
|
+
value: (0, _dateUtils.formatIsoMonth)(baseMonth),
|
|
112
121
|
disabled: disabled,
|
|
113
122
|
onChange: event => {
|
|
114
123
|
event.persist();
|
|
115
124
|
onMonthChange(event, {
|
|
116
|
-
month: parseIsoDate(event.target.value),
|
|
125
|
+
month: (0, _dateUtils.parseIsoDate)(event.target.value),
|
|
117
126
|
source: 'SELECT'
|
|
118
127
|
});
|
|
119
128
|
},
|
|
120
|
-
children: navigatableMonths.map(m => /*#__PURE__*/
|
|
121
|
-
value: formatIsoMonth(m),
|
|
129
|
+
children: navigatableMonths.map(m => /*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
|
|
130
|
+
value: (0, _dateUtils.formatIsoMonth)(m),
|
|
122
131
|
children: formatMonth(m)
|
|
123
132
|
}, m.toString()))
|
|
124
133
|
})]
|
|
125
|
-
}), /*#__PURE__*/
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
126
135
|
className: getClassName('bpk-calendar-nav__nudger'),
|
|
127
|
-
children: /*#__PURE__*/
|
|
136
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
128
137
|
type: "button",
|
|
129
138
|
className: getClassName('bpk-calendar-nav__button'),
|
|
130
139
|
id: `${id}_month_nudger_next`,
|
|
@@ -135,21 +144,22 @@ const BpkCalendarNav = ({
|
|
|
135
144
|
callback: onMonthChange,
|
|
136
145
|
source: 'NEXT'
|
|
137
146
|
}),
|
|
138
|
-
disabled: disabled || !isWithinRange(addMonths(baseMonth, 1), {
|
|
147
|
+
disabled: disabled || !(0, _dateUtils.isWithinRange)((0, _dateUtils.addMonths)(baseMonth, 1), {
|
|
139
148
|
start: min,
|
|
140
149
|
end: max
|
|
141
150
|
}),
|
|
142
|
-
children: [/*#__PURE__*/
|
|
151
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_arrowRight.default, {
|
|
143
152
|
className: getClassName('bpk-calendar-nav__icon')
|
|
144
|
-
}), /*#__PURE__*/
|
|
153
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
145
154
|
className: getClassName('bpk-calendar-nav__text--hidden'),
|
|
146
155
|
children: nextMonthLabel
|
|
147
156
|
})]
|
|
148
157
|
})
|
|
149
|
-
}), /*#__PURE__*/
|
|
158
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bpkComponentAriaLive.default, {
|
|
150
159
|
children: formatMonth(baseMonth)
|
|
151
160
|
})]
|
|
152
161
|
})
|
|
153
162
|
});
|
|
154
163
|
};
|
|
155
|
-
|
|
164
|
+
var _default = BpkCalendarNav;
|
|
165
|
+
exports.default = _default;
|
|
@@ -1,32 +1,41 @@
|
|
|
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
|
-
*/
|
|
1
|
+
"use strict";
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _bpkReactUtils = require("../../bpk-react-utils");
|
|
9
|
+
var _dateUtils = require("./date-utils");
|
|
10
|
+
var _customProptypes = require("./custom-proptypes");
|
|
11
|
+
var _BpkCalendarGridModule = _interopRequireDefault(require("./BpkCalendarGrid.module.css"));
|
|
12
|
+
var _BpkCalendarDate = require("./BpkCalendarDate");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
|
|
20
|
+
* Backpack - Skyscanner's Design System
|
|
21
|
+
*
|
|
22
|
+
* Copyright 2016 Skyscanner Ltd
|
|
23
|
+
*
|
|
24
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
25
|
+
* you may not use this file except in compliance with the License.
|
|
26
|
+
* You may obtain a copy of the License at
|
|
27
|
+
*
|
|
28
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
29
|
+
*
|
|
30
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
31
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
32
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
33
|
+
* See the License for the specific language governing permissions and
|
|
34
|
+
* limitations under the License.
|
|
35
|
+
*/ // TODO: Move this to `Week.scss`
|
|
24
36
|
// This should be using its own css file as `BpkCalendarGrid` is also importing `BpkCalendarGrid.module.css`
|
|
25
37
|
// and the order of css imports can break the component.
|
|
26
|
-
|
|
27
|
-
import { SELECTION_TYPES } from "./BpkCalendarDate";
|
|
28
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
|
-
const getClassName = cssModules(STYLES);
|
|
38
|
+
const getClassName = (0, _bpkReactUtils.cssModules)(_BpkCalendarGridModule.default);
|
|
30
39
|
const shallowEqualProps = (props1, props2, propList) => {
|
|
31
40
|
let i = 0;
|
|
32
41
|
for (; i < propList.length; i += 1) {
|
|
@@ -49,15 +58,15 @@ function or(total, bool) {
|
|
|
49
58
|
function getSelectedDate(date, selectionConfiguration) {
|
|
50
59
|
let startDate;
|
|
51
60
|
let endDate;
|
|
52
|
-
if (selectionConfiguration.type === CALENDAR_SELECTION_TYPE.single) {
|
|
61
|
+
if (selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.single) {
|
|
53
62
|
startDate = selectionConfiguration.date;
|
|
54
63
|
} else {
|
|
55
64
|
startDate = selectionConfiguration.startDate;
|
|
56
65
|
endDate = selectionConfiguration.endDate;
|
|
57
66
|
}
|
|
58
|
-
const sameStartDay = startDate && isSameDay(date, startDate);
|
|
59
|
-
const sameEndDay = endDate && isSameDay(date, endDate);
|
|
60
|
-
if (startDate && endDate && (sameStartDay || sameEndDay || isWithinRange(date, {
|
|
67
|
+
const sameStartDay = startDate && (0, _dateUtils.isSameDay)(date, startDate);
|
|
68
|
+
const sameEndDay = endDate && (0, _dateUtils.isSameDay)(date, endDate);
|
|
69
|
+
if (startDate && endDate && (sameStartDay || sameEndDay || (0, _dateUtils.isWithinRange)(date, {
|
|
61
70
|
start: startDate,
|
|
62
71
|
end: endDate
|
|
63
72
|
})) || startDate && !endDate && sameStartDay || sameStartDay) {
|
|
@@ -80,57 +89,57 @@ function getSelectionType(date, selectionConfiguration, formatDateFull, month, w
|
|
|
80
89
|
const {
|
|
81
90
|
endDate,
|
|
82
91
|
startDate
|
|
83
|
-
} = selectionConfiguration.type === CALENDAR_SELECTION_TYPE.range ? selectionConfiguration : {
|
|
92
|
+
} = selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.range ? selectionConfiguration : {
|
|
84
93
|
startDate: null,
|
|
85
94
|
endDate: null
|
|
86
95
|
};
|
|
87
|
-
const sameStartDay = startDate && isSameDay(date, startDate);
|
|
88
|
-
const sameEndDay = endDate && isSameDay(date, endDate);
|
|
96
|
+
const sameStartDay = startDate && (0, _dateUtils.isSameDay)(date, startDate);
|
|
97
|
+
const sameEndDay = endDate && (0, _dateUtils.isSameDay)(date, endDate);
|
|
89
98
|
const rangeDates = startDate && endDate;
|
|
90
|
-
const isEmptyCell = !isSameMonth(date, month) && ignoreOutsideDate;
|
|
91
|
-
if (selectionConfiguration.type === CALENDAR_SELECTION_TYPE.single && selectionConfiguration.date && (selectionConfiguration.date === formatDateFull(date) || formatDateFull(selectionConfiguration.date) === formatDateFull(date))) {
|
|
92
|
-
return SELECTION_TYPES.single;
|
|
99
|
+
const isEmptyCell = !(0, _dateUtils.isSameMonth)(date, month) && ignoreOutsideDate;
|
|
100
|
+
if (selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.single && selectionConfiguration.date && (selectionConfiguration.date === formatDateFull(date) || formatDateFull(selectionConfiguration.date) === formatDateFull(date))) {
|
|
101
|
+
return _BpkCalendarDate.SELECTION_TYPES.single;
|
|
93
102
|
}
|
|
94
|
-
if (selectionConfiguration.type === CALENDAR_SELECTION_TYPE.range) {
|
|
103
|
+
if (selectionConfiguration.type === _customProptypes.CALENDAR_SELECTION_TYPE.range) {
|
|
95
104
|
if (startDate && !endDate && sameStartDay || rangeDates && sameStartDay && sameEndDay) {
|
|
96
|
-
return SELECTION_TYPES.single;
|
|
105
|
+
return _BpkCalendarDate.SELECTION_TYPES.single;
|
|
97
106
|
}
|
|
98
|
-
if (isEmptyCell && rangeDates && (isSameWeek(startDate, startOfMonth(startDate), {
|
|
107
|
+
if (isEmptyCell && rangeDates && ((0, _dateUtils.isSameWeek)(startDate, (0, _dateUtils.startOfMonth)(startDate), {
|
|
99
108
|
weekStartsOn
|
|
100
|
-
}) && isSameWeek(date, startDate, {
|
|
109
|
+
}) && (0, _dateUtils.isSameWeek)(date, startDate, {
|
|
101
110
|
weekStartsOn
|
|
102
|
-
}) || isSameWeek(endDate, endOfMonth(endDate), {
|
|
111
|
+
}) || (0, _dateUtils.isSameWeek)(endDate, (0, _dateUtils.endOfMonth)(endDate), {
|
|
103
112
|
weekStartsOn
|
|
104
|
-
}) && isSameWeek(date, endDate, {
|
|
113
|
+
}) && (0, _dateUtils.isSameWeek)(date, endDate, {
|
|
105
114
|
weekStartsOn
|
|
106
115
|
}))) {
|
|
107
|
-
return SELECTION_TYPES.none;
|
|
116
|
+
return _BpkCalendarDate.SELECTION_TYPES.none;
|
|
108
117
|
}
|
|
109
|
-
if (isEmptyCell && rangeDates && !isSameMonth(startDate, endDate) && (isSameWeek(startDate, endOfMonth(startDate), {
|
|
118
|
+
if (isEmptyCell && rangeDates && !(0, _dateUtils.isSameMonth)(startDate, endDate) && ((0, _dateUtils.isSameWeek)(startDate, (0, _dateUtils.endOfMonth)(startDate), {
|
|
110
119
|
weekStartsOn
|
|
111
|
-
}) && isSameWeek(date, startDate, {
|
|
120
|
+
}) && (0, _dateUtils.isSameWeek)(date, startDate, {
|
|
112
121
|
weekStartsOn
|
|
113
|
-
}) || isSameWeek(endDate, startOfMonth(endDate), {
|
|
122
|
+
}) || (0, _dateUtils.isSameWeek)(endDate, (0, _dateUtils.startOfMonth)(endDate), {
|
|
114
123
|
weekStartsOn
|
|
115
|
-
}) && isSameWeek(date, endDate, {
|
|
124
|
+
}) && (0, _dateUtils.isSameWeek)(date, endDate, {
|
|
116
125
|
weekStartsOn
|
|
117
126
|
}))) {
|
|
118
|
-
return SELECTION_TYPES.middle;
|
|
127
|
+
return _BpkCalendarDate.SELECTION_TYPES.middle;
|
|
119
128
|
}
|
|
120
|
-
if (rangeDates && isWithinRange(date, {
|
|
129
|
+
if (rangeDates && (0, _dateUtils.isWithinRange)(date, {
|
|
121
130
|
start: startDate,
|
|
122
131
|
end: endDate
|
|
123
132
|
}) && !sameStartDay && !sameEndDay) {
|
|
124
|
-
return SELECTION_TYPES.middle;
|
|
133
|
+
return _BpkCalendarDate.SELECTION_TYPES.middle;
|
|
125
134
|
}
|
|
126
135
|
if (startDate && formatDateFull(startDate) === formatDateFull(date)) {
|
|
127
|
-
return SELECTION_TYPES.start;
|
|
136
|
+
return _BpkCalendarDate.SELECTION_TYPES.start;
|
|
128
137
|
}
|
|
129
138
|
if (endDate && formatDateFull(endDate) === formatDateFull(date)) {
|
|
130
|
-
return SELECTION_TYPES.end;
|
|
139
|
+
return _BpkCalendarDate.SELECTION_TYPES.end;
|
|
131
140
|
}
|
|
132
141
|
}
|
|
133
|
-
return SELECTION_TYPES.none;
|
|
142
|
+
return _BpkCalendarDate.SELECTION_TYPES.none;
|
|
134
143
|
}
|
|
135
144
|
|
|
136
145
|
/**
|
|
@@ -142,9 +151,9 @@ function getSelectionType(date, selectionConfiguration, formatDateFull, month, w
|
|
|
142
151
|
const singleDateHandler = (props, nextProps) => {
|
|
143
152
|
const currentSelectConfig = props.selectionConfiguration;
|
|
144
153
|
const nextSelectConfig = nextProps.selectionConfiguration;
|
|
145
|
-
if ((nextSelectConfig.date && isSameWeek(nextSelectConfig.date, nextProps.dates[0], {
|
|
154
|
+
if ((nextSelectConfig.date && (0, _dateUtils.isSameWeek)(nextSelectConfig.date, nextProps.dates[0], {
|
|
146
155
|
weekStartsOn: nextProps.weekStartsOn
|
|
147
|
-
}) || currentSelectConfig.date && isSameWeek(currentSelectConfig.date, props.dates[0], {
|
|
156
|
+
}) || currentSelectConfig.date && (0, _dateUtils.isSameWeek)(currentSelectConfig.date, props.dates[0], {
|
|
148
157
|
weekStartsOn: props.weekStartsOn
|
|
149
158
|
})) && currentSelectConfig.date !== nextSelectConfig.date) {
|
|
150
159
|
return true;
|
|
@@ -167,8 +176,8 @@ const rangeDateHandler = (props, nextProps) => {
|
|
|
167
176
|
endDate: nextEndDate,
|
|
168
177
|
startDate: nextStartDate
|
|
169
178
|
} = nextProps.selectionConfiguration;
|
|
170
|
-
const startDateChanged = startDate && nextStartDate && !isSameDay(startDate, nextStartDate);
|
|
171
|
-
const endDateChanged = endDate && nextEndDate && !isSameDay(endDate, nextEndDate);
|
|
179
|
+
const startDateChanged = startDate && nextStartDate && !(0, _dateUtils.isSameDay)(startDate, nextStartDate);
|
|
180
|
+
const endDateChanged = endDate && nextEndDate && !(0, _dateUtils.isSameDay)(endDate, nextEndDate);
|
|
172
181
|
if (startDateChanged || endDateChanged) {
|
|
173
182
|
return true;
|
|
174
183
|
}
|
|
@@ -177,21 +186,7 @@ const rangeDateHandler = (props, nextProps) => {
|
|
|
177
186
|
/*
|
|
178
187
|
Week - table row containing a week full of DateContainer components
|
|
179
188
|
*/
|
|
180
|
-
class Week extends Component {
|
|
181
|
-
static defaultProps = {
|
|
182
|
-
dateProps: {},
|
|
183
|
-
focusedDate: null,
|
|
184
|
-
ignoreOutsideDate: false,
|
|
185
|
-
maxDate: null,
|
|
186
|
-
minDate: null,
|
|
187
|
-
onDateClick: () => {},
|
|
188
|
-
onDateKeyDown: () => {},
|
|
189
|
-
selectionConfiguration: {
|
|
190
|
-
type: CALENDAR_SELECTION_TYPE.single,
|
|
191
|
-
date: null
|
|
192
|
-
},
|
|
193
|
-
cellClassName: null
|
|
194
|
-
};
|
|
189
|
+
class Week extends _react.Component {
|
|
195
190
|
shouldComponentUpdate(nextProps) {
|
|
196
191
|
const shallowProps = ['DateComponent', 'dateModifiers', 'formatDateFull', 'isKeyboardFocusable', 'markOutsideDays', 'markToday', 'onDateClick', 'onDateKeyDown', 'preventKeyboardFocus', 'weekStartsOn', 'dates', 'cellClassName'];
|
|
197
192
|
|
|
@@ -203,9 +198,9 @@ class Week extends Component {
|
|
|
203
198
|
// If focusedDate is changing, and it'll be included as part
|
|
204
199
|
// of either the week we're rendering now or the next week
|
|
205
200
|
// we'll render, component should update.
|
|
206
|
-
if ((nextProps.focusedDate && isSameWeek(nextProps.focusedDate, nextProps.dates[0], {
|
|
201
|
+
if ((nextProps.focusedDate && (0, _dateUtils.isSameWeek)(nextProps.focusedDate, nextProps.dates[0], {
|
|
207
202
|
weekStartsOn: nextProps.weekStartsOn
|
|
208
|
-
}) || this.props.focusedDate && isSameWeek(this.props.focusedDate, this.props.dates[0], {
|
|
203
|
+
}) || this.props.focusedDate && (0, _dateUtils.isSameWeek)(this.props.focusedDate, this.props.dates[0], {
|
|
209
204
|
weekStartsOn: this.props.weekStartsOn
|
|
210
205
|
})) && this.props.focusedDate !== nextProps.focusedDate) {
|
|
211
206
|
return true;
|
|
@@ -214,10 +209,10 @@ class Week extends Component {
|
|
|
214
209
|
// If selected date is changing, and it'll be included as part
|
|
215
210
|
// of either the week we're rendering now or the next week we'll
|
|
216
211
|
// render, component should update.
|
|
217
|
-
if (this.props.selectionConfiguration?.type === CALENDAR_SELECTION_TYPE.single && this.props.selectionConfiguration.date) {
|
|
212
|
+
if (this.props.selectionConfiguration?.type === _customProptypes.CALENDAR_SELECTION_TYPE.single && this.props.selectionConfiguration.date) {
|
|
218
213
|
return singleDateHandler(this.props, nextProps);
|
|
219
214
|
}
|
|
220
|
-
if (this.props.selectionConfiguration?.type === CALENDAR_SELECTION_TYPE.range) {
|
|
215
|
+
if (this.props.selectionConfiguration?.type === _customProptypes.CALENDAR_SELECTION_TYPE.range) {
|
|
221
216
|
return rangeDateHandler(this.props, nextProps);
|
|
222
217
|
}
|
|
223
218
|
|
|
@@ -226,7 +221,7 @@ class Week extends Component {
|
|
|
226
221
|
if (nextProps.minDate !== this.props.minDate) {
|
|
227
222
|
return true;
|
|
228
223
|
}
|
|
229
|
-
if (!isSameDay(nextProps.minDate, this.props.minDate)) {
|
|
224
|
+
if (!(0, _dateUtils.isSameDay)(nextProps.minDate, this.props.minDate)) {
|
|
230
225
|
return true;
|
|
231
226
|
}
|
|
232
227
|
}
|
|
@@ -236,7 +231,7 @@ class Week extends Component {
|
|
|
236
231
|
if (nextProps.maxDate !== this.props.maxDate) {
|
|
237
232
|
return true;
|
|
238
233
|
}
|
|
239
|
-
if (!isSameDay(nextProps.maxDate, this.props.maxDate)) {
|
|
234
|
+
if (!(0, _dateUtils.isSameDay)(nextProps.maxDate, this.props.maxDate)) {
|
|
240
235
|
return true;
|
|
241
236
|
}
|
|
242
237
|
}
|
|
@@ -264,26 +259,26 @@ class Week extends Component {
|
|
|
264
259
|
weekStartsOn
|
|
265
260
|
} = this.props;
|
|
266
261
|
if (ignoreOutsideDate) {
|
|
267
|
-
const daysOutside = this.props.dates.map(date => isSameMonth(date, month));
|
|
262
|
+
const daysOutside = this.props.dates.map(date => (0, _dateUtils.isSameMonth)(date, month));
|
|
268
263
|
const shouldRender = daysOutside.reduce(or);
|
|
269
264
|
if (!shouldRender) {
|
|
270
265
|
return null;
|
|
271
266
|
}
|
|
272
267
|
}
|
|
273
|
-
return /*#__PURE__*/
|
|
268
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
274
269
|
className: getClassName('bpk-calendar-grid__week'),
|
|
275
270
|
children: this.props.dates.map(date => {
|
|
276
|
-
const isBlocked = minDate && maxDate ? !isWithinRange(date, {
|
|
271
|
+
const isBlocked = minDate && maxDate ? !(0, _dateUtils.isWithinRange)(date, {
|
|
277
272
|
start: minDate,
|
|
278
273
|
end: maxDate
|
|
279
274
|
}) : false;
|
|
280
275
|
const dateSelectionType = getSelectionType(date, selectionConfiguration, formatDateFull, month, weekStartsOn, ignoreOutsideDate);
|
|
281
|
-
return /*#__PURE__*/
|
|
276
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DateContainer, {
|
|
282
277
|
className: cellClassName,
|
|
283
|
-
isEmptyCell: !isSameMonth(date, month) && ignoreOutsideDate,
|
|
278
|
+
isEmptyCell: !(0, _dateUtils.isSameMonth)(date, month) && ignoreOutsideDate,
|
|
284
279
|
isBlocked: isBlocked,
|
|
285
280
|
selectionType: dateSelectionType,
|
|
286
|
-
children: /*#__PURE__*/
|
|
281
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DateComponent, _objectSpread({
|
|
287
282
|
date: date,
|
|
288
283
|
modifiers: dateModifiers,
|
|
289
284
|
"aria-label": formatDateFull(date),
|
|
@@ -291,19 +286,32 @@ class Week extends Component {
|
|
|
291
286
|
onDateKeyDown: onDateKeyDown,
|
|
292
287
|
preventKeyboardFocus: preventKeyboardFocus,
|
|
293
288
|
isKeyboardFocusable: isKeyboardFocusable,
|
|
294
|
-
isFocused: focusedDate && isSameDay(date, focusedDate),
|
|
289
|
+
isFocused: focusedDate && (0, _dateUtils.isSameDay)(date, focusedDate),
|
|
295
290
|
isSelected: getSelectedDate(date, selectionConfiguration),
|
|
296
291
|
isBlocked: isBlocked,
|
|
297
|
-
isOutside: markOutsideDays && !isSameMonth(date, month),
|
|
298
|
-
isToday: markToday && isToday(date),
|
|
299
|
-
selectionType: dateSelectionType
|
|
300
|
-
|
|
301
|
-
})
|
|
292
|
+
isOutside: markOutsideDays && !(0, _dateUtils.isSameMonth)(date, month),
|
|
293
|
+
isToday: markToday && (0, _dateUtils.isToday)(date),
|
|
294
|
+
selectionType: dateSelectionType
|
|
295
|
+
}, dateProps))
|
|
302
296
|
}, date.getDate());
|
|
303
297
|
})
|
|
304
298
|
});
|
|
305
299
|
}
|
|
306
300
|
}
|
|
301
|
+
_defineProperty(Week, "defaultProps", {
|
|
302
|
+
dateProps: {},
|
|
303
|
+
focusedDate: null,
|
|
304
|
+
ignoreOutsideDate: false,
|
|
305
|
+
maxDate: null,
|
|
306
|
+
minDate: null,
|
|
307
|
+
onDateClick: () => {},
|
|
308
|
+
onDateKeyDown: () => {},
|
|
309
|
+
selectionConfiguration: {
|
|
310
|
+
type: _customProptypes.CALENDAR_SELECTION_TYPE.single,
|
|
311
|
+
date: null
|
|
312
|
+
},
|
|
313
|
+
cellClassName: null
|
|
314
|
+
});
|
|
307
315
|
/*
|
|
308
316
|
DateContainer - one for each date in the grid; wraps the actual BpkCalendarDate (or custom) component
|
|
309
317
|
*/
|
|
@@ -315,10 +323,11 @@ const DateContainer = ({
|
|
|
315
323
|
selectionType
|
|
316
324
|
}) => {
|
|
317
325
|
const classNames = getClassName('bpk-calendar-grid__date', `bpk-calendar-grid__date--${selectionType}`, className);
|
|
318
|
-
return /*#__PURE__*/
|
|
326
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
319
327
|
"aria-hidden": isEmptyCell || isBlocked,
|
|
320
328
|
className: classNames,
|
|
321
329
|
children: children
|
|
322
330
|
});
|
|
323
331
|
};
|
|
324
|
-
|
|
332
|
+
var _default = Week;
|
|
333
|
+
exports.default = _default;
|
|
@@ -1,27 +1,36 @@
|
|
|
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
|
-
*/
|
|
1
|
+
"use strict";
|
|
18
2
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _bpkReactUtils = require("../../bpk-react-utils");
|
|
8
|
+
var _customProptypes = require("./custom-proptypes");
|
|
9
|
+
var _BpkCalendarModule = _interopRequireDefault(require("./BpkCalendar.module.css"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
|
|
17
|
+
* Backpack - Skyscanner's Design System
|
|
18
|
+
*
|
|
19
|
+
* Copyright 2016 Skyscanner Ltd
|
|
20
|
+
*
|
|
21
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
22
|
+
* you may not use this file except in compliance with the License.
|
|
23
|
+
* You may obtain a copy of the License at
|
|
24
|
+
*
|
|
25
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
26
|
+
*
|
|
27
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
28
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
29
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
30
|
+
* See the License for the specific language governing permissions and
|
|
31
|
+
* limitations under the License.
|
|
32
|
+
*/
|
|
33
|
+
const getClassName = (0, _bpkReactUtils.cssModules)(_BpkCalendarModule.default);
|
|
25
34
|
const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
|
|
26
35
|
const BpkCalendar = ({
|
|
27
36
|
changeMonthLabel = null,
|
|
@@ -50,7 +59,7 @@ const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
|
|
|
50
59
|
preventKeyboardFocus = false,
|
|
51
60
|
previousMonthLabel = null,
|
|
52
61
|
selectionConfiguration = {
|
|
53
|
-
type: CALENDAR_SELECTION_TYPE.single,
|
|
62
|
+
type: _customProptypes.CALENDAR_SELECTION_TYPE.single,
|
|
54
63
|
date: null
|
|
55
64
|
},
|
|
56
65
|
weekDayKey = 'nameAbbr',
|
|
@@ -78,9 +87,9 @@ const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
|
|
|
78
87
|
if (gridClassName) {
|
|
79
88
|
gridClasses.push(gridClassName);
|
|
80
89
|
}
|
|
81
|
-
return /*#__PURE__*/
|
|
90
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
82
91
|
className: classNames.join(' '),
|
|
83
|
-
children: [Nav && /*#__PURE__*/
|
|
92
|
+
children: [Nav && /*#__PURE__*/(0, _jsxRuntime.jsx)(Nav, _objectSpread({
|
|
84
93
|
changeMonthLabel: changeMonthLabel,
|
|
85
94
|
formatMonth: formatMonth,
|
|
86
95
|
id: `${id}__bpk_calendar_nav`,
|
|
@@ -89,15 +98,13 @@ const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
|
|
|
89
98
|
month: month,
|
|
90
99
|
nextMonthLabel: nextMonthLabel,
|
|
91
100
|
onMonthChange: onMonthChange,
|
|
92
|
-
previousMonthLabel: previousMonthLabel
|
|
93
|
-
|
|
94
|
-
}), GridHeader && /*#__PURE__*/_jsx(GridHeader, {
|
|
101
|
+
previousMonthLabel: previousMonthLabel
|
|
102
|
+
}, navProps)), GridHeader && /*#__PURE__*/(0, _jsxRuntime.jsx)(GridHeader, _objectSpread({
|
|
95
103
|
daysOfWeek: daysOfWeek,
|
|
96
104
|
weekStartsOn: weekStartsOn,
|
|
97
105
|
weekDayKey: weekDayKey,
|
|
98
|
-
className: headerClasses.join(' ')
|
|
99
|
-
|
|
100
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
|
106
|
+
className: headerClasses.join(' ')
|
|
107
|
+
}, headerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(Grid, _objectSpread({
|
|
101
108
|
DateComponent: CalendarDate,
|
|
102
109
|
dateModifiers: dateModifiers,
|
|
103
110
|
daysOfWeek: daysOfWeek,
|
|
@@ -115,11 +122,11 @@ const composeCalendar = (Nav, GridHeader, Grid, CalendarDate) => {
|
|
|
115
122
|
markOutsideDays: markOutsideDays,
|
|
116
123
|
className: gridClasses.join(' '),
|
|
117
124
|
dateProps: dateProps,
|
|
118
|
-
selectionConfiguration: selectionConfiguration
|
|
119
|
-
|
|
120
|
-
})]
|
|
125
|
+
selectionConfiguration: selectionConfiguration
|
|
126
|
+
}, gridProps))]
|
|
121
127
|
});
|
|
122
128
|
};
|
|
123
129
|
return BpkCalendar;
|
|
124
130
|
};
|
|
125
|
-
|
|
131
|
+
var _default = composeCalendar;
|
|
132
|
+
exports.default = _default;
|