@skyscanner/backpack-web 6.0.0-alpha.0 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-animate-height/README.md +55 -0
- package/bpk-animate-height/index.js +4 -13
- package/bpk-animate-height/package.json +26 -0
- package/bpk-animate-height/src/AnimateHeight.js +76 -86
- package/bpk-component-accordion/README.md +124 -0
- package/bpk-component-accordion/index.js +30 -44
- package/bpk-component-accordion/package.json +31 -0
- package/bpk-component-accordion/src/BpkAccordion.js +42 -42
- package/bpk-component-accordion/src/{BpkAccordion.css → BpkAccordion.module.css} +0 -0
- package/bpk-component-accordion/src/BpkAccordion.module.scss +23 -0
- package/bpk-component-accordion/src/BpkAccordionItem.js +105 -91
- package/bpk-component-accordion/src/{BpkAccordionItem.css → BpkAccordionItem.module.css} +0 -0
- package/bpk-component-accordion/src/BpkAccordionItem.module.scss +117 -0
- package/bpk-component-accordion/src/themeAttributes.js +8 -9
- package/bpk-component-accordion/src/withAccordionItemState.js +68 -64
- package/bpk-component-accordion/src/withSingleItemAccordionState.js +75 -62
- package/bpk-component-aria-live/README.md +42 -0
- package/bpk-component-aria-live/index.js +10 -21
- package/bpk-component-aria-live/package.json +31 -0
- package/bpk-component-aria-live/src/BpkAriaLive.js +45 -43
- package/bpk-component-aria-live/src/{BpkAriaLive.css → BpkAriaLive.module.css} +0 -0
- package/bpk-component-aria-live/src/BpkAriaLive.module.scss +25 -0
- package/bpk-component-autosuggest/README.md +126 -0
- package/bpk-component-autosuggest/index.js +8 -21
- package/bpk-component-autosuggest/package.json +29 -0
- package/bpk-component-autosuggest/src/BpkAutosuggest.js +46 -42
- package/bpk-component-autosuggest/src/{BpkAutosuggest.css → BpkAutosuggest.module.css} +0 -0
- package/bpk-component-autosuggest/src/BpkAutosuggest.module.scss +156 -0
- package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +82 -64
- package/bpk-component-badge/README.md +39 -0
- package/bpk-component-badge/index.js +9 -31
- package/bpk-component-badge/package.json +29 -0
- package/bpk-component-badge/src/BpkBadge.js +49 -52
- package/bpk-component-badge/src/{BpkBadge.css → BpkBadge.module.css} +0 -0
- package/bpk-component-badge/src/BpkBadge.module.scss +55 -0
- package/bpk-component-badge/src/themeAttributes.js +6 -9
- package/bpk-component-banner-alert/README.md +153 -0
- package/bpk-component-banner-alert/index.js +17 -53
- package/bpk-component-banner-alert/package.json +34 -0
- package/bpk-component-banner-alert/src/AnimateAndFade.js +142 -126
- package/bpk-component-banner-alert/src/{BpkAnimateAndFade.css → BpkAnimateAndFade.module.css} +0 -0
- package/bpk-component-banner-alert/src/BpkAnimateAndFade.module.scss +53 -0
- package/bpk-component-banner-alert/src/BpkBannerAlert.js +19 -20
- package/bpk-component-banner-alert/src/{BpkBannerAlert.css → BpkBannerAlert.module.css} +0 -0
- package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +163 -0
- package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +52 -45
- package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +56 -55
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +185 -141
- package/bpk-component-banner-alert/src/common-types.js +41 -26
- package/bpk-component-banner-alert/src/themeAttributes.js +7 -9
- package/bpk-component-banner-alert/src/withBannerAlertState.js +142 -118
- package/bpk-component-barchart/README.md +189 -0
- package/bpk-component-barchart/data.json +102 -0
- package/bpk-component-barchart/index.js +21 -61
- package/bpk-component-barchart/package.json +35 -0
- package/bpk-component-barchart/src/BpkBarchart.js +268 -222
- package/bpk-component-barchart/src/{BpkBarchart.css → BpkBarchart.module.css} +0 -0
- package/bpk-component-barchart/src/BpkBarchart.module.scss +21 -0
- package/bpk-component-barchart/src/BpkBarchartBar.js +113 -81
- package/bpk-component-barchart/src/{BpkBarchartBar.css → BpkBarchartBar.module.css} +0 -0
- package/bpk-component-barchart/src/BpkBarchartBar.module.scss +68 -0
- package/bpk-component-barchart/src/BpkBarchartBars.js +129 -117
- package/bpk-component-barchart/src/BpkBarchartDefs.js +38 -32
- package/bpk-component-barchart/src/BpkChartAxis.js +135 -100
- package/bpk-component-barchart/src/{BpkChartAxis.css → BpkChartAxis.module.css} +0 -0
- package/bpk-component-barchart/src/BpkChartAxis.module.scss +37 -0
- package/bpk-component-barchart/src/BpkChartDataTable.js +49 -43
- package/bpk-component-barchart/src/{BpkChartDataTable.css → BpkChartDataTable.module.css} +0 -0
- package/bpk-component-barchart/src/BpkChartDataTable.module.scss +28 -0
- package/bpk-component-barchart/src/BpkChartGridLines.js +95 -72
- package/bpk-component-barchart/src/{BpkChartGridLines.css → BpkChartGridLines.module.css} +0 -0
- package/bpk-component-barchart/src/BpkChartGridLines.module.scss +26 -0
- package/bpk-component-barchart/src/BpkChartMargin.js +46 -39
- package/bpk-component-barchart/src/RTLtransforms.js +49 -50
- package/bpk-component-barchart/src/customPropTypes.js +22 -19
- package/bpk-component-barchart/src/orientation.js +5 -11
- package/bpk-component-barchart/src/themeAttributes.js +9 -9
- package/bpk-component-barchart/src/utils.js +10 -20
- package/bpk-component-blockquote/README.md +35 -0
- package/bpk-component-blockquote/index.js +6 -21
- package/bpk-component-blockquote/package.json +24 -0
- package/bpk-component-blockquote/src/BpkBlockquote.js +21 -28
- package/bpk-component-blockquote/src/{BpkBlockquote.css → BpkBlockquote.module.css} +0 -0
- package/bpk-component-blockquote/src/BpkBlockquote.module.scss +29 -0
- package/bpk-component-blockquote/src/themeAttributes.js +2 -9
- package/bpk-component-breadcrumb/README.md +58 -0
- package/bpk-component-breadcrumb/index.js +14 -21
- package/bpk-component-breadcrumb/package.json +27 -0
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +79 -68
- package/bpk-component-breadcrumb/src/{BpkBreadcrumb.css → BpkBreadcrumb.module.css} +0 -0
- package/bpk-component-breadcrumb/src/BpkBreadcrumb.module.scss +27 -0
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +77 -70
- package/bpk-component-breadcrumb/src/{BpkBreadcrumbItem.css → BpkBreadcrumbItem.module.css} +0 -0
- package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.scss +40 -0
- package/bpk-component-breakpoint/README.md +34 -0
- package/bpk-component-breakpoint/index.js +7 -21
- package/bpk-component-breakpoint/package.json +28 -0
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +38 -46
- package/bpk-component-button/BpkButtonDestructive.js +19 -13
- package/bpk-component-button/BpkButtonFeatured.js +19 -13
- package/bpk-component-button/BpkButtonLink.js +19 -13
- package/bpk-component-button/BpkButtonLinkOnDark.js +19 -13
- package/bpk-component-button/BpkButtonOutline.js +19 -13
- package/bpk-component-button/BpkButtonPrimary.js +19 -13
- package/bpk-component-button/BpkButtonPrimaryOnDark.js +19 -13
- package/bpk-component-button/BpkButtonPrimaryOnLight.js +19 -13
- package/bpk-component-button/BpkButtonSecondary.js +19 -13
- package/bpk-component-button/BpkButtonSecondaryOnDark.js +19 -13
- package/bpk-component-button/README.md +140 -0
- package/bpk-component-button/index.js +40 -144
- package/bpk-component-button/package.json +26 -0
- package/bpk-component-button/src/BpkButton.js +87 -64
- package/bpk-component-button/src/BpkButtonBase.js +74 -64
- package/bpk-component-button/src/BpkButtonBase.module.css +18 -0
- package/bpk-component-button/src/BpkButtonBase.module.scss +50 -0
- package/bpk-component-button/src/BpkButtonDestructive.js +36 -51
- package/bpk-component-button/src/BpkButtonDestructive.module.css +18 -0
- package/bpk-component-button/src/BpkButtonDestructive.module.scss +24 -0
- package/bpk-component-button/src/BpkButtonFeatured.js +36 -51
- package/bpk-component-button/src/{BpkButtonFeatured.css → BpkButtonFeatured.module.css} +1 -1
- package/bpk-component-button/src/BpkButtonFeatured.module.scss +23 -0
- package/bpk-component-button/src/BpkButtonLink.js +43 -53
- package/bpk-component-button/src/BpkButtonLink.module.css +18 -0
- package/{bpk-component-split-input/src/BpkSplitInput.css → bpk-component-button/src/BpkButtonLink.module.scss} +13 -6
- package/bpk-component-button/src/BpkButtonLinkOnDark.js +43 -53
- package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +18 -0
- package/bpk-component-button/src/BpkButtonLinkOnDark.module.scss +23 -0
- package/bpk-component-button/src/BpkButtonOutline.js +36 -51
- package/bpk-component-button/src/{BpkButtonOutline.css → BpkButtonOutline.module.css} +0 -0
- package/bpk-component-button/src/BpkButtonOutline.module.scss +23 -0
- package/bpk-component-button/src/BpkButtonPrimary.js +29 -25
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +36 -51
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +18 -0
- package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.scss +23 -0
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +36 -51
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +18 -0
- package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.scss +23 -0
- package/bpk-component-button/src/BpkButtonSecondary.js +36 -51
- package/bpk-component-button/src/BpkButtonSecondary.module.css +18 -0
- package/bpk-component-button/src/BpkButtonSecondary.module.scss +23 -0
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +36 -51
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +18 -0
- package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.scss +23 -0
- package/bpk-component-button/src/common-types.js +33 -24
- package/bpk-component-button/src/commonButtonTests.js +63 -79
- package/bpk-component-button/src/themeAttributes.js +75 -23
- package/bpk-component-button/themeAttributes.js +28 -53
- package/bpk-component-calendar/DOCS.md +29 -0
- package/bpk-component-calendar/README.md +406 -0
- package/bpk-component-calendar/index.js +43 -126
- package/bpk-component-calendar/package.json +34 -0
- package/bpk-component-calendar/src/{BpkCalendar.css → BpkCalendar.module.css} +0 -0
- package/bpk-component-calendar/src/BpkCalendar.module.scss +42 -0
- package/bpk-component-calendar/src/BpkCalendarContainer.js +271 -237
- package/bpk-component-calendar/src/BpkCalendarDate.js +121 -119
- package/bpk-component-calendar/src/{BpkCalendarDate.css → BpkCalendarDate.module.css} +0 -0
- package/bpk-component-calendar/src/BpkCalendarDate.module.scss +164 -0
- package/bpk-component-calendar/src/BpkCalendarGrid.js +152 -127
- package/bpk-component-calendar/src/{BpkCalendarGrid.css → BpkCalendarGrid.module.css} +0 -0
- package/bpk-component-calendar/src/BpkCalendarGrid.module.scss +64 -0
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +60 -72
- package/bpk-component-calendar/src/{BpkCalendarGridHeader.css → BpkCalendarGridHeader.module.css} +0 -0
- package/bpk-component-calendar/src/BpkCalendarGridHeader.module.scss +53 -0
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +143 -103
- package/bpk-component-calendar/src/{BpkCalendarGridTransition.css → BpkCalendarGridTransition.module.css} +0 -0
- package/bpk-component-calendar/src/BpkCalendarGridTransition.module.scss +47 -0
- package/bpk-component-calendar/src/BpkCalendarNav.js +136 -140
- package/bpk-component-calendar/src/{BpkCalendarNav.css → BpkCalendarNav.module.css} +0 -0
- package/bpk-component-calendar/src/BpkCalendarNav.module.scss +89 -0
- package/bpk-component-calendar/src/Week.js +285 -216
- package/bpk-component-calendar/src/_variables.scss +24 -0
- package/bpk-component-calendar/src/composeCalendar.js +123 -108
- package/bpk-component-calendar/src/custom-proptypes.js +41 -50
- package/bpk-component-calendar/src/date-utils.js +93 -223
- package/bpk-component-calendar/src/themeAttributes.js +13 -9
- package/bpk-component-calendar/src/utils.js +20 -28
- package/bpk-component-calendar/test-utils.js +272 -239
- package/bpk-component-card/README.md +34 -0
- package/bpk-component-card/index.js +5 -13
- package/bpk-component-card/package.json +28 -0
- package/bpk-component-card/src/BpkCard.js +67 -65
- package/bpk-component-card/src/{BpkCard.css → BpkCard.module.css} +0 -0
- package/bpk-component-card/src/BpkCard.module.scss +27 -0
- package/bpk-component-checkbox/README.md +47 -0
- package/bpk-component-checkbox/index.js +8 -21
- package/bpk-component-checkbox/package.json +29 -0
- package/bpk-component-checkbox/src/BpkCheckbox.js +100 -64
- package/bpk-component-checkbox/src/{BpkCheckbox.css → BpkCheckbox.module.css} +0 -0
- package/bpk-component-checkbox/src/BpkCheckbox.module.scss +70 -0
- package/bpk-component-checkbox/src/themeAttributes.js +4 -9
- package/bpk-component-chip/README.md +111 -0
- package/bpk-component-chip/index.js +17 -37
- package/bpk-component-chip/package.json +29 -0
- package/bpk-component-chip/src/BpkDismissibleChip.js +53 -32
- package/bpk-component-chip/src/BpkSelectableChip.js +86 -70
- package/bpk-component-chip/src/{BpkSelectableChip.css → BpkSelectableChip.module.css} +0 -0
- package/bpk-component-chip/src/BpkSelectableChip.module.scss +23 -0
- package/bpk-component-chip/src/commonTypes.js +33 -28
- package/bpk-component-chip/src/themeAttributes.js +17 -9
- package/bpk-component-close-button/README.md +27 -0
- package/bpk-component-close-button/index.js +6 -13
- package/bpk-component-close-button/package.json +28 -0
- package/bpk-component-close-button/src/BpkCloseButton.js +56 -56
- package/bpk-component-close-button/src/{BpkCloseButton.css → BpkCloseButton.module.css} +0 -0
- package/bpk-component-close-button/src/BpkCloseButton.module.scss +51 -0
- package/bpk-component-code/README.md +43 -0
- package/bpk-component-code/index.js +21 -21
- package/bpk-component-code/package.json +24 -0
- package/bpk-component-code/src/BpkCode.js +44 -45
- package/bpk-component-code/src/{BpkCode.css → BpkCode.module.css} +0 -0
- package/bpk-component-code/src/BpkCode.module.scss +27 -0
- package/bpk-component-code/src/BpkCodeBlock.js +50 -47
- package/bpk-component-code/src/{BpkCodeBlock.css → BpkCodeBlock.module.css} +0 -0
- package/bpk-component-code/src/BpkCodeBlock.module.scss +33 -0
- package/bpk-component-content-container/README.md +33 -0
- package/bpk-component-content-container/index.js +4 -13
- package/bpk-component-content-container/package.json +24 -0
- package/bpk-component-content-container/src/BpkContentContainer.js +53 -47
- package/bpk-component-content-container/src/BpkContentContainer.module.css +18 -0
- package/bpk-component-content-container/src/BpkContentContainer.module.scss +41 -0
- package/bpk-component-datatable/README.md +141 -0
- package/bpk-component-datatable/index.js +20 -22
- package/bpk-component-datatable/package.json +30 -0
- package/bpk-component-datatable/src/BpkDataTable.js +155 -177
- package/bpk-component-datatable/src/{BpkDataTable.css → BpkDataTable.module.css} +0 -0
- package/bpk-component-datatable/src/BpkDataTable.module.scss +92 -0
- package/bpk-component-datatable/src/BpkDataTableColumn.js +50 -52
- package/bpk-component-datatable/src/{BpkDataTableColumn.css → BpkDataTableColumn.module.css} +0 -0
- package/bpk-component-datatable/src/BpkDataTableColumn.module.scss +65 -0
- package/bpk-component-datatable/src/bpkHeaderRenderer.js +72 -60
- package/bpk-component-datatable/src/common-types.js +48 -3
- package/bpk-component-datatable/src/hasChildrenOfType.js +36 -29
- package/bpk-component-datatable/src/sort-types.js +29 -1
- package/bpk-component-datatable/src/sorter.js +89 -62
- package/bpk-component-datatable/src/utils.js +6 -11
- package/bpk-component-datepicker/README.md +177 -0
- package/bpk-component-datepicker/index.js +8 -29
- package/bpk-component-datepicker/package.json +33 -0
- package/bpk-component-datepicker/src/BpkDatepicker.js +269 -220
- package/bpk-component-datepicker/src/{BpkDatepicker.css → BpkDatepicker.module.css} +0 -0
- package/bpk-component-datepicker/src/BpkDatepicker.module.scss +25 -0
- package/bpk-component-datepicker/src/themeAttributes.js +11 -15
- package/bpk-component-description-list/README.md +46 -0
- package/bpk-component-description-list/index.js +21 -29
- package/bpk-component-description-list/package.json +24 -0
- package/bpk-component-description-list/src/BpkDescriptionDetails.js +3 -13
- package/bpk-component-description-list/src/BpkDescriptionList.js +3 -13
- package/bpk-component-description-list/src/{BpkDescriptionList.css → BpkDescriptionList.module.css} +0 -0
- package/bpk-component-description-list/src/BpkDescriptionList.module.scss +37 -0
- package/bpk-component-description-list/src/BpkDescriptionTerm.js +3 -13
- package/bpk-component-description-list/src/ComponentFactory.js +37 -41
- package/bpk-component-dialog/README.md +105 -0
- package/bpk-component-dialog/index.js +9 -21
- package/bpk-component-dialog/package.json +32 -0
- package/bpk-component-dialog/src/BpkDialog.js +78 -64
- package/bpk-component-dialog/src/{BpkDialog.css → BpkDialog.module.css} +0 -0
- package/bpk-component-dialog/src/BpkDialog.module.scss +80 -0
- package/bpk-component-dialog/src/BpkDialogInner.js +74 -59
- package/bpk-component-dialog/src/BpkDialogInner.module.css +18 -0
- package/bpk-component-dialog/src/BpkDialogInner.module.scss +62 -0
- package/bpk-component-dialog/src/common-types.js +80 -56
- package/bpk-component-drawer/README.md +90 -0
- package/bpk-component-drawer/index.js +8 -21
- package/bpk-component-drawer/package.json +34 -0
- package/bpk-component-drawer/src/BpkDrawer.js +76 -86
- package/bpk-component-drawer/src/{BpkDrawer.css → BpkDrawer.module.css} +0 -0
- package/bpk-component-drawer/src/BpkDrawer.module.scss +23 -0
- package/bpk-component-drawer/src/BpkDrawerContent.js +123 -97
- package/bpk-component-drawer/src/{BpkDrawerContent.css → BpkDrawerContent.module.css} +1 -1
- package/bpk-component-drawer/src/BpkDrawerContent.module.scss +107 -0
- package/bpk-component-drawer/src/themeAttributes.js +6 -11
- package/bpk-component-fieldset/README.md +73 -0
- package/bpk-component-fieldset/index.js +13 -37
- package/bpk-component-fieldset/package.json +36 -0
- package/bpk-component-fieldset/src/BpkFieldset.js +130 -104
- package/bpk-component-fieldset/src/{BpkFieldset.css → BpkFieldset.module.css} +0 -0
- package/bpk-component-fieldset/src/BpkFieldset.module.scss +39 -0
- package/bpk-component-fieldset/src/themeAttributes.js +2 -9
- package/bpk-component-flare/README.md +52 -0
- package/bpk-component-flare/index.js +8 -27
- package/bpk-component-flare/package.json +29 -0
- package/bpk-component-flare/src/BpkContentBubble.js +67 -59
- package/bpk-component-flare/src/BpkFlareBar.js +55 -57
- package/bpk-component-flare/src/__generated__/js/corner-radius.js +5 -33
- package/bpk-component-flare/src/__generated__/js/pointer.js +5 -33
- package/bpk-component-flare/src/{bpk-content-bubble.css → bpk-content-bubble.module.css} +0 -0
- package/bpk-component-flare/src/bpk-content-bubble.module.scss +60 -0
- package/bpk-component-flare/src/{bpk-flare-bar.css → bpk-flare-bar.module.css} +1 -1
- package/bpk-component-flare/src/bpk-flare-bar.module.scss +74 -0
- package/bpk-component-flare/src/svgs/corner-radius.svg +1 -0
- package/bpk-component-flare/src/svgs/pointer.svg +1 -0
- package/bpk-component-floating-notification/README.md +58 -0
- package/bpk-component-floating-notification/index.js +10 -21
- package/bpk-component-floating-notification/package.json +25 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +121 -88
- package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +18 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.module.scss +96 -0
- package/bpk-component-form-validation/README.md +33 -0
- package/bpk-component-form-validation/index.js +6 -21
- package/bpk-component-form-validation/package.json +34 -0
- package/bpk-component-form-validation/src/BpkFormValidation.js +75 -67
- package/bpk-component-form-validation/src/{BpkFormValidation.css → BpkFormValidation.module.css} +0 -0
- package/bpk-component-form-validation/src/BpkFormValidation.module.scss +44 -0
- package/bpk-component-form-validation/src/themeAttributes.js +2 -9
- package/bpk-component-graphic-promotion/README.md +68 -0
- package/bpk-component-graphic-promotion/index.js +10 -21
- package/bpk-component-graphic-promotion/package.json +25 -0
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +132 -103
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +18 -0
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.scss +260 -0
- package/bpk-component-graphic-promotion/src/custom-breakpoints.module.css +17 -0
- package/bpk-component-graphic-promotion/src/custom-breakpoints.module.scss +70 -0
- package/bpk-component-grid/README.md +90 -0
- package/bpk-component-grid/index.js +8 -21
- package/bpk-component-grid/package.json +24 -0
- package/bpk-component-grid/src/BpkGridColumn.js +66 -60
- package/bpk-component-grid/src/BpkGridColumn.module.css +18 -0
- package/bpk-component-grid/src/BpkGridColumn.module.scss +73 -0
- package/bpk-component-grid/src/BpkGridContainer.js +41 -48
- package/bpk-component-grid/src/BpkGridContainer.module.css +18 -0
- package/bpk-component-grid/src/BpkGridContainer.module.scss +33 -0
- package/bpk-component-grid/src/BpkGridRow.js +40 -45
- package/bpk-component-grid/src/{BpkGridRow.css → BpkGridRow.module.css} +1 -1
- package/bpk-component-grid/src/BpkGridRow.module.scss +29 -0
- package/bpk-component-grid-toggle/README.md +27 -0
- package/bpk-component-grid-toggle/index.js +4 -13
- package/bpk-component-grid-toggle/package.json +25 -0
- package/bpk-component-grid-toggle/src/BpkGridToggle.js +67 -55
- package/bpk-component-grid-toggle/src/{BpkGridToggle.css → BpkGridToggle.module.css} +0 -0
- package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +52 -0
- package/bpk-component-horizontal-nav/README.md +103 -0
- package/bpk-component-horizontal-nav/index.js +15 -35
- package/bpk-component-horizontal-nav/package.json +30 -0
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +152 -133
- package/bpk-component-horizontal-nav/src/{BpkHorizontalNav.css → BpkHorizontalNav.module.css} +0 -0
- package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.scss +37 -0
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +110 -87
- package/bpk-component-horizontal-nav/src/{BpkHorizontalNavItem.css → BpkHorizontalNavItem.module.css} +0 -0
- package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.scss +152 -0
- package/bpk-component-icon/README.md +79 -0
- package/bpk-component-icon/all.js +6 -5
- package/bpk-component-icon/index.js +27 -40
- package/bpk-component-icon/lg/accessibility.js +8 -39
- package/bpk-component-icon/lg/account--add.js +8 -39
- package/bpk-component-icon/lg/account--female.js +8 -39
- package/bpk-component-icon/lg/account--id-card.js +8 -39
- package/bpk-component-icon/lg/account--name.js +8 -39
- package/bpk-component-icon/lg/account--permit.js +8 -39
- package/bpk-component-icon/lg/account-circle.js +8 -39
- package/bpk-component-icon/lg/account.js +8 -39
- package/bpk-component-icon/lg/add-circle.js +8 -39
- package/bpk-component-icon/lg/adult.js +8 -39
- package/bpk-component-icon/lg/aircon.js +8 -39
- package/bpk-component-icon/lg/aircraft.js +8 -41
- package/bpk-component-icon/lg/airline--multiple.js +8 -39
- package/bpk-component-icon/lg/airline.js +8 -39
- package/bpk-component-icon/lg/airports.js +8 -39
- package/bpk-component-icon/lg/alert--active.js +8 -39
- package/bpk-component-icon/lg/alert--add.js +8 -39
- package/bpk-component-icon/lg/alert--expired.js +8 -39
- package/bpk-component-icon/lg/alert--remove.js +8 -39
- package/bpk-component-icon/lg/arrow-down.js +8 -39
- package/bpk-component-icon/lg/arrow-left.js +8 -39
- package/bpk-component-icon/lg/arrow-right.js +8 -39
- package/bpk-component-icon/lg/arrow-up.js +8 -39
- package/bpk-component-icon/lg/award.js +8 -39
- package/bpk-component-icon/lg/baby-carriage.js +8 -39
- package/bpk-component-icon/lg/baggage--add.js +8 -39
- package/bpk-component-icon/lg/baggage--remove.js +8 -39
- package/bpk-component-icon/lg/baggage-cross.js +8 -39
- package/bpk-component-icon/lg/baggage-tick.js +8 -39
- package/bpk-component-icon/lg/baggage.js +8 -39
- package/bpk-component-icon/lg/bar.js +8 -39
- package/bpk-component-icon/lg/beach.js +8 -41
- package/bpk-component-icon/lg/beer.js +8 -39
- package/bpk-component-icon/lg/breakfast-cross.js +8 -39
- package/bpk-component-icon/lg/breakfast-tick.js +8 -39
- package/bpk-component-icon/lg/bus.js +8 -39
- package/bpk-component-icon/lg/business.js +8 -39
- package/bpk-component-icon/lg/cafe.js +8 -39
- package/bpk-component-icon/lg/calendar.js +8 -39
- package/bpk-component-icon/lg/call-back.js +8 -41
- package/bpk-component-icon/lg/camera.js +8 -39
- package/bpk-component-icon/lg/camper-van.js +8 -41
- package/bpk-component-icon/lg/car-door.js +8 -39
- package/bpk-component-icon/lg/car-wash.js +8 -41
- package/bpk-component-icon/lg/cars-flexible.js +8 -39
- package/bpk-component-icon/lg/cars.js +8 -41
- package/bpk-component-icon/lg/center-location.js +8 -39
- package/bpk-component-icon/lg/chart.js +8 -39
- package/bpk-component-icon/lg/chauffeur.js +8 -39
- package/bpk-component-icon/lg/chevron-down.js +8 -39
- package/bpk-component-icon/lg/chevron-left.js +8 -39
- package/bpk-component-icon/lg/chevron-right.js +8 -39
- package/bpk-component-icon/lg/chevron-up.js +8 -39
- package/bpk-component-icon/lg/child-seat.js +8 -39
- package/bpk-component-icon/lg/child.js +8 -39
- package/bpk-component-icon/lg/city-center.js +8 -39
- package/bpk-component-icon/lg/city.js +8 -39
- package/bpk-component-icon/lg/clean-policy.js +8 -39
- package/bpk-component-icon/lg/clean.js +8 -43
- package/bpk-component-icon/lg/cleaning-medical.js +8 -39
- package/bpk-component-icon/lg/cloakroom.js +8 -43
- package/bpk-component-icon/lg/close-circle.js +8 -39
- package/bpk-component-icon/lg/close.js +8 -39
- package/bpk-component-icon/lg/collapse.js +8 -39
- package/bpk-component-icon/lg/content--copy.js +8 -41
- package/bpk-component-icon/lg/content--event.js +8 -39
- package/bpk-component-icon/lg/content--guides.js +8 -39
- package/bpk-component-icon/lg/currency.js +8 -39
- package/bpk-component-icon/lg/data.js +8 -41
- package/bpk-component-icon/lg/deals.js +8 -39
- package/bpk-component-icon/lg/depart.js +8 -41
- package/bpk-component-icon/lg/device-mid.js +8 -39
- package/bpk-component-icon/lg/device-wide.js +8 -39
- package/bpk-component-icon/lg/direct.js +8 -39
- package/bpk-component-icon/lg/document-csv.js +8 -39
- package/bpk-component-icon/lg/document-pdf.js +8 -39
- package/bpk-component-icon/lg/download.js +8 -41
- package/bpk-component-icon/lg/duration.js +8 -39
- package/bpk-component-icon/lg/eco-leaf.js +8 -39
- package/bpk-component-icon/lg/edit.js +8 -39
- package/bpk-component-icon/lg/education.js +8 -41
- package/bpk-component-icon/lg/electric.js +8 -39
- package/bpk-component-icon/lg/end-call.js +8 -39
- package/bpk-component-icon/lg/estimated.js +8 -39
- package/bpk-component-icon/lg/exclamation-circle.js +8 -39
- package/bpk-component-icon/lg/exclamation.js +8 -39
- package/bpk-component-icon/lg/expand.js +8 -39
- package/bpk-component-icon/lg/explore.js +8 -39
- package/bpk-component-icon/lg/face--blank.js +8 -39
- package/bpk-component-icon/lg/face--happy.js +8 -39
- package/bpk-component-icon/lg/face--sad.js +8 -39
- package/bpk-component-icon/lg/face-id.js +8 -39
- package/bpk-component-icon/lg/face-mask.js +8 -39
- package/bpk-component-icon/lg/family.js +8 -39
- package/bpk-component-icon/lg/fast-track.js +8 -41
- package/bpk-component-icon/lg/fast-train.js +8 -41
- package/bpk-component-icon/lg/filter.js +8 -40
- package/bpk-component-icon/lg/fingerprint.js +8 -39
- package/bpk-component-icon/lg/flag.js +8 -39
- package/bpk-component-icon/lg/flask.js +8 -39
- package/bpk-component-icon/lg/flight-flexible.js +8 -39
- package/bpk-component-icon/lg/flight-landing.js +8 -43
- package/bpk-component-icon/lg/flight-takeoff.js +8 -41
- package/bpk-component-icon/lg/flight.js +8 -41
- package/bpk-component-icon/lg/food.js +8 -39
- package/bpk-component-icon/lg/gears-automatic-circle.js +8 -39
- package/bpk-component-icon/lg/gears-automatic.js +8 -39
- package/bpk-component-icon/lg/gears-manual-circle.js +8 -39
- package/bpk-component-icon/lg/gears-manual.js +8 -39
- package/bpk-component-icon/lg/globe.js +8 -39
- package/bpk-component-icon/lg/grid-layout.js +8 -39
- package/bpk-component-icon/lg/headset.js +8 -39
- package/bpk-component-icon/lg/health-fitness.js +8 -39
- package/bpk-component-icon/lg/heart--outline.js +8 -39
- package/bpk-component-icon/lg/heart.js +8 -39
- package/bpk-component-icon/lg/help-circle.js +8 -39
- package/bpk-component-icon/lg/help.js +8 -39
- package/bpk-component-icon/lg/hide.js +8 -39
- package/bpk-component-icon/lg/hotel-flexible.js +8 -39
- package/bpk-component-icon/lg/hotels--disabled-facilities.js +8 -39
- package/bpk-component-icon/lg/hotels--jacuzzi.js +8 -39
- package/bpk-component-icon/lg/hotels--pets-allowed.js +8 -39
- package/bpk-component-icon/lg/hotels--smoking.js +8 -39
- package/bpk-component-icon/lg/hotels.js +8 -39
- package/bpk-component-icon/lg/infant.js +8 -39
- package/bpk-component-icon/lg/information--language-alert.js +8 -39
- package/bpk-component-icon/lg/information--language-question.js +8 -39
- package/bpk-component-icon/lg/information--language.js +8 -39
- package/bpk-component-icon/lg/information-circle.js +8 -39
- package/bpk-component-icon/lg/information.js +8 -39
- package/bpk-component-icon/lg/insurance.js +8 -39
- package/bpk-component-icon/lg/key.js +8 -39
- package/bpk-component-icon/lg/keypad.js +8 -39
- package/bpk-component-icon/lg/landmark.js +8 -39
- package/bpk-component-icon/lg/language.js +8 -39
- package/bpk-component-icon/lg/legroom--extra.js +8 -41
- package/bpk-component-icon/lg/legroom--normal.js +8 -41
- package/bpk-component-icon/lg/legroom--reduced.js +8 -41
- package/bpk-component-icon/lg/leisure.js +8 -39
- package/bpk-component-icon/lg/lightning.js +8 -39
- package/bpk-component-icon/lg/list.js +8 -39
- package/bpk-component-icon/lg/location.js +8 -39
- package/bpk-component-icon/lg/lock.js +8 -39
- package/bpk-component-icon/lg/logout.js +8 -41
- package/bpk-component-icon/lg/long-arrow-down.js +8 -39
- package/bpk-component-icon/lg/long-arrow-left.js +8 -39
- package/bpk-component-icon/lg/long-arrow-right.js +8 -39
- package/bpk-component-icon/lg/long-arrow-up.js +8 -39
- package/bpk-component-icon/lg/lounge.js +8 -41
- package/bpk-component-icon/lg/luggageall.js +8 -39
- package/bpk-component-icon/lg/mail.js +8 -41
- package/bpk-component-icon/lg/map.js +8 -39
- package/bpk-component-icon/lg/meal.js +8 -39
- package/bpk-component-icon/lg/media.js +8 -39
- package/bpk-component-icon/lg/menu--horizontal.js +8 -39
- package/bpk-component-icon/lg/menu--vertical.js +8 -39
- package/bpk-component-icon/lg/menu.js +8 -39
- package/bpk-component-icon/lg/mileage.js +8 -41
- package/bpk-component-icon/lg/minus.js +8 -39
- package/bpk-component-icon/lg/mobile.js +8 -39
- package/bpk-component-icon/lg/money.js +8 -39
- package/bpk-component-icon/lg/multiple-bookings.js +8 -39
- package/bpk-component-icon/lg/music.js +8 -39
- package/bpk-component-icon/lg/mute.js +8 -39
- package/bpk-component-icon/lg/native-android--back.js +8 -39
- package/bpk-component-icon/lg/native-android--close.js +8 -39
- package/bpk-component-icon/lg/native-android--forward.js +8 -39
- package/bpk-component-icon/lg/native-ios-close.js +8 -39
- package/bpk-component-icon/lg/navigation.js +8 -39
- package/bpk-component-icon/lg/new-window.js +8 -41
- package/bpk-component-icon/lg/news.js +8 -39
- package/bpk-component-icon/lg/night.js +8 -39
- package/bpk-component-icon/lg/not-allowed.js +8 -39
- package/bpk-component-icon/lg/onsen.js +8 -39
- package/bpk-component-icon/lg/paid.js +8 -39
- package/bpk-component-icon/lg/paperclip.js +8 -39
- package/bpk-component-icon/lg/parking.js +8 -39
- package/bpk-component-icon/lg/passport.js +8 -39
- package/bpk-component-icon/lg/pause.js +8 -39
- package/bpk-component-icon/lg/payment-card.js +8 -39
- package/bpk-component-icon/lg/petrol.js +8 -39
- package/bpk-component-icon/lg/phone-call.js +8 -39
- package/bpk-component-icon/lg/picture.js +8 -39
- package/bpk-component-icon/lg/pin.js +8 -39
- package/bpk-component-icon/lg/plane-seat.js +8 -41
- package/bpk-component-icon/lg/play.js +8 -39
- package/bpk-component-icon/lg/plus.js +8 -39
- package/bpk-component-icon/lg/policy.js +8 -39
- package/bpk-component-icon/lg/powerplug.js +8 -39
- package/bpk-component-icon/lg/ppe.js +8 -39
- package/bpk-component-icon/lg/price-alerts.js +8 -39
- package/bpk-component-icon/lg/price-tag.js +8 -39
- package/bpk-component-icon/lg/print.js +8 -39
- package/bpk-component-icon/lg/recent-searches.js +8 -39
- package/bpk-component-icon/lg/redo.js +8 -39
- package/bpk-component-icon/lg/refresh.js +8 -39
- package/bpk-component-icon/lg/return.js +8 -41
- package/bpk-component-icon/lg/room.js +8 -39
- package/bpk-component-icon/lg/scales.js +8 -41
- package/bpk-component-icon/lg/search.js +8 -39
- package/bpk-component-icon/lg/self-service.js +8 -39
- package/bpk-component-icon/lg/send-message.js +8 -39
- package/bpk-component-icon/lg/services.js +8 -39
- package/bpk-component-icon/lg/settings.js +8 -39
- package/bpk-component-icon/lg/share--android.js +8 -39
- package/bpk-component-icon/lg/share--ios.js +8 -41
- package/bpk-component-icon/lg/share.js +8 -39
- package/bpk-component-icon/lg/single-booking.js +8 -39
- package/bpk-component-icon/lg/social-distancing.js +8 -41
- package/bpk-component-icon/lg/social-like.js +8 -39
- package/bpk-component-icon/lg/sort-down.js +8 -39
- package/bpk-component-icon/lg/sort-up.js +8 -39
- package/bpk-component-icon/lg/sort.js +8 -39
- package/bpk-component-icon/lg/speaker.js +8 -41
- package/bpk-component-icon/lg/star-half.js +8 -39
- package/bpk-component-icon/lg/star-outline.js +8 -39
- package/bpk-component-icon/lg/star.js +8 -39
- package/bpk-component-icon/lg/stops.js +8 -39
- package/bpk-component-icon/lg/swap--horizontal.js +8 -39
- package/bpk-component-icon/lg/swap--vertical.js +8 -39
- package/bpk-component-icon/lg/swap.js +8 -39
- package/bpk-component-icon/lg/taxi.js +8 -41
- package/bpk-component-icon/lg/thumbs-down.js +8 -39
- package/bpk-component-icon/lg/thumbs-up.js +8 -39
- package/bpk-component-icon/lg/tick-circle.js +8 -39
- package/bpk-component-icon/lg/tick.js +8 -39
- package/bpk-component-icon/lg/ticket-flexible.js +8 -39
- package/bpk-component-icon/lg/ticket.js +8 -39
- package/bpk-component-icon/lg/time.js +8 -39
- package/bpk-component-icon/lg/toilets.js +8 -39
- package/bpk-component-icon/lg/train.js +8 -39
- package/bpk-component-icon/lg/transmission-automatic.js +8 -39
- package/bpk-component-icon/lg/transmission-manual.js +8 -39
- package/bpk-component-icon/lg/trash.js +8 -39
- package/bpk-component-icon/lg/trend--down.js +8 -39
- package/bpk-component-icon/lg/trend--steady.js +8 -39
- package/bpk-component-icon/lg/trend--will-rise.js +8 -39
- package/bpk-component-icon/lg/trend.js +8 -39
- package/bpk-component-icon/lg/trips.js +8 -39
- package/bpk-component-icon/lg/undo.js +8 -39
- package/bpk-component-icon/lg/unlock.js +8 -39
- package/bpk-component-icon/lg/unmute.js +8 -41
- package/bpk-component-icon/lg/upgrade.js +8 -39
- package/bpk-component-icon/lg/use-location.js +8 -39
- package/bpk-component-icon/lg/view.js +8 -39
- package/bpk-component-icon/lg/virus.js +8 -39
- package/bpk-component-icon/lg/wallet.js +8 -41
- package/bpk-component-icon/lg/weather--clear.js +8 -39
- package/bpk-component-icon/lg/weather--cloudy.js +8 -41
- package/bpk-component-icon/lg/weather--fog.js +8 -39
- package/bpk-component-icon/lg/weather--partly-cloudy.js +8 -41
- package/bpk-component-icon/lg/weather--rain.js +8 -43
- package/bpk-component-icon/lg/weather--snow.js +8 -39
- package/bpk-component-icon/lg/weather--thunderstorm.js +8 -43
- package/bpk-component-icon/lg/weather--tornado.js +8 -39
- package/bpk-component-icon/lg/weather--wind.js +8 -39
- package/bpk-component-icon/lg/weather.js +8 -39
- package/bpk-component-icon/lg/wifi.js +8 -39
- package/bpk-component-icon/lg/window--reduce.js +8 -41
- package/bpk-component-icon/lg/window.js +8 -39
- package/bpk-component-icon/lg/world--amer.js +8 -39
- package/bpk-component-icon/lg/world--apac.js +8 -39
- package/bpk-component-icon/lg/world--emea.js +8 -41
- package/bpk-component-icon/package.json +34 -0
- package/bpk-component-icon/sm/accessibility.js +8 -40
- package/bpk-component-icon/sm/account--add.js +8 -40
- package/bpk-component-icon/sm/account--female.js +8 -40
- package/bpk-component-icon/sm/account--id-card.js +8 -40
- package/bpk-component-icon/sm/account--name.js +8 -40
- package/bpk-component-icon/sm/account--permit.js +8 -40
- package/bpk-component-icon/sm/account-circle.js +8 -40
- package/bpk-component-icon/sm/account.js +8 -40
- package/bpk-component-icon/sm/add-circle.js +8 -40
- package/bpk-component-icon/sm/adult.js +8 -40
- package/bpk-component-icon/sm/aircon.js +8 -40
- package/bpk-component-icon/sm/aircraft.js +8 -42
- package/bpk-component-icon/sm/airline--multiple.js +8 -40
- package/bpk-component-icon/sm/airline.js +8 -40
- package/bpk-component-icon/sm/airports.js +8 -40
- package/bpk-component-icon/sm/alert--active.js +8 -40
- package/bpk-component-icon/sm/alert--add.js +8 -40
- package/bpk-component-icon/sm/alert--expired.js +8 -40
- package/bpk-component-icon/sm/alert--remove.js +8 -40
- package/bpk-component-icon/sm/arrow-down.js +8 -40
- package/bpk-component-icon/sm/arrow-left.js +8 -40
- package/bpk-component-icon/sm/arrow-right.js +8 -40
- package/bpk-component-icon/sm/arrow-up.js +8 -40
- package/bpk-component-icon/sm/award.js +8 -40
- package/bpk-component-icon/sm/baby-carriage.js +8 -40
- package/bpk-component-icon/sm/baggage--add.js +8 -40
- package/bpk-component-icon/sm/baggage--remove.js +8 -40
- package/bpk-component-icon/sm/baggage-cross.js +8 -40
- package/bpk-component-icon/sm/baggage-tick.js +8 -40
- package/bpk-component-icon/sm/baggage.js +8 -40
- package/bpk-component-icon/sm/bar.js +8 -40
- package/bpk-component-icon/sm/beach.js +8 -42
- package/bpk-component-icon/sm/beer.js +8 -40
- package/bpk-component-icon/sm/breakfast-cross.js +8 -40
- package/bpk-component-icon/sm/breakfast-tick.js +8 -40
- package/bpk-component-icon/sm/bus.js +8 -42
- package/bpk-component-icon/sm/business.js +8 -40
- package/bpk-component-icon/sm/cafe.js +8 -40
- package/bpk-component-icon/sm/calendar.js +8 -40
- package/bpk-component-icon/sm/call-back.js +8 -42
- package/bpk-component-icon/sm/camera.js +8 -40
- package/bpk-component-icon/sm/camper-van.js +8 -42
- package/bpk-component-icon/sm/car-door.js +8 -40
- package/bpk-component-icon/sm/car-wash.js +8 -42
- package/bpk-component-icon/sm/cars-flexible.js +8 -40
- package/bpk-component-icon/sm/cars.js +8 -42
- package/bpk-component-icon/sm/chart.js +8 -40
- package/bpk-component-icon/sm/chauffeur.js +8 -42
- package/bpk-component-icon/sm/chevron-down.js +8 -40
- package/bpk-component-icon/sm/chevron-left.js +8 -40
- package/bpk-component-icon/sm/chevron-right.js +8 -40
- package/bpk-component-icon/sm/chevron-up.js +8 -40
- package/bpk-component-icon/sm/child-seat.js +8 -40
- package/bpk-component-icon/sm/child.js +8 -40
- package/bpk-component-icon/sm/city-center.js +8 -40
- package/bpk-component-icon/sm/city.js +8 -40
- package/bpk-component-icon/sm/clean-policy.js +8 -40
- package/bpk-component-icon/sm/clean.js +8 -42
- package/bpk-component-icon/sm/cleaning-medical.js +8 -40
- package/bpk-component-icon/sm/cloakroom.js +8 -40
- package/bpk-component-icon/sm/close-circle.js +8 -40
- package/bpk-component-icon/sm/close.js +8 -40
- package/bpk-component-icon/sm/collapse.js +8 -40
- package/bpk-component-icon/sm/content--copy.js +8 -42
- package/bpk-component-icon/sm/content--event.js +8 -40
- package/bpk-component-icon/sm/content--guides.js +8 -40
- package/bpk-component-icon/sm/currency.js +8 -40
- package/bpk-component-icon/sm/data.js +8 -42
- package/bpk-component-icon/sm/deals.js +8 -40
- package/bpk-component-icon/sm/depart.js +8 -44
- package/bpk-component-icon/sm/device-mid.js +8 -40
- package/bpk-component-icon/sm/device-wide.js +8 -40
- package/bpk-component-icon/sm/direct.js +8 -42
- package/bpk-component-icon/sm/document-csv.js +8 -40
- package/bpk-component-icon/sm/document-pdf.js +8 -40
- package/bpk-component-icon/sm/download.js +8 -42
- package/bpk-component-icon/sm/duration.js +8 -40
- package/bpk-component-icon/sm/eco-leaf.js +8 -40
- package/bpk-component-icon/sm/edit.js +8 -40
- package/bpk-component-icon/sm/education.js +8 -42
- package/bpk-component-icon/sm/electric.js +8 -40
- package/bpk-component-icon/sm/end-call.js +8 -40
- package/bpk-component-icon/sm/estimated.js +8 -40
- package/bpk-component-icon/sm/exclamation-circle.js +8 -40
- package/bpk-component-icon/sm/exclamation.js +8 -40
- package/bpk-component-icon/sm/expand.js +8 -40
- package/bpk-component-icon/sm/explore.js +8 -40
- package/bpk-component-icon/sm/face--blank.js +8 -40
- package/bpk-component-icon/sm/face--happy.js +8 -40
- package/bpk-component-icon/sm/face--sad.js +8 -40
- package/bpk-component-icon/sm/face-mask.js +8 -40
- package/bpk-component-icon/sm/family.js +8 -40
- package/bpk-component-icon/sm/fast-track.js +8 -42
- package/bpk-component-icon/sm/fast-train.js +8 -42
- package/bpk-component-icon/sm/filter.js +8 -41
- package/bpk-component-icon/sm/flag.js +8 -40
- package/bpk-component-icon/sm/flask.js +8 -40
- package/bpk-component-icon/sm/flight-flexible.js +8 -40
- package/bpk-component-icon/sm/flight-landing.js +8 -44
- package/bpk-component-icon/sm/flight-takeoff.js +8 -42
- package/bpk-component-icon/sm/flight.js +8 -42
- package/bpk-component-icon/sm/food.js +8 -40
- package/bpk-component-icon/sm/gears-automatic-circle.js +8 -40
- package/bpk-component-icon/sm/gears-automatic.js +8 -40
- package/bpk-component-icon/sm/gears-manual-circle.js +8 -40
- package/bpk-component-icon/sm/gears-manual.js +8 -40
- package/bpk-component-icon/sm/globe.js +8 -40
- package/bpk-component-icon/sm/grid-layout.js +8 -40
- package/bpk-component-icon/sm/headset.js +8 -40
- package/bpk-component-icon/sm/health-fitness.js +8 -40
- package/bpk-component-icon/sm/heart--outline.js +8 -40
- package/bpk-component-icon/sm/heart.js +8 -40
- package/bpk-component-icon/sm/help-circle.js +8 -40
- package/bpk-component-icon/sm/help.js +8 -40
- package/bpk-component-icon/sm/hide.js +8 -40
- package/bpk-component-icon/sm/hotel-flexible.js +8 -40
- package/bpk-component-icon/sm/hotels--disabled-facilities.js +8 -40
- package/bpk-component-icon/sm/hotels--jacuzzi.js +8 -42
- package/bpk-component-icon/sm/hotels--pets-allowed.js +8 -40
- package/bpk-component-icon/sm/hotels--smoking.js +8 -40
- package/bpk-component-icon/sm/hotels.js +8 -40
- package/bpk-component-icon/sm/infant.js +8 -42
- package/bpk-component-icon/sm/information--language-alert.js +8 -40
- package/bpk-component-icon/sm/information--language-question.js +8 -40
- package/bpk-component-icon/sm/information--language.js +8 -40
- package/bpk-component-icon/sm/information-circle.js +8 -40
- package/bpk-component-icon/sm/information.js +8 -40
- package/bpk-component-icon/sm/insurance.js +8 -40
- package/bpk-component-icon/sm/key.js +8 -40
- package/bpk-component-icon/sm/keypad.js +8 -40
- package/bpk-component-icon/sm/landmark.js +8 -40
- package/bpk-component-icon/sm/language.js +8 -40
- package/bpk-component-icon/sm/legroom--extra.js +8 -42
- package/bpk-component-icon/sm/legroom--normal.js +8 -42
- package/bpk-component-icon/sm/legroom--reduced.js +8 -42
- package/bpk-component-icon/sm/leisure.js +8 -40
- package/bpk-component-icon/sm/lightning.js +8 -40
- package/bpk-component-icon/sm/list.js +8 -40
- package/bpk-component-icon/sm/location.js +8 -40
- package/bpk-component-icon/sm/lock.js +8 -40
- package/bpk-component-icon/sm/logout.js +8 -42
- package/bpk-component-icon/sm/long-arrow-down.js +8 -41
- package/bpk-component-icon/sm/long-arrow-left.js +8 -41
- package/bpk-component-icon/sm/long-arrow-right.js +8 -41
- package/bpk-component-icon/sm/long-arrow-up.js +8 -41
- package/bpk-component-icon/sm/lounge.js +8 -40
- package/bpk-component-icon/sm/luggageall.js +8 -40
- package/bpk-component-icon/sm/mail.js +8 -42
- package/bpk-component-icon/sm/map.js +8 -40
- package/bpk-component-icon/sm/meal.js +8 -40
- package/bpk-component-icon/sm/media.js +8 -40
- package/bpk-component-icon/sm/menu--horizontal.js +8 -40
- package/bpk-component-icon/sm/menu--vertical.js +8 -40
- package/bpk-component-icon/sm/menu.js +8 -40
- package/bpk-component-icon/sm/mileage.js +8 -42
- package/bpk-component-icon/sm/minus.js +8 -40
- package/bpk-component-icon/sm/mobile.js +8 -40
- package/bpk-component-icon/sm/money.js +8 -40
- package/bpk-component-icon/sm/multiple-bookings.js +8 -40
- package/bpk-component-icon/sm/music.js +8 -40
- package/bpk-component-icon/sm/mute.js +8 -40
- package/bpk-component-icon/sm/native-android--back.js +8 -40
- package/bpk-component-icon/sm/native-android--close.js +8 -40
- package/bpk-component-icon/sm/native-android--forward.js +8 -40
- package/bpk-component-icon/sm/native-ios-close.js +8 -40
- package/bpk-component-icon/sm/navigation.js +8 -40
- package/bpk-component-icon/sm/new-window.js +8 -46
- package/bpk-component-icon/sm/news.js +8 -40
- package/bpk-component-icon/sm/night.js +8 -40
- package/bpk-component-icon/sm/not-allowed.js +8 -40
- package/bpk-component-icon/sm/onsen.js +8 -42
- package/bpk-component-icon/sm/paid.js +8 -40
- package/bpk-component-icon/sm/paperclip.js +8 -40
- package/bpk-component-icon/sm/parking.js +8 -40
- package/bpk-component-icon/sm/passport.js +8 -40
- package/bpk-component-icon/sm/pause.js +8 -40
- package/bpk-component-icon/sm/payment-card.js +8 -40
- package/bpk-component-icon/sm/petrol.js +8 -40
- package/bpk-component-icon/sm/phone-call.js +8 -40
- package/bpk-component-icon/sm/picture.js +8 -40
- package/bpk-component-icon/sm/pin.js +8 -40
- package/bpk-component-icon/sm/plane-seat.js +8 -42
- package/bpk-component-icon/sm/play.js +8 -40
- package/bpk-component-icon/sm/plus.js +8 -40
- package/bpk-component-icon/sm/policy.js +8 -40
- package/bpk-component-icon/sm/powerplug.js +8 -40
- package/bpk-component-icon/sm/ppe.js +8 -40
- package/bpk-component-icon/sm/price-alerts.js +8 -40
- package/bpk-component-icon/sm/price-tag.js +8 -40
- package/bpk-component-icon/sm/print.js +8 -40
- package/bpk-component-icon/sm/recent-searches.js +8 -40
- package/bpk-component-icon/sm/redo.js +8 -40
- package/bpk-component-icon/sm/refresh.js +8 -40
- package/bpk-component-icon/sm/return.js +8 -44
- package/bpk-component-icon/sm/room.js +8 -40
- package/bpk-component-icon/sm/scales.js +8 -40
- package/bpk-component-icon/sm/search.js +8 -40
- package/bpk-component-icon/sm/self-service.js +8 -40
- package/bpk-component-icon/sm/send-message.js +8 -40
- package/bpk-component-icon/sm/services.js +8 -40
- package/bpk-component-icon/sm/settings.js +8 -40
- package/bpk-component-icon/sm/share--android.js +8 -40
- package/bpk-component-icon/sm/share--ios.js +8 -44
- package/bpk-component-icon/sm/share.js +8 -40
- package/bpk-component-icon/sm/single-booking.js +8 -40
- package/bpk-component-icon/sm/social-distancing.js +8 -42
- package/bpk-component-icon/sm/social-like.js +8 -40
- package/bpk-component-icon/sm/sort-down.js +8 -40
- package/bpk-component-icon/sm/sort-up.js +8 -40
- package/bpk-component-icon/sm/sort.js +8 -40
- package/bpk-component-icon/sm/speaker.js +8 -40
- package/bpk-component-icon/sm/star-half.js +8 -40
- package/bpk-component-icon/sm/star-outline.js +8 -40
- package/bpk-component-icon/sm/star.js +8 -40
- package/bpk-component-icon/sm/stops.js +8 -40
- package/bpk-component-icon/sm/swap--horizontal.js +8 -41
- package/bpk-component-icon/sm/swap--vertical.js +8 -40
- package/bpk-component-icon/sm/swap.js +8 -41
- package/bpk-component-icon/sm/taxi.js +8 -42
- package/bpk-component-icon/sm/thumbs-down.js +8 -40
- package/bpk-component-icon/sm/thumbs-up.js +8 -40
- package/bpk-component-icon/sm/tick-circle.js +8 -40
- package/bpk-component-icon/sm/tick.js +8 -40
- package/bpk-component-icon/sm/ticket-flexible.js +8 -40
- package/bpk-component-icon/sm/ticket.js +8 -40
- package/bpk-component-icon/sm/time.js +8 -40
- package/bpk-component-icon/sm/toilets.js +8 -40
- package/bpk-component-icon/sm/train.js +8 -40
- package/bpk-component-icon/sm/transmission-automatic.js +8 -40
- package/bpk-component-icon/sm/transmission-manual.js +8 -40
- package/bpk-component-icon/sm/trash.js +8 -40
- package/bpk-component-icon/sm/trend--down.js +8 -40
- package/bpk-component-icon/sm/trend--steady.js +8 -41
- package/bpk-component-icon/sm/trend--will-rise.js +8 -40
- package/bpk-component-icon/sm/trend.js +8 -40
- package/bpk-component-icon/sm/trips.js +8 -40
- package/bpk-component-icon/sm/undo.js +8 -40
- package/bpk-component-icon/sm/unlock.js +8 -40
- package/bpk-component-icon/sm/unmute.js +8 -42
- package/bpk-component-icon/sm/upgrade.js +8 -40
- package/bpk-component-icon/sm/use-location.js +8 -40
- package/bpk-component-icon/sm/view.js +8 -40
- package/bpk-component-icon/sm/virus.js +8 -40
- package/bpk-component-icon/sm/wallet.js +8 -40
- package/bpk-component-icon/sm/weather--clear.js +8 -40
- package/bpk-component-icon/sm/weather--cloudy.js +8 -42
- package/bpk-component-icon/sm/weather--fog.js +8 -40
- package/bpk-component-icon/sm/weather--partly-cloudy.js +8 -40
- package/bpk-component-icon/sm/weather--rain.js +8 -42
- package/bpk-component-icon/sm/weather--snow.js +8 -40
- package/bpk-component-icon/sm/weather--thunderstorm.js +8 -44
- package/bpk-component-icon/sm/weather--tornado.js +8 -40
- package/bpk-component-icon/sm/weather--wind.js +8 -42
- package/bpk-component-icon/sm/weather.js +8 -40
- package/bpk-component-icon/sm/wifi.js +8 -40
- package/bpk-component-icon/sm/window--reduce.js +8 -42
- package/bpk-component-icon/sm/window.js +8 -40
- package/bpk-component-icon/sm/world--amer.js +8 -40
- package/bpk-component-icon/sm/world--apac.js +8 -40
- package/bpk-component-icon/sm/world--emea.js +8 -40
- package/bpk-component-icon/src/{BpkIcon.css → BpkIcon.module.css} +1 -1
- package/bpk-component-icon/src/BpkIcon.module.scss +33 -0
- package/bpk-component-icon/src/classNameModifierHOCFactory.js +52 -52
- package/bpk-component-icon/src/withAlignment.js +25 -26
- package/bpk-component-icon/src/withDescription.js +24 -22
- package/bpk-component-icon/src/{withDescription.css → withDescription.module.css} +0 -0
- package/bpk-component-icon/src/withDescription.module.scss +22 -0
- package/bpk-component-icon/src/withRtlSupport.js +9 -18
- package/bpk-component-image/README.md +142 -0
- package/bpk-component-image/index.js +20 -45
- package/bpk-component-image/package.json +31 -0
- package/bpk-component-image/src/BpkBackgroundImage.js +164 -143
- package/bpk-component-image/src/{BpkBackgroundImage.css → BpkBackgroundImage.module.css} +0 -0
- package/bpk-component-image/src/BpkBackgroundImage.module.scss +46 -0
- package/bpk-component-image/src/BpkImage.js +200 -176
- package/bpk-component-image/src/{BpkImage.css → BpkImage.module.css} +0 -0
- package/bpk-component-image/src/BpkImage.module.scss +89 -0
- package/bpk-component-image/src/BpkImageBorderRadiusStyles.js +6 -13
- package/bpk-component-image/src/customPropTypes.js +11 -11
- package/bpk-component-image/src/withLazyLoading.js +160 -143
- package/bpk-component-image/src/withLoadingBehavior.js +50 -30
- package/bpk-component-infinite-scroll/README.md +187 -0
- package/bpk-component-infinite-scroll/index.js +12 -31
- package/bpk-component-infinite-scroll/package.json +31 -0
- package/bpk-component-infinite-scroll/src/DataSource.js +22 -41
- package/bpk-component-infinite-scroll/src/intersection-observer.js +3 -9
- package/bpk-component-infinite-scroll/src/withInfiniteScroll-test.flow.js +81 -71
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +202 -176
- package/bpk-component-infinite-scroll/src/{withInfiniteScroll.css → withInfiniteScroll.module.css} +0 -0
- package/bpk-component-infinite-scroll/src/withInfiniteScroll.module.scss +25 -0
- package/bpk-component-input/README.md +121 -0
- package/bpk-component-input/index.js +43 -60
- package/bpk-component-input/package.json +30 -0
- package/bpk-component-input/src/BpkClearButton.js +58 -57
- package/bpk-component-input/src/{BpkClearButton.css → BpkClearButton.module.css} +0 -0
- package/bpk-component-input/src/BpkClearButton.module.scss +40 -0
- package/bpk-component-input/src/BpkInput.js +111 -107
- package/bpk-component-input/src/{BpkInput.css → BpkInput.module.css} +0 -0
- package/bpk-component-input/src/BpkInput.module.scss +86 -0
- package/bpk-component-input/src/common-types.js +74 -47
- package/bpk-component-input/src/themeAttributes.js +2 -9
- package/bpk-component-input/src/withOpenEvents.js +111 -93
- package/bpk-component-label/README.md +30 -0
- package/bpk-component-label/index.js +7 -13
- package/bpk-component-label/package.json +24 -0
- package/bpk-component-label/src/BpkLabel.js +54 -55
- package/bpk-component-label/src/{BpkLabel.css → BpkLabel.module.css} +0 -0
- package/bpk-component-label/src/BpkLabel.module.scss +43 -0
- package/bpk-component-link/README.md +68 -0
- package/bpk-component-link/index.js +11 -39
- package/bpk-component-link/package.json +28 -0
- package/bpk-component-link/src/BpkButtonLink.js +56 -59
- package/bpk-component-link/src/BpkLink.js +72 -68
- package/bpk-component-link/src/{BpkLink.css → BpkLink.module.css} +0 -0
- package/bpk-component-link/src/BpkLink.module.scss +31 -0
- package/bpk-component-link/src/themeAttributes.js +18 -11
- package/bpk-component-list/README.md +48 -0
- package/bpk-component-list/index.js +21 -20
- package/bpk-component-list/package.json +24 -0
- package/bpk-component-list/src/BpkList.js +34 -36
- package/bpk-component-list/src/BpkList.module.css +18 -0
- package/bpk-component-list/src/BpkList.module.scss +37 -0
- package/bpk-component-list/src/BpkListItem.js +29 -31
- package/bpk-component-loading-button/README.md +48 -0
- package/bpk-component-loading-button/index.js +7 -21
- package/bpk-component-loading-button/package.json +30 -0
- package/bpk-component-loading-button/src/BpkLoadingButton.js +130 -93
- package/bpk-component-loading-button/src/BpkLoadingButton.module.css +18 -0
- package/bpk-component-loading-button/src/BpkLoadingButton.module.scss +65 -0
- package/bpk-component-map/README.md +213 -0
- package/bpk-component-map/index.js +28 -69
- package/bpk-component-map/package.json +32 -0
- package/bpk-component-map/src/BpkBasicMapMarker.js +45 -41
- package/bpk-component-map/src/BpkIconMarker.js +85 -64
- package/bpk-component-map/src/{BpkIconMarker.css → BpkIconMarker.module.css} +0 -0
- package/bpk-component-map/src/BpkIconMarker.module.scss +74 -0
- package/bpk-component-map/src/BpkIconMarkerBackground.js +58 -51
- package/bpk-component-map/src/{BpkIconMarkerBackground.css → BpkIconMarkerBackground.module.css} +0 -0
- package/bpk-component-map/src/BpkIconMarkerBackground.module.scss +53 -0
- package/bpk-component-map/src/BpkMap.js +140 -103
- package/bpk-component-map/src/BpkMap.module.css +18 -0
- package/bpk-component-map/src/BpkMap.module.scss +21 -0
- package/bpk-component-map/src/BpkOverlayView.js +43 -44
- package/bpk-component-map/src/BpkPriceMarker.js +98 -71
- package/bpk-component-map/src/{BpkPriceMarker.css → BpkPriceMarker.module.css} +0 -0
- package/bpk-component-map/src/BpkPriceMarker.module.scss +146 -0
- package/bpk-component-map/src/DefaultLoadingElement.js +15 -25
- package/bpk-component-map/src/{DefaultLoadingElement.css → DefaultLoadingElement.module.css} +0 -0
- package/bpk-component-map/src/DefaultLoadingElement.module.scss +28 -0
- package/bpk-component-map/src/common-types.js +13 -16
- package/bpk-component-map/src/themeAttributes.js +19 -14
- package/bpk-component-map/src/withGoogleMapsScript.js +56 -50
- package/bpk-component-mobile-scroll-container/README.md +74 -0
- package/bpk-component-mobile-scroll-container/index.js +6 -13
- package/bpk-component-mobile-scroll-container/package.json +28 -0
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +165 -148
- package/bpk-component-mobile-scroll-container/src/{BpkMobileScrollContainer.css → BpkMobileScrollContainer.module.css} +0 -0
- package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.scss +50 -0
- package/bpk-component-modal/README.md +114 -0
- package/bpk-component-modal/index.js +10 -37
- package/bpk-component-modal/package.json +33 -0
- package/bpk-component-modal/src/BpkModal.js +96 -84
- package/bpk-component-modal/src/{BpkModal.css → BpkModal.module.css} +1 -1
- package/bpk-component-modal/src/BpkModal.module.scss +46 -0
- package/bpk-component-modal/src/BpkModalInner.js +135 -94
- package/bpk-component-modal/src/BpkModalInner.module.css +18 -0
- package/bpk-component-modal/src/BpkModalInner.module.scss +123 -0
- package/bpk-component-modal/src/customPropTypes.js +23 -16
- package/bpk-component-modal/src/themeAttributes.js +6 -11
- package/bpk-component-navigation-bar/README.md +114 -0
- package/bpk-component-navigation-bar/index.js +25 -37
- package/bpk-component-navigation-bar/package.json +32 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBar.js +81 -65
- package/bpk-component-navigation-bar/src/{BpkNavigationBar.css → BpkNavigationBar.module.css} +1 -1
- package/bpk-component-navigation-bar/src/BpkNavigationBar.module.scss +77 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +55 -49
- package/bpk-component-navigation-bar/src/{BpkNavigationBarButtonLink.css → BpkNavigationBarButtonLink.module.css} +0 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.scss +51 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +52 -51
- package/bpk-component-navigation-bar/src/{BpkNavigationBarIconButton.css → BpkNavigationBarIconButton.module.css} +0 -0
- package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.scss +43 -0
- package/bpk-component-navigation-bar/src/themeAttributes.js +16 -9
- package/bpk-component-navigation-stack/README.md +49 -0
- package/bpk-component-navigation-stack/index.js +13 -21
- package/bpk-component-navigation-stack/package.json +33 -0
- package/bpk-component-navigation-stack/src/BpkNavigationStack.js +113 -104
- package/bpk-component-navigation-stack/src/{BpkNavigationStack.css → BpkNavigationStack.module.css} +0 -0
- package/bpk-component-navigation-stack/src/BpkNavigationStack.module.scss +51 -0
- package/bpk-component-navigation-stack/src/withNavigationStackState.js +81 -68
- package/bpk-component-nudger/README.md +170 -0
- package/bpk-component-nudger/index.js +9 -29
- package/bpk-component-nudger/package.json +32 -0
- package/bpk-component-nudger/src/BpkConfigurableNudger.js +125 -97
- package/bpk-component-nudger/src/BpkNudger.js +60 -55
- package/bpk-component-nudger/src/{BpkNudger.css → BpkNudger.module.css} +1 -1
- package/bpk-component-nudger/src/BpkNudger.module.scss +49 -0
- package/bpk-component-nudger/src/common-types.js +25 -22
- package/bpk-component-nudger/src/themeAttributes.js +6 -11
- package/bpk-component-overlay/README.md +51 -0
- package/bpk-component-overlay/index.js +11 -27
- package/bpk-component-overlay/package.json +28 -0
- package/bpk-component-overlay/src/BpkOverlay.js +60 -47
- package/bpk-component-overlay/src/{BpkOverlay.css → BpkOverlay.module.css} +0 -0
- package/bpk-component-overlay/src/BpkOverlay.module.scss +41 -0
- package/bpk-component-pagination/README.md +59 -0
- package/bpk-component-pagination/index.js +6 -21
- package/bpk-component-pagination/package.json +28 -0
- package/bpk-component-pagination/src/BpkPagination.js +70 -68
- package/bpk-component-pagination/src/{BpkPagination.css → BpkPagination.module.css} +0 -0
- package/bpk-component-pagination/src/BpkPagination.module.scss +22 -0
- package/bpk-component-pagination/src/BpkPaginationBreak.js +12 -22
- package/bpk-component-pagination/src/BpkPaginationList.js +66 -61
- package/bpk-component-pagination/src/{BpkPaginationList.css → BpkPaginationList.module.css} +0 -0
- package/bpk-component-pagination/src/BpkPaginationList.module.scss +45 -0
- package/bpk-component-pagination/src/BpkPaginationNudger.js +51 -55
- package/bpk-component-pagination/src/{BpkPaginationNudger.css → BpkPaginationNudger.module.css} +0 -0
- package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +74 -0
- package/bpk-component-pagination/src/BpkPaginationPage.js +30 -41
- package/bpk-component-pagination/src/BpkPaginationPage.module.css +18 -0
- package/bpk-component-pagination/src/BpkPaginationPage.module.scss +92 -0
- package/bpk-component-pagination/src/themeAttributes.js +9 -11
- package/bpk-component-panel/README.md +33 -0
- package/bpk-component-panel/index.js +4 -13
- package/bpk-component-panel/package.json +24 -0
- package/bpk-component-panel/src/BpkPanel.js +41 -48
- package/bpk-component-panel/src/{BpkPanel.css → BpkPanel.module.css} +0 -0
- package/bpk-component-panel/src/BpkPanel.module.scss +31 -0
- package/bpk-component-phone-input/README.md +100 -0
- package/bpk-component-phone-input/index.js +9 -13
- package/bpk-component-phone-input/package.json +33 -0
- package/bpk-component-phone-input/src/BpkPhoneInput.js +157 -119
- package/bpk-component-phone-input/src/{BpkPhoneInput.css → BpkPhoneInput.module.css} +1 -1
- package/bpk-component-phone-input/src/BpkPhoneInput.module.scss +42 -0
- package/bpk-component-popover/README.md +128 -0
- package/bpk-component-popover/index.js +17 -37
- package/bpk-component-popover/package.json +35 -0
- package/bpk-component-popover/src/BpkPopover.js +146 -111
- package/bpk-component-popover/src/BpkPopover.module.css +18 -0
- package/bpk-component-popover/src/BpkPopover.module.scss +128 -0
- package/bpk-component-popover/src/BpkPopoverPortal.js +173 -158
- package/bpk-component-popover/src/constants.js +6 -13
- package/bpk-component-popover/src/keyboardFocusScope.js +15 -26
- package/bpk-component-popover/src/themeAttributes.js +6 -11
- package/bpk-component-price/README.md +37 -0
- package/bpk-component-price/index.js +7 -27
- package/bpk-component-price/package.json +24 -0
- package/bpk-component-price/src/BpkPrice.js +100 -76
- package/bpk-component-price/src/BpkPrice.module.css +18 -0
- package/bpk-component-price/src/BpkPrice.module.scss +61 -0
- package/bpk-component-price/src/common-types.js +8 -13
- package/bpk-component-progress/README.md +56 -0
- package/bpk-component-progress/index.js +8 -21
- package/bpk-component-progress/package.json +30 -0
- package/bpk-component-progress/src/BpkProgress.js +114 -123
- package/bpk-component-progress/src/{BpkProgress.css → BpkProgress.module.css} +0 -0
- package/bpk-component-progress/src/BpkProgress.module.scss +64 -0
- package/bpk-component-progress/src/themeAttributes.js +4 -9
- package/bpk-component-radio/README.md +43 -0
- package/bpk-component-radio/index.js +8 -21
- package/bpk-component-radio/package.json +28 -0
- package/bpk-component-radio/src/BpkRadio.js +77 -57
- package/bpk-component-radio/src/{BpkRadio.css → BpkRadio.module.css} +0 -0
- package/bpk-component-radio/src/BpkRadio.module.scss +78 -0
- package/bpk-component-radio/src/themeAttributes.js +4 -9
- package/bpk-component-rating/README.md +80 -0
- package/bpk-component-rating/index.js +7 -27
- package/bpk-component-rating/package.json +29 -0
- package/bpk-component-rating/src/BpkRating.js +128 -100
- package/bpk-component-rating/src/BpkRating.module.css +18 -0
- package/bpk-component-rating/src/BpkRating.module.scss +86 -0
- package/bpk-component-rating/src/common-types.js +7 -15
- package/bpk-component-rtl-toggle/README.md +26 -0
- package/bpk-component-rtl-toggle/index.js +6 -21
- package/bpk-component-rtl-toggle/package.json +24 -0
- package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +65 -54
- package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +46 -36
- package/bpk-component-rtl-toggle/src/utils.js +6 -12
- package/bpk-component-scrollable-calendar/README.md +102 -0
- package/bpk-component-scrollable-calendar/index.js +17 -45
- package/bpk-component-scrollable-calendar/package.json +32 -0
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.js +18 -17
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +37 -46
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +49 -57
- package/bpk-component-scrollable-calendar/src/{BpkScrollableCalendarGrid.css → BpkScrollableCalendarGrid.module.css} +0 -0
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.module.scss +31 -0
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +128 -112
- package/bpk-component-scrollable-calendar/src/{BpkScrollableCalendarGridList.css → BpkScrollableCalendarGridList.module.css} +0 -0
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.scss +37 -0
- package/bpk-component-scrollable-calendar/src/utils.js +5 -13
- package/bpk-component-scrollable-calendar/test-utils.js +244 -211
- package/bpk-component-section-list/README.md +52 -0
- package/bpk-component-section-list/index.js +9 -29
- package/bpk-component-section-list/package.json +30 -0
- package/bpk-component-section-list/src/BpkSectionList.js +32 -27
- package/bpk-component-section-list/src/BpkSectionListItem.js +85 -71
- package/bpk-component-section-list/src/{BpkSectionListItem.css → BpkSectionListItem.module.css} +0 -0
- package/bpk-component-section-list/src/BpkSectionListItem.module.scss +54 -0
- package/bpk-component-section-list/src/BpkSectionListSection.js +56 -49
- package/bpk-component-section-list/src/{BpkSectionListSection.css → BpkSectionListSection.module.css} +0 -0
- package/bpk-component-section-list/src/BpkSectionListSection.module.scss +35 -0
- package/bpk-component-select/README.md +47 -0
- package/bpk-component-select/index.js +9 -21
- package/bpk-component-select/package.json +27 -0
- package/bpk-component-select/src/BpkSelect.js +99 -63
- package/bpk-component-select/src/{BpkSelect.css → BpkSelect.module.css} +0 -0
- package/bpk-component-select/src/BpkSelect.module.scss +126 -0
- package/bpk-component-select/src/themeAttributes.js +2 -9
- package/bpk-component-skip-link/README.md +30 -0
- package/bpk-component-skip-link/index.js +8 -21
- package/bpk-component-skip-link/package.json +24 -0
- package/bpk-component-skip-link/src/BpkSkipLink.js +48 -44
- package/bpk-component-skip-link/src/{BpkSkipLink.css → BpkSkipLink.module.css} +0 -0
- package/bpk-component-skip-link/src/BpkSkipLink.module.scss +50 -0
- package/bpk-component-skip-link/src/themeAttributes.js +2 -9
- package/bpk-component-slider/README.md +43 -0
- package/bpk-component-slider/index.js +6 -21
- package/bpk-component-slider/package.json +29 -0
- package/bpk-component-slider/src/BpkSlider.js +48 -52
- package/bpk-component-slider/src/{BpkSlider.css → BpkSlider.module.css} +0 -0
- package/bpk-component-slider/src/BpkSlider.module.scss +103 -0
- package/bpk-component-slider/src/themeAttributes.js +2 -9
- package/bpk-component-spinner/README.md +40 -0
- package/bpk-component-spinner/changelog.yml +55 -0
- package/bpk-component-spinner/index.js +30 -44
- package/bpk-component-spinner/package.json +25 -0
- package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +50 -46
- package/bpk-component-spinner/src/BpkLargeSpinner.js +53 -47
- package/bpk-component-spinner/src/BpkSpinner.js +52 -47
- package/bpk-component-spinner/src/{BpkSpinner.css → BpkSpinner.module.css} +1 -1
- package/bpk-component-spinner/src/BpkSpinner.module.scss +57 -0
- package/bpk-component-spinner/src/spinnerTypes.js +5 -10
- package/bpk-component-spinner/src/themeAttributes.js +4 -9
- package/bpk-component-split-input/README.md +42 -0
- package/bpk-component-split-input/index.js +10 -21
- package/bpk-component-split-input/package.json +24 -0
- package/bpk-component-split-input/src/BpkInputField.js +55 -70
- package/bpk-component-split-input/src/BpkInputField.module.css +18 -0
- package/bpk-component-split-input/src/BpkInputField.module.scss +34 -0
- package/bpk-component-split-input/src/BpkSplitInput.js +219 -243
- package/bpk-component-split-input/src/BpkSplitInput.module.css +18 -0
- package/bpk-component-split-input/src/BpkSplitInput.module.scss +36 -0
- package/bpk-component-star-rating/README.md +99 -0
- package/bpk-component-star-rating/index.js +21 -75
- package/bpk-component-star-rating/package.json +29 -0
- package/bpk-component-star-rating/src/BpkInteractiveStar.js +74 -60
- package/bpk-component-star-rating/src/{BpkInteractiveStar.css → BpkInteractiveStar.module.css} +0 -0
- package/bpk-component-star-rating/src/BpkInteractiveStar.module.scss +66 -0
- package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +83 -67
- package/bpk-component-star-rating/src/BpkStar.js +88 -85
- package/bpk-component-star-rating/src/{BpkStar.css → BpkStar.module.css} +0 -0
- package/bpk-component-star-rating/src/BpkStar.module.scss +63 -0
- package/bpk-component-star-rating/src/BpkStarRating.js +88 -68
- package/bpk-component-star-rating/src/{BpkStarRating.css → BpkStarRating.module.css} +0 -0
- package/bpk-component-star-rating/src/BpkStarRating.module.scss +21 -0
- package/bpk-component-star-rating/src/themeAttributes.js +4 -9
- package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +82 -71
- package/bpk-component-switch/README.md +37 -0
- package/bpk-component-switch/index.js +11 -31
- package/bpk-component-switch/package.json +24 -0
- package/bpk-component-switch/src/BpkSwitch.js +64 -53
- package/bpk-component-switch/src/{BpkSwitch.css → BpkSwitch.module.css} +0 -0
- package/bpk-component-switch/src/BpkSwitch.module.scss +93 -0
- package/bpk-component-switch/src/themeAttributes.js +2 -9
- package/bpk-component-table/README.md +66 -0
- package/bpk-component-table/index.js +35 -55
- package/bpk-component-table/package.json +24 -0
- package/bpk-component-table/src/BpkTable.js +50 -43
- package/bpk-component-table/src/{BpkTable.css → BpkTable.module.css} +0 -0
- package/bpk-component-table/src/BpkTable.module.scss +39 -0
- package/bpk-component-table/src/BpkTableBody.js +12 -17
- package/bpk-component-table/src/BpkTableCell.js +44 -40
- package/bpk-component-table/src/BpkTableHead.js +12 -17
- package/bpk-component-table/src/BpkTableHeadCell.js +47 -44
- package/bpk-component-table/src/BpkTableRow.js +12 -17
- package/bpk-component-text/README.md +76 -0
- package/bpk-component-text/index.js +7 -27
- package/bpk-component-text/package.json +24 -0
- package/bpk-component-text/src/BpkText.js +88 -52
- package/bpk-component-text/src/{BpkText.css → BpkText.module.css} +1 -1
- package/bpk-component-text/src/BpkText.module.scss +139 -0
- package/bpk-component-textarea/README.md +34 -0
- package/bpk-component-textarea/index.js +8 -21
- package/bpk-component-textarea/package.json +28 -0
- package/bpk-component-textarea/src/BpkTextarea.js +55 -43
- package/bpk-component-textarea/src/{BpkTextarea.css → BpkTextarea.module.css} +0 -0
- package/bpk-component-textarea/src/BpkTextarea.module.scss +33 -0
- package/bpk-component-textarea/src/themeAttributes.js +4 -9
- package/bpk-component-theme-toggle/README.md +30 -0
- package/bpk-component-theme-toggle/index.js +6 -21
- package/bpk-component-theme-toggle/package.json +27 -0
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +90 -94
- package/bpk-component-theme-toggle/src/{BpkThemeToggle.css → BpkThemeToggle.module.css} +0 -0
- package/bpk-component-theme-toggle/src/BpkThemeToggle.module.scss +25 -0
- package/bpk-component-theme-toggle/src/theming.js +99 -57
- package/bpk-component-theme-toggle/src/updateOnThemeChange.js +52 -49
- package/bpk-component-theme-toggle/src/utils.js +3 -10
- package/bpk-component-ticket/README.md +37 -0
- package/bpk-component-ticket/index.js +6 -13
- package/bpk-component-ticket/package.json +28 -0
- package/bpk-component-ticket/src/BpkTicket.js +117 -74
- package/bpk-component-ticket/src/BpkTicket.module.css +18 -0
- package/bpk-component-ticket/src/BpkTicket.module.scss +145 -0
- package/bpk-component-tooltip/README.md +56 -0
- package/bpk-component-tooltip/index.js +10 -21
- package/bpk-component-tooltip/package.json +29 -0
- package/bpk-component-tooltip/src/BpkTooltip.js +94 -76
- package/bpk-component-tooltip/src/BpkTooltip.module.css +18 -0
- package/bpk-component-tooltip/src/BpkTooltip.module.scss +144 -0
- package/bpk-component-tooltip/src/BpkTooltipPortal.js +167 -138
- package/bpk-component-tooltip/src/constants.js +8 -17
- package/bpk-react-utils/README.md +251 -0
- package/bpk-react-utils/index.js +42 -106
- package/bpk-react-utils/package.json +25 -0
- package/bpk-react-utils/src/Portal-v1.js +101 -81
- package/bpk-react-utils/src/Portal.js +98 -86
- package/bpk-react-utils/src/TransitionInitialMount.js +36 -38
- package/bpk-react-utils/src/cssModules.js +10 -15
- package/bpk-react-utils/src/deprecated.js +19 -19
- package/bpk-react-utils/src/deviceDetection.js +8 -12
- package/bpk-react-utils/src/isRTL.js +12 -11
- package/bpk-react-utils/src/withDefaultProps.js +53 -45
- package/bpk-react-utils/src/wrapDisplayName.js +2 -9
- package/bpk-scrim-utils/README.md +50 -0
- package/bpk-scrim-utils/index.js +6 -20
- package/bpk-scrim-utils/package.json +25 -0
- package/bpk-scrim-utils/src/BpkScrim.js +28 -33
- package/bpk-scrim-utils/src/{bpk-scrim-content.css → bpk-scrim-content.module.css} +0 -0
- package/bpk-scrim-utils/src/bpk-scrim-content.module.scss +32 -0
- package/bpk-scrim-utils/src/{bpk-scrim.css → bpk-scrim.module.css} +1 -1
- package/bpk-scrim-utils/src/bpk-scrim.module.scss +51 -0
- package/bpk-scrim-utils/src/customPropTypes.js +15 -12
- package/bpk-scrim-utils/src/scroll-utils.js +16 -27
- package/bpk-scrim-utils/src/withScrim.js +103 -119
- package/bpk-theming/README.md +43 -0
- package/bpk-theming/index.js +4 -13
- package/bpk-theming/package.json +23 -0
- package/bpk-theming/src/BpkThemeProvider.js +63 -82
- package/package.json +1 -1
- package/bpk-component-button/src/BpkButtonBase.css +0 -18
- package/bpk-component-button/src/BpkButtonDestructive.css +0 -18
- package/bpk-component-button/src/BpkButtonLink.css +0 -18
- package/bpk-component-button/src/BpkButtonSecondary.css +0 -18
- package/bpk-component-content-container/src/BpkContentContainer.css +0 -18
- package/bpk-component-dialog/src/BpkDialogInner.css +0 -18
- package/bpk-component-floating-notification/src/BpkFloatingNotification.css +0 -18
- package/bpk-component-grid/src/BpkGridColumn.css +0 -18
- package/bpk-component-grid/src/BpkGridContainer.css +0 -18
- package/bpk-component-list/src/BpkList.css +0 -18
- package/bpk-component-modal/src/BpkModalInner.css +0 -18
- package/bpk-component-pagination/src/BpkPaginationPage.css +0 -18
- package/bpk-component-popover/src/BpkPopover.css +0 -18
- package/bpk-component-rating/src/BpkRating.css +0 -18
- package/bpk-component-ticket/src/BpkTicket.css +0 -18
- package/bpk-component-tooltip/src/BpkTooltip.css +0 -18
|
@@ -1,164 +1,181 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
/* @flow strict */
|
|
19
|
+
|
|
20
|
+
import React, { type Node, type ComponentType } from 'react';
|
|
21
|
+
import PropTypes from 'prop-types';
|
|
22
|
+
import { wrapDisplayName } from '../../bpk-react-utils';
|
|
23
|
+
import throttle from 'lodash/throttle';
|
|
24
|
+
|
|
25
|
+
type WithLazyLoadingProps = {
|
|
26
|
+
className: ?string,
|
|
27
|
+
style: ?{},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type WithLazyLoadingState = {
|
|
31
|
+
inView: boolean,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default function withLazyLoading(
|
|
35
|
+
Component: ComponentType<any>,
|
|
36
|
+
documentRef: typeof window,
|
|
37
|
+
): ComponentType<any> {
|
|
38
|
+
class WithLazyLoading extends React.Component<
|
|
39
|
+
WithLazyLoadingProps,
|
|
40
|
+
WithLazyLoadingState,
|
|
41
|
+
> {
|
|
42
|
+
checkInView: () => void;
|
|
43
|
+
|
|
44
|
+
element: ?HTMLElement;
|
|
45
|
+
|
|
46
|
+
isInViewPort: () => boolean;
|
|
47
|
+
|
|
48
|
+
placeholderReference: string;
|
|
49
|
+
|
|
50
|
+
removeEventListeners: () => void;
|
|
51
|
+
|
|
52
|
+
setInView: () => void;
|
|
53
|
+
|
|
54
|
+
state: WithLazyLoadingState;
|
|
55
|
+
|
|
56
|
+
supportsPassiveEvents: () => boolean;
|
|
57
|
+
|
|
58
|
+
static propTypes = {
|
|
59
|
+
style: PropTypes.object, // eslint-disable-line react/forbid-prop-types
|
|
60
|
+
className: PropTypes.string,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
static defaultProps = {
|
|
64
|
+
style: null,
|
|
65
|
+
className: null,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
constructor(): void {
|
|
35
69
|
super();
|
|
36
70
|
|
|
37
|
-
_defineProperty(this, "checkInView", void 0);
|
|
38
|
-
|
|
39
|
-
_defineProperty(this, "element", void 0);
|
|
40
|
-
|
|
41
|
-
_defineProperty(this, "isInViewPort", void 0);
|
|
42
|
-
|
|
43
|
-
_defineProperty(this, "placeholderReference", void 0);
|
|
44
|
-
|
|
45
|
-
_defineProperty(this, "removeEventListeners", void 0);
|
|
46
|
-
|
|
47
|
-
_defineProperty(this, "setInView", void 0);
|
|
48
|
-
|
|
49
|
-
_defineProperty(this, "state", void 0);
|
|
50
|
-
|
|
51
|
-
_defineProperty(this, "supportsPassiveEvents", void 0);
|
|
52
|
-
|
|
53
|
-
_defineProperty(this, "setInView", () => {
|
|
54
|
-
this.setState(() => ({
|
|
55
|
-
inView: true
|
|
56
|
-
}));
|
|
57
|
-
this.removeEventListeners();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
_defineProperty(this, "removeEventListeners", () => {
|
|
61
|
-
documentRef.removeEventListener('scroll', this.checkInView, _objectSpread({}, this.getPassiveArgs()));
|
|
62
|
-
documentRef.removeEventListener('resize', this.checkInView);
|
|
63
|
-
documentRef.removeEventListener('orientationchange', this.checkInView);
|
|
64
|
-
documentRef.removeEventListener('fullscreenchange', this.checkInView);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
_defineProperty(this, "checkInView", (0, _throttle.default)(() => {
|
|
68
|
-
if (this.isInViewPort()) {
|
|
69
|
-
this.setInView();
|
|
70
|
-
}
|
|
71
|
-
}, 250));
|
|
72
|
-
|
|
73
|
-
_defineProperty(this, "supportsPassiveEvents", () => {
|
|
74
|
-
let supportsPassiveOption = false;
|
|
75
|
-
|
|
76
|
-
try {
|
|
77
|
-
const opts = Object.defineProperty({}, 'passive', {
|
|
78
|
-
get() {
|
|
79
|
-
supportsPassiveOption = true;
|
|
80
|
-
return supportsPassiveOption;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
window.addEventListener('test', null, opts);
|
|
85
|
-
window.removeEventListener('test');
|
|
86
|
-
} catch (e) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return supportsPassiveOption;
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
_defineProperty(this, "isInViewPort", () => {
|
|
94
|
-
if (!this.element) return false;
|
|
95
|
-
const rect = this.element.getBoundingClientRect();
|
|
96
|
-
const viewPortHeight = Math.max(window.innerHeight, documentRef.documentElement.clientHeight);
|
|
97
|
-
const viewPortWidth = Math.max(window.innerWidth, documentRef.documentElement.clientWidth);
|
|
98
|
-
return rect.bottom >= 0 && rect.right >= 0 && rect.top < viewPortHeight && rect.left < viewPortWidth;
|
|
99
|
-
});
|
|
100
|
-
|
|
101
71
|
this.state = {
|
|
102
|
-
inView: false
|
|
72
|
+
inView: false,
|
|
103
73
|
};
|
|
104
74
|
}
|
|
105
75
|
|
|
106
|
-
componentDidMount() {
|
|
107
|
-
documentRef.addEventListener('scroll', this.checkInView,
|
|
76
|
+
componentDidMount(): void {
|
|
77
|
+
documentRef.addEventListener('scroll', this.checkInView, {
|
|
78
|
+
...this.getPassiveArgs(),
|
|
79
|
+
});
|
|
108
80
|
documentRef.addEventListener('resize', this.checkInView);
|
|
109
81
|
documentRef.addEventListener('orientationchange', this.checkInView);
|
|
110
|
-
documentRef.addEventListener('fullscreenchange', this.checkInView);
|
|
82
|
+
documentRef.addEventListener('fullscreenchange', this.checkInView);
|
|
83
|
+
// call checkInView immediately incase the
|
|
111
84
|
// component is already in view prior to scrolling
|
|
112
|
-
|
|
113
85
|
this.checkInView();
|
|
114
86
|
}
|
|
115
87
|
|
|
116
|
-
componentWillUnmount() {
|
|
88
|
+
componentWillUnmount(): void {
|
|
117
89
|
this.removeEventListeners();
|
|
118
90
|
}
|
|
119
91
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
127
|
-
}
|
|
92
|
+
setInView = (): void => {
|
|
93
|
+
this.setState(() => ({
|
|
94
|
+
inView: true,
|
|
95
|
+
}));
|
|
96
|
+
this.removeEventListeners();
|
|
97
|
+
};
|
|
128
98
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
style
|
|
134
|
-
} = _this$props,
|
|
135
|
-
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
136
|
-
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
id: this.placeholderReference,
|
|
139
|
-
ref: element => {
|
|
140
|
-
this.element = element;
|
|
141
|
-
},
|
|
142
|
-
style: style,
|
|
143
|
-
className: className
|
|
144
|
-
}, /*#__PURE__*/_react.default.createElement(Component, _extends({
|
|
145
|
-
inView: this.state.inView
|
|
146
|
-
}, rest)));
|
|
99
|
+
getPassiveArgs(): { capture: boolean } {
|
|
100
|
+
return this.supportsPassiveEvents()
|
|
101
|
+
? { capture: true, passive: true }
|
|
102
|
+
: { capture: true };
|
|
147
103
|
}
|
|
148
104
|
|
|
105
|
+
removeEventListeners = (): void => {
|
|
106
|
+
documentRef.removeEventListener('scroll', this.checkInView, {
|
|
107
|
+
...this.getPassiveArgs(),
|
|
108
|
+
});
|
|
109
|
+
documentRef.removeEventListener('resize', this.checkInView);
|
|
110
|
+
documentRef.removeEventListener('orientationchange', this.checkInView);
|
|
111
|
+
documentRef.removeEventListener('fullscreenchange', this.checkInView);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
checkInView = throttle(() => {
|
|
115
|
+
if (this.isInViewPort()) {
|
|
116
|
+
this.setInView();
|
|
117
|
+
}
|
|
118
|
+
}, 250);
|
|
119
|
+
|
|
120
|
+
// This function is taken from modernizr
|
|
121
|
+
// See https://github.com/modernizr/modernizr
|
|
122
|
+
supportsPassiveEvents = (): boolean => {
|
|
123
|
+
let supportsPassiveOption = false;
|
|
124
|
+
try {
|
|
125
|
+
const opts = Object.defineProperty({}, 'passive', {
|
|
126
|
+
get() {
|
|
127
|
+
supportsPassiveOption = true;
|
|
128
|
+
return supportsPassiveOption;
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
window.addEventListener('test', null, opts);
|
|
132
|
+
window.removeEventListener('test');
|
|
133
|
+
} catch (e) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return supportsPassiveOption;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
isInViewPort = (): boolean => {
|
|
140
|
+
if (!this.element) return false;
|
|
141
|
+
const rect = this.element.getBoundingClientRect();
|
|
142
|
+
|
|
143
|
+
const viewPortHeight = Math.max(
|
|
144
|
+
window.innerHeight,
|
|
145
|
+
documentRef.documentElement.clientHeight,
|
|
146
|
+
);
|
|
147
|
+
const viewPortWidth = Math.max(
|
|
148
|
+
window.innerWidth,
|
|
149
|
+
documentRef.documentElement.clientWidth,
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
rect.bottom >= 0 &&
|
|
154
|
+
rect.right >= 0 &&
|
|
155
|
+
rect.top < viewPortHeight &&
|
|
156
|
+
rect.left < viewPortWidth
|
|
157
|
+
);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
render(): Node {
|
|
161
|
+
const { className, style, ...rest } = this.props;
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<div
|
|
165
|
+
id={this.placeholderReference}
|
|
166
|
+
ref={(element) => {
|
|
167
|
+
this.element = element;
|
|
168
|
+
}}
|
|
169
|
+
style={style}
|
|
170
|
+
className={className}
|
|
171
|
+
>
|
|
172
|
+
{/* $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'. */}
|
|
173
|
+
<Component inView={this.state.inView} {...rest} />
|
|
174
|
+
</div>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
149
177
|
}
|
|
178
|
+
WithLazyLoading.displayName = wrapDisplayName(Component, 'withLazyLoading');
|
|
150
179
|
|
|
151
|
-
_defineProperty(WithLazyLoading, "propTypes", {
|
|
152
|
-
style: _propTypes.default.object,
|
|
153
|
-
// eslint-disable-line react/forbid-prop-types
|
|
154
|
-
className: _propTypes.default.string
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
_defineProperty(WithLazyLoading, "defaultProps", {
|
|
158
|
-
style: null,
|
|
159
|
-
className: null
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
WithLazyLoading.displayName = (0, _bpkReactUtils.wrapDisplayName)(Component, 'withLazyLoading');
|
|
163
180
|
return WithLazyLoading;
|
|
164
|
-
}
|
|
181
|
+
}
|
|
@@ -1,45 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
/* @flow */
|
|
2
19
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.default = withLoadingBehavior;
|
|
20
|
+
import React, { type AbstractComponent } from 'react';
|
|
21
|
+
import { wrapDisplayName } from '../../bpk-react-utils';
|
|
7
22
|
|
|
8
|
-
|
|
23
|
+
type InjectedProps = {|
|
|
24
|
+
onLoad: () => mixed,
|
|
25
|
+
loading: boolean,
|
|
26
|
+
|};
|
|
9
27
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function withLoadingBehavior(Component) {
|
|
19
|
-
class WithLoadingBehavior extends _react.default.Component {
|
|
28
|
+
export default function withLoadingBehavior<Config>(
|
|
29
|
+
Component: AbstractComponent<{| ...Config, ...InjectedProps |}>,
|
|
30
|
+
): AbstractComponent<Config> {
|
|
31
|
+
class WithLoadingBehavior<C: Config> extends React.Component<
|
|
32
|
+
C,
|
|
33
|
+
{| loading: boolean |},
|
|
34
|
+
> {
|
|
20
35
|
constructor() {
|
|
21
36
|
super();
|
|
22
37
|
|
|
23
|
-
_defineProperty(this, "onLoad", () => {
|
|
24
|
-
this.setState(() => ({
|
|
25
|
-
loading: false
|
|
26
|
-
}));
|
|
27
|
-
});
|
|
28
|
-
|
|
29
38
|
this.state = {
|
|
30
|
-
loading: true
|
|
39
|
+
loading: true,
|
|
31
40
|
};
|
|
32
41
|
}
|
|
33
42
|
|
|
43
|
+
onLoad = () => {
|
|
44
|
+
this.setState(() => ({
|
|
45
|
+
loading: false,
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
34
49
|
render() {
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
return (
|
|
51
|
+
<Component
|
|
52
|
+
onLoad={this.onLoad}
|
|
53
|
+
loading={this.state.loading}
|
|
54
|
+
{...this.props}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
39
57
|
}
|
|
40
|
-
|
|
41
58
|
}
|
|
59
|
+
WithLoadingBehavior.displayName = wrapDisplayName(
|
|
60
|
+
Component,
|
|
61
|
+
'withLoadingBehavior',
|
|
62
|
+
);
|
|
42
63
|
|
|
43
|
-
WithLoadingBehavior.displayName = (0, _bpkReactUtils.wrapDisplayName)(Component, 'withLoadingBehavior');
|
|
44
64
|
return WithLoadingBehavior;
|
|
45
|
-
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# bpk-component-infinite-scroll
|
|
2
|
+
|
|
3
|
+
> Backpack infinite scroll component.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install bpk-component-infinite-scroll --save-dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import PropTypes from 'prop-types';
|
|
16
|
+
import BpkButton from 'bpk-component-button';
|
|
17
|
+
import BpkSpinner, { SPINNER_TYPES } from 'bpk-component-spinner';
|
|
18
|
+
import withInfiniteScroll, {
|
|
19
|
+
ArrayDataSource,
|
|
20
|
+
} from 'bpk-component-infinite-scroll';
|
|
21
|
+
|
|
22
|
+
const SomeList = ({ elements }) => (
|
|
23
|
+
<div id="list">
|
|
24
|
+
{elements.map(element => (
|
|
25
|
+
<div key={element} style={{ height: '50px' }}>
|
|
26
|
+
{element}
|
|
27
|
+
</div>
|
|
28
|
+
))}
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const elementsArray = [
|
|
33
|
+
'element 1',
|
|
34
|
+
'element 2',
|
|
35
|
+
'element 3',
|
|
36
|
+
'element 4',
|
|
37
|
+
'element 5',
|
|
38
|
+
'element 6',
|
|
39
|
+
'element 7',
|
|
40
|
+
'element 8',
|
|
41
|
+
'element 9',
|
|
42
|
+
'element 10',
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const CustomLoading = () => (
|
|
46
|
+
<div>
|
|
47
|
+
<BpkSpinner type={SPINNER_TYPES.primary} />
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const CustomSeeMore = ({ onSeeMoreClick }) => (
|
|
52
|
+
<div>
|
|
53
|
+
<BpkButton onClick={onSeeMoreClick}>See More</BpkButton>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
const InfiniteList = withInfiniteScroll(SomeList);
|
|
58
|
+
const dataSource = new ArrayDataSource(elementsArray);
|
|
59
|
+
|
|
60
|
+
export default () => (
|
|
61
|
+
<InfiniteList
|
|
62
|
+
dataSource={dataSource}
|
|
63
|
+
renderLoadingComponent={CustomLoading}
|
|
64
|
+
renderSeeMoreComponent={CustomSeeMore}
|
|
65
|
+
seeMoreAfter={1}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Accompanying classes
|
|
71
|
+
|
|
72
|
+
## DataSource
|
|
73
|
+
|
|
74
|
+
`DataSource` is a class used by the BpkInfiniteScroll component to fetch items
|
|
75
|
+
and listen for changes in the data and react to it by reloading the current items
|
|
76
|
+
in the list.
|
|
77
|
+
|
|
78
|
+
### Methods
|
|
79
|
+
|
|
80
|
+
`fetchItems(index, nElements)`
|
|
81
|
+
|
|
82
|
+
Called by the `InfiniteScroll` component every time new data is
|
|
83
|
+
requested (by scrolling down) and should return the data starting from `index` plus `nElements` (number of elements). It should return a promise object.
|
|
84
|
+
|
|
85
|
+
Example:
|
|
86
|
+
|
|
87
|
+
```js
|
|
88
|
+
fetchItems(0, 5); // should return 5 items starting from position 0
|
|
89
|
+
fetchItems(5, 5); // should return 5 items starting from position 5
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
_Calling this method directly in the `DataSource` class will result in an error, it should be implemented by the subclass extending `DataSource`._
|
|
93
|
+
|
|
94
|
+
`onDataChange(cb)`
|
|
95
|
+
|
|
96
|
+
Adds a new change listener to this `DataSource`, to be called when data is updated. Returns true if added or false otherwise.
|
|
97
|
+
|
|
98
|
+
`removeListener(cb)`
|
|
99
|
+
|
|
100
|
+
Removes the callback from the list of change listeners. Returns true if removed or false otherwise.
|
|
101
|
+
|
|
102
|
+
`triggerListeners(...args)`
|
|
103
|
+
|
|
104
|
+
Triggers all listeners in response to data changes. This method should be
|
|
105
|
+
used by subclasses to tell the `InfiniteScroll` component it should refresh
|
|
106
|
+
its data.
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
import React from 'react';
|
|
110
|
+
import PropTypes from 'prop-types';
|
|
111
|
+
import withInfiniteScroll, { DataSource } from 'bpk-component-infinite-scroll';
|
|
112
|
+
|
|
113
|
+
const SomeList = ({ elements }) => (
|
|
114
|
+
<div id="list">
|
|
115
|
+
{elements.map(element => (
|
|
116
|
+
<div key={element} style={{ height: '50px' }}>
|
|
117
|
+
{element}
|
|
118
|
+
</div>
|
|
119
|
+
))}
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
class RemoteFlightsDataSource extends DataSource {
|
|
124
|
+
constructor() {
|
|
125
|
+
super();
|
|
126
|
+
myWebSocketConnection.on('dataChange', () => {
|
|
127
|
+
// tell the `InfiniteScroll` component to refresh its data
|
|
128
|
+
this.triggerListeners();
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
fetchItems(index, nElements) {
|
|
133
|
+
return fetch(`https://my-api/flights?start=${index}&count=${nElements}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const InfiniteList = withInfiniteScroll(SomeList);
|
|
138
|
+
|
|
139
|
+
export default () => (
|
|
140
|
+
<InfiniteList dataSource={new RemoteFlightsDataSource()} />
|
|
141
|
+
);
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## ArrayDataSource
|
|
145
|
+
|
|
146
|
+
`ArrayDataSource` is a class that extends from `DataSource`. Accepts an array
|
|
147
|
+
as a parameter in the constructor and uses it as source for the infinite scroll.
|
|
148
|
+
|
|
149
|
+
> See [Usage](#Usage) for an example of this class in use.
|
|
150
|
+
|
|
151
|
+
### Methods
|
|
152
|
+
|
|
153
|
+
_refer to the `DataSource` methods section for a list of all methods_
|
|
154
|
+
|
|
155
|
+
`fetchItems(index, nElements)`
|
|
156
|
+
|
|
157
|
+
Returns a subset of the array data.
|
|
158
|
+
|
|
159
|
+
`updateData(newData)`
|
|
160
|
+
|
|
161
|
+
Updates the internal array and triggers all listeners.
|
|
162
|
+
|
|
163
|
+
## Props
|
|
164
|
+
|
|
165
|
+
| Property | PropType | Required | Default Value |
|
|
166
|
+
| ----------------------- | -------------------------------- | -------- | ------------- |
|
|
167
|
+
| dataSource | instanceOf(DataSource) | true | - |
|
|
168
|
+
| elementsPerScroll | number | false | 5 |
|
|
169
|
+
| initiallyLoadedElements | number | false | 5 |
|
|
170
|
+
| loaderMinDisplay | oneOf(['small', 'half', 'full']) | false | 'full' |
|
|
171
|
+
| onScroll | func | false | null |
|
|
172
|
+
| onScrollFinished | func | false | null |
|
|
173
|
+
| renderLoadingComponent | func | false | null |
|
|
174
|
+
| renderSeeMoreComponent | func | false | null |
|
|
175
|
+
| seeMoreAfter | number | false | null |
|
|
176
|
+
|
|
177
|
+
## `elementsPerScroll`
|
|
178
|
+
|
|
179
|
+
How many more elements to load every time the user reaches the bottom of the list.
|
|
180
|
+
|
|
181
|
+
## `initiallyLoadedElements`
|
|
182
|
+
|
|
183
|
+
How many more elements to load every time the user reaches the bottom of the list.
|
|
184
|
+
|
|
185
|
+
### `seeMoreAfter`
|
|
186
|
+
|
|
187
|
+
`seeMoreAfter` is how many scrolls should happen before a 'See more' button is displayed. This only happens once.
|
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "ArrayDataSource", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _DataSource.ArrayDataSource;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "DataSource", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _DataSource.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
exports.default = void 0;
|
|
19
|
-
|
|
20
|
-
var _withInfiniteScroll = _interopRequireDefault(require("./src/withInfiniteScroll"));
|
|
21
|
-
|
|
22
|
-
var _DataSource = _interopRequireWildcard(require("./src/DataSource"));
|
|
23
|
-
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
1
|
/*
|
|
31
2
|
* Backpack - Skyscanner's Design System
|
|
32
3
|
*
|
|
@@ -44,5 +15,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
44
15
|
* See the License for the specific language governing permissions and
|
|
45
16
|
* limitations under the License.
|
|
46
17
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
18
|
+
|
|
19
|
+
/* @flow strict */
|
|
20
|
+
|
|
21
|
+
import withInfiniteScroll, {
|
|
22
|
+
type Props as WithInfiniteScrollProps,
|
|
23
|
+
} from './src/withInfiniteScroll';
|
|
24
|
+
|
|
25
|
+
export { default as DataSource, ArrayDataSource } from './src/DataSource';
|
|
26
|
+
|
|
27
|
+
export type { WithInfiniteScrollProps };
|
|
28
|
+
|
|
29
|
+
export default withInfiniteScroll;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-infinite-scroll",
|
|
3
|
+
"version": "4.1.11",
|
|
4
|
+
"description": "Backpack infinite scroll component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"gitHead": "5c156b97cb0ba5e75851d3c763334578714c895e",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"bpk-mixins": "^31.1.1",
|
|
18
|
+
"bpk-react-utils": "^5.0.0",
|
|
19
|
+
"intersection-observer": "^0.7.0",
|
|
20
|
+
"prop-types": "^15.7.2"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"bpk-component-button": "^6.2.6",
|
|
27
|
+
"bpk-component-list": "^4.0.4",
|
|
28
|
+
"bpk-component-spinner": "^5.1.11",
|
|
29
|
+
"bpk-storybook-utils": "^1.1.10"
|
|
30
|
+
}
|
|
31
|
+
}
|