@skyscanner/backpack-web 17.1.0-beta.1 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1169) hide show
  1. package/bpk-animate-height/README.md +53 -0
  2. package/bpk-animate-height/index.js +4 -10
  3. package/bpk-animate-height/src/AnimateHeight.js +92 -71
  4. package/bpk-component-accordion/README.md +122 -0
  5. package/bpk-component-accordion/index.js +30 -33
  6. package/bpk-component-accordion/src/BpkAccordion.js +45 -31
  7. package/{bpk-component-boilerplate/src/BpkBoilerplate.module.css → bpk-component-accordion/src/BpkAccordion.module.scss} +11 -6
  8. package/bpk-component-accordion/src/BpkAccordionItem.js +113 -76
  9. package/bpk-component-accordion/src/BpkAccordionItem.module.css +1 -1
  10. package/bpk-component-accordion/src/BpkAccordionItem.module.scss +76 -0
  11. package/bpk-component-accordion/src/withAccordionItemState.js +76 -52
  12. package/bpk-component-accordion/src/withSingleItemAccordionState.js +83 -48
  13. package/bpk-component-aria-live/README.md +40 -0
  14. package/bpk-component-aria-live/index.js +9 -17
  15. package/bpk-component-aria-live/src/BpkAriaLive.js +56 -33
  16. package/{bpk-component-split-input/src/BpkInputField.module.css → bpk-component-aria-live/src/BpkAriaLive.module.scss} +13 -6
  17. package/bpk-component-autosuggest/README.md +124 -0
  18. package/bpk-component-autosuggest/index.js +8 -17
  19. package/bpk-component-autosuggest/src/BpkAutosuggest.js +55 -36
  20. package/bpk-component-autosuggest/src/BpkAutosuggest.module.css +1 -1
  21. package/bpk-component-autosuggest/src/BpkAutosuggest.module.scss +156 -0
  22. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +86 -50
  23. package/bpk-component-badge/README.md +37 -0
  24. package/bpk-component-badge/index.js +9 -25
  25. package/bpk-component-badge/src/BpkBadge.js +54 -38
  26. package/bpk-component-badge/src/BpkBadge.module.css +1 -1
  27. package/bpk-component-badge/src/BpkBadge.module.scss +63 -0
  28. package/bpk-component-badge/src/themeAttributes.js +6 -8
  29. package/bpk-component-banner-alert/README.md +151 -0
  30. package/bpk-component-banner-alert/index.js +17 -45
  31. package/bpk-component-banner-alert/src/AnimateAndFade.js +148 -105
  32. package/bpk-component-banner-alert/src/BpkAnimateAndFade.module.scss +53 -0
  33. package/bpk-component-banner-alert/src/BpkBannerAlert.js +21 -15
  34. package/bpk-component-banner-alert/src/BpkBannerAlert.module.css +1 -1
  35. package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +159 -0
  36. package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +51 -33
  37. package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +57 -41
  38. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +205 -129
  39. package/bpk-component-banner-alert/src/common-types.js +42 -23
  40. package/bpk-component-banner-alert/src/themeAttributes.js +7 -8
  41. package/bpk-component-banner-alert/src/withBannerAlertState.js +160 -104
  42. package/bpk-component-barchart/README.md +187 -0
  43. package/bpk-component-barchart/data.json +20 -0
  44. package/bpk-component-barchart/index.js +21 -52
  45. package/bpk-component-barchart/src/BpkBarchart.js +304 -213
  46. package/{bpk-storybook-utils/src/BpkDarkExampleWrapper.module.css → bpk-component-barchart/src/BpkBarchart.module.scss} +9 -6
  47. package/bpk-component-barchart/src/BpkBarchartBar.js +131 -81
  48. package/bpk-component-barchart/src/BpkBarchartBar.module.css +1 -1
  49. package/bpk-component-barchart/src/BpkBarchartBar.module.scss +70 -0
  50. package/bpk-component-barchart/src/BpkBarchartBars.js +146 -116
  51. package/bpk-component-barchart/src/BpkBarchartDefs.js +42 -30
  52. package/bpk-component-barchart/src/BpkChartAxis.js +149 -93
  53. package/bpk-component-barchart/src/BpkChartAxis.module.css +1 -1
  54. package/bpk-component-barchart/src/BpkChartAxis.module.scss +37 -0
  55. package/bpk-component-barchart/src/BpkChartDataTable.js +53 -36
  56. package/bpk-component-barchart/src/BpkChartDataTable.module.scss +28 -0
  57. package/bpk-component-barchart/src/BpkChartGridLines.js +107 -65
  58. package/bpk-component-barchart/src/BpkChartGridLines.module.css +1 -1
  59. package/bpk-component-barchart/src/BpkChartGridLines.module.scss +26 -0
  60. package/bpk-component-barchart/src/BpkChartMargin.js +48 -31
  61. package/bpk-component-barchart/src/RTLtransforms.js +47 -36
  62. package/bpk-component-barchart/src/customPropTypes.js +24 -15
  63. package/bpk-component-barchart/src/orientation.js +6 -10
  64. package/bpk-component-barchart/src/themeAttributes.js +9 -8
  65. package/bpk-component-barchart/src/utils.js +14 -14
  66. package/bpk-component-blockquote/README.md +33 -0
  67. package/bpk-component-blockquote/index.js +6 -17
  68. package/bpk-component-blockquote/src/BpkBlockquote.js +24 -21
  69. package/bpk-component-blockquote/src/BpkBlockquote.module.css +1 -1
  70. package/bpk-component-blockquote/src/BpkBlockquote.module.scss +29 -0
  71. package/bpk-component-blockquote/src/themeAttributes.js +2 -8
  72. package/bpk-component-breadcrumb/README.md +56 -0
  73. package/bpk-component-breadcrumb/index.js +14 -17
  74. package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +86 -57
  75. package/bpk-component-breadcrumb/src/BpkBreadcrumb.module.scss +27 -0
  76. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +80 -55
  77. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +1 -1
  78. package/{bpk-component-boilerplate/index.js → bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.scss} +23 -10
  79. package/bpk-component-breakpoint/README.md +32 -0
  80. package/bpk-component-breakpoint/index.js +7 -17
  81. package/bpk-component-breakpoint/src/BpkBreakpoint.js +42 -39
  82. package/bpk-component-button/BpkButtonDestructive.js +20 -12
  83. package/bpk-component-button/BpkButtonFeatured.js +20 -12
  84. package/bpk-component-button/BpkButtonLink.js +20 -12
  85. package/bpk-component-button/BpkButtonLinkOnDark.js +20 -12
  86. package/bpk-component-button/BpkButtonOutline.js +20 -12
  87. package/bpk-component-button/BpkButtonPrimary.js +20 -12
  88. package/bpk-component-button/BpkButtonPrimaryOnDark.js +20 -12
  89. package/bpk-component-button/BpkButtonPrimaryOnLight.js +20 -12
  90. package/bpk-component-button/BpkButtonSecondary.js +20 -12
  91. package/bpk-component-button/BpkButtonSecondaryOnDark.js +20 -12
  92. package/bpk-component-button/README.md +138 -0
  93. package/bpk-component-button/index.js +40 -130
  94. package/bpk-component-button/src/BpkButton.js +100 -56
  95. package/bpk-component-button/src/BpkButtonBase.js +88 -60
  96. package/bpk-component-button/src/BpkButtonBase.module.css +1 -1
  97. package/bpk-component-button/src/BpkButtonBase.module.scss +50 -0
  98. package/bpk-component-button/src/BpkButtonDestructive.js +39 -36
  99. package/bpk-component-button/src/BpkButtonDestructive.module.css +1 -1
  100. package/bpk-component-button/src/BpkButtonDestructive.module.scss +24 -0
  101. package/bpk-component-button/src/BpkButtonFeatured.js +39 -36
  102. package/bpk-component-button/src/BpkButtonFeatured.module.css +1 -1
  103. package/bpk-component-button/src/BpkButtonFeatured.module.scss +23 -0
  104. package/bpk-component-button/src/BpkButtonLink.js +47 -38
  105. package/bpk-component-button/src/BpkButtonLink.module.css +1 -1
  106. package/bpk-component-button/src/BpkButtonLink.module.scss +25 -0
  107. package/bpk-component-button/src/BpkButtonLinkOnDark.js +47 -38
  108. package/bpk-component-button/src/BpkButtonLinkOnDark.module.scss +23 -0
  109. package/bpk-component-button/src/BpkButtonOutline.js +39 -36
  110. package/bpk-component-button/src/BpkButtonOutline.module.scss +23 -0
  111. package/bpk-component-button/src/BpkButtonPrimary.js +30 -19
  112. package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +39 -36
  113. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.scss +23 -0
  114. package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +39 -36
  115. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.scss +23 -0
  116. package/bpk-component-button/src/BpkButtonSecondary.js +39 -36
  117. package/bpk-component-button/src/BpkButtonSecondary.module.css +1 -1
  118. package/bpk-component-button/src/BpkButtonSecondary.module.scss +23 -0
  119. package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +39 -36
  120. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.scss +23 -0
  121. package/bpk-component-button/src/common-types.js +35 -22
  122. package/bpk-component-button/src/commonButtonTests.js +59 -72
  123. package/bpk-component-button/src/themeAttributes.js +74 -22
  124. package/bpk-component-button/themeAttributes.js +29 -53
  125. package/bpk-component-calendar/DOCS.md +23 -0
  126. package/bpk-component-calendar/README.md +394 -0
  127. package/bpk-component-calendar/index.js +41 -106
  128. package/bpk-component-calendar/src/BpkCalendar.module.scss +42 -0
  129. package/bpk-component-calendar/src/BpkCalendarContainer.js +292 -202
  130. package/bpk-component-calendar/src/BpkCalendarDate.js +136 -102
  131. package/bpk-component-calendar/src/BpkCalendarDate.module.css +1 -1
  132. package/bpk-component-calendar/src/BpkCalendarDate.module.scss +122 -0
  133. package/bpk-component-calendar/src/BpkCalendarGrid.js +150 -110
  134. package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
  135. package/bpk-component-calendar/src/BpkCalendarGrid.module.scss +65 -0
  136. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +63 -58
  137. package/bpk-component-calendar/src/BpkCalendarGridHeader.module.css +1 -1
  138. package/{bpk-storybook-utils/src/BpkStorybookUtils.js → bpk-component-calendar/src/BpkCalendarGridHeader.module.scss} +31 -19
  139. package/bpk-component-calendar/src/BpkCalendarGridTransition.js +159 -87
  140. package/bpk-component-calendar/src/BpkCalendarGridTransition.module.scss +47 -0
  141. package/bpk-component-calendar/src/BpkCalendarNav.js +139 -129
  142. package/bpk-component-calendar/src/BpkCalendarNav.module.css +1 -1
  143. package/bpk-component-calendar/src/BpkCalendarNav.module.scss +89 -0
  144. package/bpk-component-calendar/src/Week.js +283 -168
  145. package/bpk-component-calendar/src/_variables.scss +22 -0
  146. package/bpk-component-calendar/src/composeCalendar.js +125 -89
  147. package/bpk-component-calendar/src/custom-proptypes.js +41 -37
  148. package/bpk-component-calendar/src/date-utils.js +96 -175
  149. package/bpk-component-calendar/src/themeAttributes.js +13 -8
  150. package/bpk-component-calendar/src/utils.js +24 -19
  151. package/bpk-component-calendar/test-utils.js +274 -228
  152. package/bpk-component-card/README.md +61 -0
  153. package/bpk-component-card/index.js +8 -25
  154. package/bpk-component-card/src/BpkCard.js +72 -49
  155. package/bpk-component-card/src/BpkCard.module.css +1 -1
  156. package/bpk-component-card/src/BpkCard.module.scss +27 -0
  157. package/bpk-component-card/src/BpkDividedCard.js +81 -47
  158. package/bpk-component-card/src/BpkDividedCard.module.css +1 -1
  159. package/bpk-component-card/src/BpkDividedCard.module.scss +62 -0
  160. package/bpk-component-checkbox/README.md +45 -0
  161. package/bpk-component-checkbox/index.js +8 -17
  162. package/bpk-component-checkbox/src/BpkCheckbox.js +116 -66
  163. package/bpk-component-checkbox/src/BpkCheckbox.module.css +1 -1
  164. package/bpk-component-checkbox/src/BpkCheckbox.module.scss +78 -0
  165. package/bpk-component-checkbox/src/themeAttributes.js +4 -8
  166. package/bpk-component-chip/README.md +136 -0
  167. package/bpk-component-chip/index.js +21 -38
  168. package/bpk-component-chip/src/BpkDismissibleChip.js +65 -40
  169. package/bpk-component-chip/src/BpkDropdownChip.js +52 -22
  170. package/bpk-component-chip/src/BpkSelectableChip.js +98 -62
  171. package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
  172. package/bpk-component-chip/src/BpkSelectableChip.module.scss +23 -0
  173. package/bpk-component-chip/src/commonTypes.js +34 -25
  174. package/bpk-component-chip/src/themeAttributes.js +13 -8
  175. package/bpk-component-close-button/README.md +25 -0
  176. package/bpk-component-close-button/index.js +6 -10
  177. package/bpk-component-close-button/src/BpkCloseButton.js +61 -43
  178. package/bpk-component-close-button/src/BpkCloseButton.module.css +1 -1
  179. package/bpk-component-close-button/src/BpkCloseButton.module.scss +52 -0
  180. package/bpk-component-code/README.md +41 -0
  181. package/bpk-component-code/index.js +22 -19
  182. package/bpk-component-code/src/BpkCode.js +49 -33
  183. package/bpk-component-code/src/BpkCode.module.css +1 -1
  184. package/bpk-component-code/src/BpkCode.module.scss +27 -0
  185. package/bpk-component-code/src/BpkCodeBlock.js +53 -36
  186. package/bpk-component-code/src/BpkCodeBlock.module.css +1 -1
  187. package/bpk-component-code/src/BpkCodeBlock.module.scss +33 -0
  188. package/bpk-component-content-cards/README.md +38 -0
  189. package/bpk-component-content-cards/index.js +4 -10
  190. package/bpk-component-content-cards/src/BpkContentCard.js +62 -37
  191. package/bpk-component-content-cards/src/BpkContentCard.module.scss +87 -0
  192. package/bpk-component-content-cards/src/BpkContentCards.js +46 -33
  193. package/bpk-component-content-cards/src/BpkContentCards.module.css +1 -1
  194. package/bpk-component-content-cards/src/BpkContentCards.module.scss +51 -0
  195. package/bpk-component-datatable/README.md +196 -0
  196. package/bpk-component-datatable/index.js +20 -19
  197. package/bpk-component-datatable/src/BpkDataTable.js +197 -129
  198. package/bpk-component-datatable/src/BpkDataTable.module.css +1 -1
  199. package/bpk-component-datatable/src/BpkDataTable.module.scss +90 -0
  200. package/bpk-component-datatable/src/BpkDataTableColumn.js +31 -29
  201. package/bpk-component-datatable/src/BpkDataTableHeader.js +108 -60
  202. package/bpk-component-datatable/src/BpkDataTableHeader.module.scss +65 -0
  203. package/bpk-component-datatable/src/common-types.js +72 -1
  204. package/bpk-component-datatable/src/hasChildrenOfType.js +41 -25
  205. package/bpk-component-datatable/src/sort-types.js +16 -10
  206. package/bpk-component-datatable/src/utils.js +65 -93
  207. package/bpk-component-datepicker/README.md +179 -0
  208. package/bpk-component-datepicker/index.js +8 -24
  209. package/bpk-component-datepicker/src/BpkDatepicker.js +304 -211
  210. package/bpk-component-datepicker/src/BpkDatepicker.module.css +1 -1
  211. package/bpk-component-datepicker/src/BpkDatepicker.module.scss +30 -0
  212. package/bpk-component-datepicker/src/themeAttributes.js +12 -11
  213. package/bpk-component-description-list/README.md +44 -0
  214. package/bpk-component-description-list/index.js +22 -26
  215. package/bpk-component-description-list/src/BpkDescriptionDetails.js +4 -10
  216. package/bpk-component-description-list/src/BpkDescriptionList.js +4 -10
  217. package/bpk-component-description-list/src/BpkDescriptionList.module.scss +37 -0
  218. package/bpk-component-description-list/src/BpkDescriptionTerm.js +4 -10
  219. package/bpk-component-description-list/src/ComponentFactory.js +43 -30
  220. package/bpk-component-dialog/README.md +103 -0
  221. package/bpk-component-dialog/index.js +9 -17
  222. package/bpk-component-dialog/src/BpkDialog.js +87 -56
  223. package/bpk-component-dialog/src/BpkDialog.module.css +1 -1
  224. package/bpk-component-dialog/src/BpkDialog.module.scss +80 -0
  225. package/bpk-component-dialog/src/BpkDialogInner.js +79 -47
  226. package/bpk-component-dialog/src/BpkDialogInner.module.css +1 -1
  227. package/bpk-component-dialog/src/BpkDialogInner.module.scss +64 -0
  228. package/bpk-component-dialog/src/common-types.js +83 -49
  229. package/bpk-component-drawer/README.md +88 -0
  230. package/bpk-component-drawer/index.js +8 -17
  231. package/bpk-component-drawer/src/BpkDrawer.js +84 -66
  232. package/bpk-component-drawer/src/BpkDrawer.module.scss +23 -0
  233. package/bpk-component-drawer/src/BpkDrawerContent.js +142 -94
  234. package/bpk-component-drawer/src/BpkDrawerContent.module.css +1 -1
  235. package/bpk-component-drawer/src/BpkDrawerContent.module.scss +107 -0
  236. package/bpk-component-drawer/src/themeAttributes.js +6 -9
  237. package/bpk-component-fieldset/README.md +71 -0
  238. package/bpk-component-fieldset/index.js +13 -31
  239. package/bpk-component-fieldset/src/BpkFieldset.js +144 -92
  240. package/bpk-component-fieldset/src/BpkFieldset.module.css +1 -1
  241. package/bpk-component-fieldset/src/BpkFieldset.module.scss +39 -0
  242. package/bpk-component-fieldset/src/themeAttributes.js +2 -8
  243. package/bpk-component-flare/README.md +50 -0
  244. package/bpk-component-flare/index.js +8 -23
  245. package/bpk-component-flare/src/BpkContentBubble.js +78 -49
  246. package/bpk-component-flare/src/BpkFlareBar.js +60 -42
  247. package/bpk-component-flare/src/__generated__/js/corner-radius.js +5 -24
  248. package/bpk-component-flare/src/__generated__/js/pointer.js +5 -24
  249. package/bpk-component-flare/src/bpk-content-bubble.module.scss +61 -0
  250. package/bpk-component-flare/src/bpk-flare-bar.module.css +1 -1
  251. package/bpk-component-flare/src/bpk-flare-bar.module.scss +75 -0
  252. package/bpk-component-flare/src/svgs/corner-radius.svg +1 -0
  253. package/bpk-component-flare/src/svgs/pointer.svg +1 -0
  254. package/bpk-component-floating-notification/README.md +48 -0
  255. package/bpk-component-floating-notification/index.js +8 -10
  256. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +117 -78
  257. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +1 -1
  258. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.scss +83 -0
  259. package/bpk-component-form-validation/README.md +31 -0
  260. package/bpk-component-form-validation/index.js +6 -17
  261. package/bpk-component-form-validation/src/BpkFormValidation.js +77 -51
  262. package/bpk-component-form-validation/src/BpkFormValidation.module.css +1 -1
  263. package/bpk-component-form-validation/src/BpkFormValidation.module.scss +44 -0
  264. package/bpk-component-form-validation/src/themeAttributes.js +2 -8
  265. package/bpk-component-graphic-promotion/README.md +68 -0
  266. package/bpk-component-graphic-promotion/index.js +9 -17
  267. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +133 -75
  268. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.scss +270 -0
  269. package/bpk-component-grid/README.md +88 -0
  270. package/bpk-component-grid/index.js +7 -16
  271. package/bpk-component-grid/src/BpkGridColumn.js +78 -50
  272. package/bpk-component-grid/src/BpkGridColumn.module.css +1 -1
  273. package/bpk-component-grid/src/BpkGridColumn.module.scss +73 -0
  274. package/bpk-component-grid/src/BpkGridContainer.js +45 -34
  275. package/bpk-component-grid/src/BpkGridContainer.module.css +1 -1
  276. package/bpk-component-grid/src/BpkGridContainer.module.scss +33 -0
  277. package/bpk-component-grid/src/BpkGridRow.js +44 -32
  278. package/bpk-component-grid/src/BpkGridRow.module.css +1 -1
  279. package/bpk-component-grid/src/BpkGridRow.module.scss +29 -0
  280. package/bpk-component-grid-toggle/README.md +25 -0
  281. package/bpk-component-grid-toggle/index.js +4 -10
  282. package/bpk-component-grid-toggle/src/BpkGridToggle.js +75 -47
  283. package/bpk-component-grid-toggle/src/BpkGridToggle.module.css +1 -1
  284. package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +52 -0
  285. package/bpk-component-horizontal-nav/README.md +101 -0
  286. package/bpk-component-horizontal-nav/index.js +15 -30
  287. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +169 -112
  288. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +1 -1
  289. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.scss +37 -0
  290. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +120 -78
  291. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.css +1 -1
  292. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.scss +152 -0
  293. package/bpk-component-icon/README.md +77 -0
  294. package/bpk-component-icon/all.js +6 -5
  295. package/bpk-component-icon/index.js +24 -33
  296. package/bpk-component-icon/lg/accessibility.js +8 -30
  297. package/bpk-component-icon/lg/account--add.js +8 -30
  298. package/bpk-component-icon/lg/account--female.js +8 -30
  299. package/bpk-component-icon/lg/account--id-card.js +8 -30
  300. package/bpk-component-icon/lg/account--name.js +8 -30
  301. package/bpk-component-icon/lg/account--permit.js +8 -30
  302. package/bpk-component-icon/lg/account-circle.js +8 -30
  303. package/bpk-component-icon/lg/account.js +8 -30
  304. package/bpk-component-icon/lg/add-circle.js +8 -30
  305. package/bpk-component-icon/lg/adult.js +8 -30
  306. package/bpk-component-icon/lg/aircon.js +8 -30
  307. package/bpk-component-icon/lg/aircraft.js +8 -32
  308. package/bpk-component-icon/lg/airline--multiple.js +8 -30
  309. package/bpk-component-icon/lg/airline.js +8 -30
  310. package/bpk-component-icon/lg/airports.js +8 -30
  311. package/bpk-component-icon/lg/alert--active.js +8 -30
  312. package/bpk-component-icon/lg/alert--add.js +8 -30
  313. package/bpk-component-icon/lg/alert--expired.js +8 -30
  314. package/bpk-component-icon/lg/alert--remove.js +8 -30
  315. package/bpk-component-icon/lg/arrow-down.js +8 -30
  316. package/bpk-component-icon/lg/arrow-left.js +8 -30
  317. package/bpk-component-icon/lg/arrow-right.js +8 -30
  318. package/bpk-component-icon/lg/arrow-up.js +8 -30
  319. package/bpk-component-icon/lg/award.js +8 -30
  320. package/bpk-component-icon/lg/baby-carriage.js +8 -30
  321. package/bpk-component-icon/lg/baggage--add.js +8 -30
  322. package/bpk-component-icon/lg/baggage--remove.js +8 -30
  323. package/bpk-component-icon/lg/baggage-cabin-add.js +8 -30
  324. package/bpk-component-icon/lg/baggage-cabin-not-included.js +8 -30
  325. package/bpk-component-icon/lg/baggage-cabin.js +8 -30
  326. package/bpk-component-icon/lg/baggage-checked-add.js +8 -30
  327. package/bpk-component-icon/lg/baggage-checked-not-included.js +8 -30
  328. package/bpk-component-icon/lg/baggage-checked.js +8 -30
  329. package/bpk-component-icon/lg/baggage-cross.js +8 -30
  330. package/bpk-component-icon/lg/baggage-generic.js +8 -30
  331. package/bpk-component-icon/lg/baggage-tick.js +8 -30
  332. package/bpk-component-icon/lg/baggage.js +8 -30
  333. package/bpk-component-icon/lg/bar.js +8 -30
  334. package/bpk-component-icon/lg/beach.js +8 -32
  335. package/bpk-component-icon/lg/beer.js +8 -30
  336. package/bpk-component-icon/lg/breakfast-cross.js +8 -30
  337. package/bpk-component-icon/lg/breakfast-tick.js +8 -30
  338. package/bpk-component-icon/lg/bus.js +8 -30
  339. package/bpk-component-icon/lg/business.js +8 -30
  340. package/bpk-component-icon/lg/cafe.js +8 -30
  341. package/bpk-component-icon/lg/calendar.js +8 -30
  342. package/bpk-component-icon/lg/call-back.js +8 -32
  343. package/bpk-component-icon/lg/camera.js +8 -30
  344. package/bpk-component-icon/lg/camper-van.js +8 -32
  345. package/bpk-component-icon/lg/car-door.js +8 -30
  346. package/bpk-component-icon/lg/car-wash.js +8 -32
  347. package/bpk-component-icon/lg/cars-flexible.js +8 -30
  348. package/bpk-component-icon/lg/cars.js +8 -32
  349. package/bpk-component-icon/lg/center-location.js +8 -30
  350. package/bpk-component-icon/lg/chart.js +8 -30
  351. package/bpk-component-icon/lg/chauffeur.js +8 -30
  352. package/bpk-component-icon/lg/chevron-down.js +8 -30
  353. package/bpk-component-icon/lg/chevron-left.js +8 -30
  354. package/bpk-component-icon/lg/chevron-right.js +8 -30
  355. package/bpk-component-icon/lg/chevron-up.js +8 -30
  356. package/bpk-component-icon/lg/child-seat.js +8 -30
  357. package/bpk-component-icon/lg/child.js +8 -30
  358. package/bpk-component-icon/lg/city-center.js +8 -30
  359. package/bpk-component-icon/lg/city.js +8 -30
  360. package/bpk-component-icon/lg/clean-policy.js +8 -30
  361. package/bpk-component-icon/lg/clean.js +8 -34
  362. package/bpk-component-icon/lg/cleaning-medical.js +8 -30
  363. package/bpk-component-icon/lg/cloakroom.js +8 -34
  364. package/bpk-component-icon/lg/close-circle.js +8 -30
  365. package/bpk-component-icon/lg/close.js +8 -30
  366. package/bpk-component-icon/lg/collapse.js +8 -30
  367. package/bpk-component-icon/lg/content--copy.js +8 -32
  368. package/bpk-component-icon/lg/content--event.js +8 -30
  369. package/bpk-component-icon/lg/content--guides.js +8 -30
  370. package/bpk-component-icon/lg/currency.js +8 -30
  371. package/bpk-component-icon/lg/data.js +8 -32
  372. package/bpk-component-icon/lg/deals.js +8 -30
  373. package/bpk-component-icon/lg/depart.js +8 -32
  374. package/bpk-component-icon/lg/device-mid.js +8 -30
  375. package/bpk-component-icon/lg/device-wide.js +8 -30
  376. package/bpk-component-icon/lg/direct.js +8 -30
  377. package/bpk-component-icon/lg/document-csv.js +8 -30
  378. package/bpk-component-icon/lg/document-pdf.js +8 -30
  379. package/bpk-component-icon/lg/download.js +8 -32
  380. package/bpk-component-icon/lg/duration.js +8 -30
  381. package/bpk-component-icon/lg/eco-leaf.js +8 -30
  382. package/bpk-component-icon/lg/edit.js +8 -30
  383. package/bpk-component-icon/lg/education.js +8 -32
  384. package/bpk-component-icon/lg/electric.js +8 -30
  385. package/bpk-component-icon/lg/end-call.js +8 -30
  386. package/bpk-component-icon/lg/estimated.js +8 -30
  387. package/bpk-component-icon/lg/exclamation-circle.js +8 -30
  388. package/bpk-component-icon/lg/exclamation.js +8 -30
  389. package/bpk-component-icon/lg/expand.js +8 -30
  390. package/bpk-component-icon/lg/explore.js +8 -30
  391. package/bpk-component-icon/lg/face--blank.js +8 -30
  392. package/bpk-component-icon/lg/face--happy.js +8 -30
  393. package/bpk-component-icon/lg/face--sad.js +8 -30
  394. package/bpk-component-icon/lg/face-id.js +8 -30
  395. package/bpk-component-icon/lg/face-mask.js +8 -30
  396. package/bpk-component-icon/lg/family.js +8 -30
  397. package/bpk-component-icon/lg/fast-track.js +8 -32
  398. package/bpk-component-icon/lg/fast-train.js +8 -32
  399. package/bpk-component-icon/lg/filter.js +8 -31
  400. package/bpk-component-icon/lg/fingerprint.js +8 -30
  401. package/bpk-component-icon/lg/flag.js +8 -30
  402. package/bpk-component-icon/lg/flask.js +8 -30
  403. package/bpk-component-icon/lg/flight-flexible.js +8 -30
  404. package/bpk-component-icon/lg/flight-landing.js +8 -34
  405. package/bpk-component-icon/lg/flight-takeoff.js +8 -32
  406. package/bpk-component-icon/lg/flight.js +8 -32
  407. package/bpk-component-icon/lg/food.js +8 -30
  408. package/bpk-component-icon/lg/gears-automatic-circle.js +8 -30
  409. package/bpk-component-icon/lg/gears-automatic.js +8 -30
  410. package/bpk-component-icon/lg/gears-manual-circle.js +8 -30
  411. package/bpk-component-icon/lg/gears-manual.js +8 -30
  412. package/bpk-component-icon/lg/globe.js +8 -30
  413. package/bpk-component-icon/lg/grid-layout.js +8 -30
  414. package/bpk-component-icon/lg/headset.js +8 -30
  415. package/bpk-component-icon/lg/health-fitness.js +8 -30
  416. package/bpk-component-icon/lg/heart--outline.js +8 -30
  417. package/bpk-component-icon/lg/heart.js +8 -30
  418. package/bpk-component-icon/lg/help-circle.js +8 -30
  419. package/bpk-component-icon/lg/help.js +8 -30
  420. package/bpk-component-icon/lg/hide.js +8 -30
  421. package/bpk-component-icon/lg/hotel-flexible.js +8 -30
  422. package/bpk-component-icon/lg/hotels--disabled-facilities.js +8 -30
  423. package/bpk-component-icon/lg/hotels--jacuzzi.js +8 -30
  424. package/bpk-component-icon/lg/hotels--pets-allowed.js +8 -30
  425. package/bpk-component-icon/lg/hotels--smoking.js +8 -30
  426. package/bpk-component-icon/lg/hotels.js +8 -30
  427. package/bpk-component-icon/lg/infant.js +8 -30
  428. package/bpk-component-icon/lg/information--language-alert.js +8 -30
  429. package/bpk-component-icon/lg/information--language-question.js +8 -30
  430. package/bpk-component-icon/lg/information--language.js +8 -30
  431. package/bpk-component-icon/lg/information-circle.js +8 -30
  432. package/bpk-component-icon/lg/information.js +8 -30
  433. package/bpk-component-icon/lg/insurance.js +8 -30
  434. package/bpk-component-icon/lg/key.js +8 -30
  435. package/bpk-component-icon/lg/keypad.js +8 -30
  436. package/bpk-component-icon/lg/landmark.js +8 -30
  437. package/bpk-component-icon/lg/language.js +8 -30
  438. package/bpk-component-icon/lg/legroom--extra.js +8 -32
  439. package/bpk-component-icon/lg/legroom--normal.js +8 -32
  440. package/bpk-component-icon/lg/legroom--reduced.js +8 -32
  441. package/bpk-component-icon/lg/leisure.js +8 -30
  442. package/bpk-component-icon/lg/lightning.js +8 -30
  443. package/bpk-component-icon/lg/list.js +8 -30
  444. package/bpk-component-icon/lg/location.js +8 -30
  445. package/bpk-component-icon/lg/lock.js +8 -30
  446. package/bpk-component-icon/lg/logout.js +8 -32
  447. package/bpk-component-icon/lg/long-arrow-down.js +8 -30
  448. package/bpk-component-icon/lg/long-arrow-left.js +8 -30
  449. package/bpk-component-icon/lg/long-arrow-right.js +8 -30
  450. package/bpk-component-icon/lg/long-arrow-up.js +8 -30
  451. package/bpk-component-icon/lg/lounge.js +8 -32
  452. package/bpk-component-icon/lg/luggageall.js +8 -30
  453. package/bpk-component-icon/lg/mail.js +8 -32
  454. package/bpk-component-icon/lg/map.js +8 -30
  455. package/bpk-component-icon/lg/meal.js +8 -30
  456. package/bpk-component-icon/lg/media.js +8 -30
  457. package/bpk-component-icon/lg/menu--horizontal.js +8 -30
  458. package/bpk-component-icon/lg/menu--vertical.js +8 -30
  459. package/bpk-component-icon/lg/menu.js +8 -30
  460. package/bpk-component-icon/lg/mileage.js +8 -32
  461. package/bpk-component-icon/lg/minus.js +8 -30
  462. package/bpk-component-icon/lg/mobile.js +8 -30
  463. package/bpk-component-icon/lg/money.js +8 -30
  464. package/bpk-component-icon/lg/multiple-bookings.js +8 -30
  465. package/bpk-component-icon/lg/music.js +8 -30
  466. package/bpk-component-icon/lg/mute.js +8 -30
  467. package/bpk-component-icon/lg/native-android--back.js +8 -30
  468. package/bpk-component-icon/lg/native-android--close.js +8 -30
  469. package/bpk-component-icon/lg/native-android--forward.js +8 -30
  470. package/bpk-component-icon/lg/native-ios-close.js +8 -30
  471. package/bpk-component-icon/lg/navigation.js +8 -30
  472. package/bpk-component-icon/lg/new-window.js +8 -32
  473. package/bpk-component-icon/lg/news.js +8 -30
  474. package/bpk-component-icon/lg/night.js +8 -30
  475. package/bpk-component-icon/lg/not-allowed.js +8 -30
  476. package/bpk-component-icon/lg/onsen.js +8 -30
  477. package/bpk-component-icon/lg/paid.js +8 -30
  478. package/bpk-component-icon/lg/paperclip.js +8 -30
  479. package/bpk-component-icon/lg/parking.js +8 -30
  480. package/bpk-component-icon/lg/passport.js +8 -30
  481. package/bpk-component-icon/lg/pause.js +8 -30
  482. package/bpk-component-icon/lg/payment-card.js +8 -30
  483. package/bpk-component-icon/lg/petrol.js +8 -30
  484. package/bpk-component-icon/lg/phone-call.js +8 -30
  485. package/bpk-component-icon/lg/picture.js +8 -30
  486. package/bpk-component-icon/lg/pin.js +8 -30
  487. package/bpk-component-icon/lg/plane-seat.js +8 -32
  488. package/bpk-component-icon/lg/play.js +8 -30
  489. package/bpk-component-icon/lg/plus.js +8 -30
  490. package/bpk-component-icon/lg/policy.js +8 -30
  491. package/bpk-component-icon/lg/powerplug.js +8 -30
  492. package/bpk-component-icon/lg/ppe.js +8 -30
  493. package/bpk-component-icon/lg/price-alerts.js +8 -30
  494. package/bpk-component-icon/lg/price-tag.js +8 -30
  495. package/bpk-component-icon/lg/print.js +8 -30
  496. package/bpk-component-icon/lg/recent-searches.js +8 -30
  497. package/bpk-component-icon/lg/redo.js +8 -30
  498. package/bpk-component-icon/lg/refresh.js +8 -30
  499. package/bpk-component-icon/lg/return.js +8 -32
  500. package/bpk-component-icon/lg/room.js +8 -30
  501. package/bpk-component-icon/lg/scales.js +8 -32
  502. package/bpk-component-icon/lg/search.js +8 -30
  503. package/bpk-component-icon/lg/self-service.js +8 -30
  504. package/bpk-component-icon/lg/send-message.js +8 -30
  505. package/bpk-component-icon/lg/services.js +8 -30
  506. package/bpk-component-icon/lg/settings.js +8 -30
  507. package/bpk-component-icon/lg/share--android.js +8 -30
  508. package/bpk-component-icon/lg/share--ios.js +8 -32
  509. package/bpk-component-icon/lg/share.js +8 -30
  510. package/bpk-component-icon/lg/single-booking.js +8 -30
  511. package/bpk-component-icon/lg/social-distancing.js +8 -0
  512. package/bpk-component-icon/lg/social-like.js +8 -30
  513. package/bpk-component-icon/lg/sort-down.js +8 -30
  514. package/bpk-component-icon/lg/sort-up.js +8 -30
  515. package/bpk-component-icon/lg/sort.js +8 -30
  516. package/bpk-component-icon/lg/speaker.js +8 -32
  517. package/bpk-component-icon/lg/star-half.js +8 -30
  518. package/bpk-component-icon/lg/star-outline.js +8 -30
  519. package/bpk-component-icon/lg/star.js +8 -30
  520. package/bpk-component-icon/lg/stops.js +8 -30
  521. package/bpk-component-icon/lg/swap--horizontal.js +8 -30
  522. package/bpk-component-icon/lg/swap--vertical.js +8 -30
  523. package/bpk-component-icon/lg/swap.js +8 -30
  524. package/bpk-component-icon/lg/taxi.js +8 -32
  525. package/bpk-component-icon/lg/thumbs-down.js +8 -30
  526. package/bpk-component-icon/lg/thumbs-up.js +8 -30
  527. package/bpk-component-icon/lg/tick-circle.js +8 -30
  528. package/bpk-component-icon/lg/tick.js +8 -30
  529. package/bpk-component-icon/lg/ticket-flexible.js +8 -30
  530. package/bpk-component-icon/lg/ticket.js +8 -30
  531. package/bpk-component-icon/lg/time.js +8 -30
  532. package/bpk-component-icon/lg/toilets.js +8 -30
  533. package/bpk-component-icon/lg/train.js +8 -30
  534. package/bpk-component-icon/lg/transmission-automatic.js +8 -30
  535. package/bpk-component-icon/lg/transmission-manual.js +8 -30
  536. package/bpk-component-icon/lg/trash.js +8 -30
  537. package/bpk-component-icon/lg/trend--down.js +8 -30
  538. package/bpk-component-icon/lg/trend--steady.js +8 -30
  539. package/bpk-component-icon/lg/trend--will-rise.js +8 -30
  540. package/bpk-component-icon/lg/trend.js +8 -30
  541. package/bpk-component-icon/lg/trips.js +8 -30
  542. package/bpk-component-icon/lg/undo.js +8 -30
  543. package/bpk-component-icon/lg/unlock.js +8 -30
  544. package/bpk-component-icon/lg/unmute.js +8 -32
  545. package/bpk-component-icon/lg/upgrade.js +8 -30
  546. package/bpk-component-icon/lg/use-location.js +8 -30
  547. package/bpk-component-icon/lg/view.js +8 -30
  548. package/bpk-component-icon/lg/virus.js +8 -30
  549. package/bpk-component-icon/lg/wallet.js +8 -32
  550. package/bpk-component-icon/lg/weather--clear.js +8 -30
  551. package/bpk-component-icon/lg/weather--cloudy.js +8 -32
  552. package/bpk-component-icon/lg/weather--fog.js +8 -30
  553. package/bpk-component-icon/lg/weather--partly-cloudy.js +8 -32
  554. package/bpk-component-icon/lg/weather--rain.js +8 -34
  555. package/bpk-component-icon/lg/weather--snow.js +8 -30
  556. package/bpk-component-icon/lg/weather--thunderstorm.js +8 -34
  557. package/bpk-component-icon/lg/weather--tornado.js +8 -30
  558. package/bpk-component-icon/lg/weather--wind.js +8 -30
  559. package/bpk-component-icon/lg/weather.js +8 -30
  560. package/bpk-component-icon/lg/wifi.js +8 -30
  561. package/bpk-component-icon/lg/window--reduce.js +8 -32
  562. package/bpk-component-icon/lg/window.js +8 -30
  563. package/bpk-component-icon/lg/world--amer.js +8 -30
  564. package/bpk-component-icon/lg/world--apac.js +8 -30
  565. package/bpk-component-icon/lg/world--emea.js +8 -32
  566. package/bpk-component-icon/sm/accessibility.js +8 -31
  567. package/bpk-component-icon/sm/account--add.js +8 -31
  568. package/bpk-component-icon/sm/account--female.js +8 -31
  569. package/bpk-component-icon/sm/account--id-card.js +8 -31
  570. package/bpk-component-icon/sm/account--name.js +8 -31
  571. package/bpk-component-icon/sm/account--permit.js +8 -31
  572. package/bpk-component-icon/sm/account-circle.js +8 -31
  573. package/bpk-component-icon/sm/account.js +8 -31
  574. package/bpk-component-icon/sm/add-circle.js +8 -31
  575. package/bpk-component-icon/sm/adult.js +8 -31
  576. package/bpk-component-icon/sm/aircon.js +8 -31
  577. package/bpk-component-icon/sm/aircraft.js +8 -33
  578. package/bpk-component-icon/sm/airline--multiple.js +8 -31
  579. package/bpk-component-icon/sm/airline.js +8 -31
  580. package/bpk-component-icon/sm/airports.js +8 -31
  581. package/bpk-component-icon/sm/alert--active.js +8 -31
  582. package/bpk-component-icon/sm/alert--add.js +8 -31
  583. package/bpk-component-icon/sm/alert--expired.js +8 -31
  584. package/bpk-component-icon/sm/alert--remove.js +8 -31
  585. package/bpk-component-icon/sm/arrow-down.js +8 -31
  586. package/bpk-component-icon/sm/arrow-left.js +8 -31
  587. package/bpk-component-icon/sm/arrow-right.js +8 -31
  588. package/bpk-component-icon/sm/arrow-up.js +8 -31
  589. package/bpk-component-icon/sm/award.js +8 -31
  590. package/bpk-component-icon/sm/baby-carriage.js +8 -31
  591. package/bpk-component-icon/sm/baggage--add.js +8 -31
  592. package/bpk-component-icon/sm/baggage--remove.js +8 -31
  593. package/bpk-component-icon/sm/baggage-cabin-add.js +8 -31
  594. package/bpk-component-icon/sm/baggage-cabin-not-included.js +8 -33
  595. package/bpk-component-icon/sm/baggage-cabin.js +8 -31
  596. package/bpk-component-icon/sm/baggage-checked-add.js +8 -31
  597. package/bpk-component-icon/sm/baggage-checked-not-included.js +8 -33
  598. package/bpk-component-icon/sm/baggage-checked.js +8 -31
  599. package/bpk-component-icon/sm/baggage-cross.js +8 -31
  600. package/bpk-component-icon/sm/baggage-generic.js +8 -31
  601. package/bpk-component-icon/sm/baggage-tick.js +8 -31
  602. package/bpk-component-icon/sm/baggage.js +8 -31
  603. package/bpk-component-icon/sm/bar.js +8 -31
  604. package/bpk-component-icon/sm/beach.js +8 -33
  605. package/bpk-component-icon/sm/beer.js +8 -31
  606. package/bpk-component-icon/sm/breakfast-cross.js +8 -31
  607. package/bpk-component-icon/sm/breakfast-tick.js +8 -31
  608. package/bpk-component-icon/sm/bus.js +8 -33
  609. package/bpk-component-icon/sm/business.js +8 -31
  610. package/bpk-component-icon/sm/cafe.js +8 -31
  611. package/bpk-component-icon/sm/calendar.js +8 -31
  612. package/bpk-component-icon/sm/call-back.js +8 -33
  613. package/bpk-component-icon/sm/camera.js +8 -31
  614. package/bpk-component-icon/sm/camper-van.js +8 -33
  615. package/bpk-component-icon/sm/car-door.js +8 -31
  616. package/bpk-component-icon/sm/car-wash.js +8 -33
  617. package/bpk-component-icon/sm/cars-flexible.js +8 -31
  618. package/bpk-component-icon/sm/cars.js +8 -33
  619. package/bpk-component-icon/sm/center-location.js +8 -31
  620. package/bpk-component-icon/sm/chart.js +8 -31
  621. package/bpk-component-icon/sm/chauffeur.js +8 -33
  622. package/bpk-component-icon/sm/chevron-down.js +8 -31
  623. package/bpk-component-icon/sm/chevron-left.js +8 -31
  624. package/bpk-component-icon/sm/chevron-right.js +8 -31
  625. package/bpk-component-icon/sm/chevron-up.js +8 -31
  626. package/bpk-component-icon/sm/child-seat.js +8 -31
  627. package/bpk-component-icon/sm/child.js +8 -31
  628. package/bpk-component-icon/sm/city-center.js +8 -31
  629. package/bpk-component-icon/sm/city.js +8 -31
  630. package/bpk-component-icon/sm/clean-policy.js +8 -31
  631. package/bpk-component-icon/sm/clean.js +8 -33
  632. package/bpk-component-icon/sm/cleaning-medical.js +8 -31
  633. package/bpk-component-icon/sm/cloakroom.js +8 -31
  634. package/bpk-component-icon/sm/close-circle.js +8 -31
  635. package/bpk-component-icon/sm/close.js +8 -31
  636. package/bpk-component-icon/sm/collapse.js +8 -31
  637. package/bpk-component-icon/sm/content--copy.js +8 -33
  638. package/bpk-component-icon/sm/content--event.js +8 -31
  639. package/bpk-component-icon/sm/content--guides.js +8 -31
  640. package/bpk-component-icon/sm/currency.js +8 -31
  641. package/bpk-component-icon/sm/data.js +8 -33
  642. package/bpk-component-icon/sm/deals.js +8 -31
  643. package/bpk-component-icon/sm/depart.js +8 -35
  644. package/bpk-component-icon/sm/device-mid.js +8 -31
  645. package/bpk-component-icon/sm/device-wide.js +8 -31
  646. package/bpk-component-icon/sm/direct.js +8 -33
  647. package/bpk-component-icon/sm/document-csv.js +8 -31
  648. package/bpk-component-icon/sm/document-pdf.js +8 -31
  649. package/bpk-component-icon/sm/download.js +8 -33
  650. package/bpk-component-icon/sm/duration.js +8 -31
  651. package/bpk-component-icon/sm/eco-leaf.js +8 -31
  652. package/bpk-component-icon/sm/edit.js +8 -31
  653. package/bpk-component-icon/sm/education.js +8 -33
  654. package/bpk-component-icon/sm/electric.js +8 -31
  655. package/bpk-component-icon/sm/end-call.js +8 -31
  656. package/bpk-component-icon/sm/estimated.js +8 -31
  657. package/bpk-component-icon/sm/exclamation-circle.js +8 -31
  658. package/bpk-component-icon/sm/exclamation.js +8 -31
  659. package/bpk-component-icon/sm/expand.js +8 -31
  660. package/bpk-component-icon/sm/explore.js +8 -31
  661. package/bpk-component-icon/sm/face--blank.js +8 -31
  662. package/bpk-component-icon/sm/face--happy.js +8 -31
  663. package/bpk-component-icon/sm/face--sad.js +8 -31
  664. package/bpk-component-icon/sm/face-id.js +8 -31
  665. package/bpk-component-icon/sm/face-mask.js +8 -31
  666. package/bpk-component-icon/sm/family.js +8 -31
  667. package/bpk-component-icon/sm/fast-track.js +8 -33
  668. package/bpk-component-icon/sm/fast-train.js +8 -33
  669. package/bpk-component-icon/sm/filter.js +8 -32
  670. package/bpk-component-icon/sm/fingerprint.js +8 -31
  671. package/bpk-component-icon/sm/flag.js +8 -31
  672. package/bpk-component-icon/sm/flask.js +8 -31
  673. package/bpk-component-icon/sm/flight-flexible.js +8 -31
  674. package/bpk-component-icon/sm/flight-landing.js +8 -35
  675. package/bpk-component-icon/sm/flight-takeoff.js +8 -33
  676. package/bpk-component-icon/sm/flight.js +8 -33
  677. package/bpk-component-icon/sm/food.js +8 -31
  678. package/bpk-component-icon/sm/gears-automatic-circle.js +8 -31
  679. package/bpk-component-icon/sm/gears-automatic.js +8 -31
  680. package/bpk-component-icon/sm/gears-manual-circle.js +8 -31
  681. package/bpk-component-icon/sm/gears-manual.js +8 -31
  682. package/bpk-component-icon/sm/globe.js +8 -31
  683. package/bpk-component-icon/sm/grid-layout.js +8 -31
  684. package/bpk-component-icon/sm/headset.js +8 -31
  685. package/bpk-component-icon/sm/health-fitness.js +8 -31
  686. package/bpk-component-icon/sm/heart--outline.js +8 -31
  687. package/bpk-component-icon/sm/heart.js +8 -31
  688. package/bpk-component-icon/sm/help-circle.js +8 -31
  689. package/bpk-component-icon/sm/help.js +8 -31
  690. package/bpk-component-icon/sm/hide.js +8 -31
  691. package/bpk-component-icon/sm/hotel-flexible.js +8 -31
  692. package/bpk-component-icon/sm/hotels--disabled-facilities.js +8 -31
  693. package/bpk-component-icon/sm/hotels--jacuzzi.js +8 -33
  694. package/bpk-component-icon/sm/hotels--pets-allowed.js +8 -31
  695. package/bpk-component-icon/sm/hotels--smoking.js +8 -31
  696. package/bpk-component-icon/sm/hotels.js +8 -31
  697. package/bpk-component-icon/sm/infant.js +8 -33
  698. package/bpk-component-icon/sm/information--language-alert.js +8 -31
  699. package/bpk-component-icon/sm/information--language-question.js +8 -31
  700. package/bpk-component-icon/sm/information--language.js +8 -31
  701. package/bpk-component-icon/sm/information-circle.js +8 -31
  702. package/bpk-component-icon/sm/information.js +8 -31
  703. package/bpk-component-icon/sm/insurance.js +8 -31
  704. package/bpk-component-icon/sm/key.js +8 -31
  705. package/bpk-component-icon/sm/keypad.js +8 -31
  706. package/bpk-component-icon/sm/landmark.js +8 -31
  707. package/bpk-component-icon/sm/language.js +8 -31
  708. package/bpk-component-icon/sm/legroom--extra.js +8 -33
  709. package/bpk-component-icon/sm/legroom--normal.js +8 -33
  710. package/bpk-component-icon/sm/legroom--reduced.js +8 -33
  711. package/bpk-component-icon/sm/leisure.js +8 -31
  712. package/bpk-component-icon/sm/lightning.js +8 -31
  713. package/bpk-component-icon/sm/list.js +8 -31
  714. package/bpk-component-icon/sm/location.js +8 -31
  715. package/bpk-component-icon/sm/lock.js +8 -31
  716. package/bpk-component-icon/sm/logout.js +8 -33
  717. package/bpk-component-icon/sm/long-arrow-down.js +8 -32
  718. package/bpk-component-icon/sm/long-arrow-left.js +8 -32
  719. package/bpk-component-icon/sm/long-arrow-right.js +8 -32
  720. package/bpk-component-icon/sm/long-arrow-up.js +8 -32
  721. package/bpk-component-icon/sm/lounge.js +8 -31
  722. package/bpk-component-icon/sm/luggageall.js +8 -31
  723. package/bpk-component-icon/sm/mail.js +8 -33
  724. package/bpk-component-icon/sm/map.js +8 -31
  725. package/bpk-component-icon/sm/meal.js +8 -31
  726. package/bpk-component-icon/sm/media.js +8 -31
  727. package/bpk-component-icon/sm/menu--horizontal.js +8 -31
  728. package/bpk-component-icon/sm/menu--vertical.js +8 -31
  729. package/bpk-component-icon/sm/menu.js +8 -31
  730. package/bpk-component-icon/sm/mileage.js +8 -33
  731. package/bpk-component-icon/sm/minus.js +8 -31
  732. package/bpk-component-icon/sm/mobile.js +8 -31
  733. package/bpk-component-icon/sm/money.js +8 -31
  734. package/bpk-component-icon/sm/multiple-bookings.js +8 -31
  735. package/bpk-component-icon/sm/music.js +8 -31
  736. package/bpk-component-icon/sm/mute.js +8 -31
  737. package/bpk-component-icon/sm/native-android--back.js +8 -31
  738. package/bpk-component-icon/sm/native-android--close.js +8 -31
  739. package/bpk-component-icon/sm/native-android--forward.js +8 -31
  740. package/bpk-component-icon/sm/native-ios-close.js +8 -31
  741. package/bpk-component-icon/sm/navigation.js +8 -31
  742. package/bpk-component-icon/sm/new-window.js +8 -37
  743. package/bpk-component-icon/sm/news.js +8 -31
  744. package/bpk-component-icon/sm/night.js +8 -31
  745. package/bpk-component-icon/sm/not-allowed.js +8 -31
  746. package/bpk-component-icon/sm/onsen.js +8 -33
  747. package/bpk-component-icon/sm/paid.js +8 -31
  748. package/bpk-component-icon/sm/paperclip.js +8 -31
  749. package/bpk-component-icon/sm/parking.js +8 -31
  750. package/bpk-component-icon/sm/passport.js +8 -31
  751. package/bpk-component-icon/sm/pause.js +8 -31
  752. package/bpk-component-icon/sm/payment-card.js +8 -31
  753. package/bpk-component-icon/sm/petrol.js +8 -31
  754. package/bpk-component-icon/sm/phone-call.js +8 -31
  755. package/bpk-component-icon/sm/picture.js +8 -31
  756. package/bpk-component-icon/sm/pin.js +8 -31
  757. package/bpk-component-icon/sm/plane-seat.js +8 -33
  758. package/bpk-component-icon/sm/play.js +8 -31
  759. package/bpk-component-icon/sm/plus.js +8 -31
  760. package/bpk-component-icon/sm/policy.js +8 -31
  761. package/bpk-component-icon/sm/powerplug.js +8 -31
  762. package/bpk-component-icon/sm/ppe.js +8 -31
  763. package/bpk-component-icon/sm/price-alerts.js +8 -31
  764. package/bpk-component-icon/sm/price-tag.js +8 -31
  765. package/bpk-component-icon/sm/print.js +8 -31
  766. package/bpk-component-icon/sm/recent-searches.js +8 -31
  767. package/bpk-component-icon/sm/redo.js +8 -31
  768. package/bpk-component-icon/sm/refresh.js +8 -31
  769. package/bpk-component-icon/sm/return.js +8 -35
  770. package/bpk-component-icon/sm/room.js +8 -31
  771. package/bpk-component-icon/sm/scales.js +8 -31
  772. package/bpk-component-icon/sm/search.js +8 -31
  773. package/bpk-component-icon/sm/self-service.js +8 -31
  774. package/bpk-component-icon/sm/send-message.js +8 -31
  775. package/bpk-component-icon/sm/services.js +8 -31
  776. package/bpk-component-icon/sm/settings.js +8 -31
  777. package/bpk-component-icon/sm/share--android.js +8 -31
  778. package/bpk-component-icon/sm/share--ios.js +8 -35
  779. package/bpk-component-icon/sm/share.js +8 -31
  780. package/bpk-component-icon/sm/single-booking.js +8 -31
  781. package/bpk-component-icon/sm/social-distancing.js +8 -0
  782. package/bpk-component-icon/sm/social-like.js +8 -31
  783. package/bpk-component-icon/sm/sort-down.js +8 -31
  784. package/bpk-component-icon/sm/sort-up.js +8 -31
  785. package/bpk-component-icon/sm/sort.js +8 -31
  786. package/bpk-component-icon/sm/speaker.js +8 -31
  787. package/bpk-component-icon/sm/star-half.js +8 -31
  788. package/bpk-component-icon/sm/star-outline.js +8 -31
  789. package/bpk-component-icon/sm/star.js +8 -31
  790. package/bpk-component-icon/sm/stops.js +8 -31
  791. package/bpk-component-icon/sm/swap--horizontal.js +8 -32
  792. package/bpk-component-icon/sm/swap--vertical.js +8 -31
  793. package/bpk-component-icon/sm/swap.js +8 -32
  794. package/bpk-component-icon/sm/taxi.js +8 -33
  795. package/bpk-component-icon/sm/thumbs-down.js +8 -31
  796. package/bpk-component-icon/sm/thumbs-up.js +8 -31
  797. package/bpk-component-icon/sm/tick-circle.js +8 -31
  798. package/bpk-component-icon/sm/tick.js +8 -31
  799. package/bpk-component-icon/sm/ticket-flexible.js +8 -31
  800. package/bpk-component-icon/sm/ticket.js +8 -31
  801. package/bpk-component-icon/sm/time.js +8 -31
  802. package/bpk-component-icon/sm/toilets.js +8 -31
  803. package/bpk-component-icon/sm/train.js +8 -31
  804. package/bpk-component-icon/sm/transmission-automatic.js +8 -31
  805. package/bpk-component-icon/sm/transmission-manual.js +8 -31
  806. package/bpk-component-icon/sm/trash.js +8 -31
  807. package/bpk-component-icon/sm/trend--down.js +8 -31
  808. package/bpk-component-icon/sm/trend--steady.js +8 -32
  809. package/bpk-component-icon/sm/trend--will-rise.js +8 -31
  810. package/bpk-component-icon/sm/trend.js +8 -31
  811. package/bpk-component-icon/sm/trips.js +8 -31
  812. package/bpk-component-icon/sm/undo.js +8 -31
  813. package/bpk-component-icon/sm/unlock.js +8 -31
  814. package/bpk-component-icon/sm/unmute.js +8 -33
  815. package/bpk-component-icon/sm/upgrade.js +8 -31
  816. package/bpk-component-icon/sm/use-location.js +8 -31
  817. package/bpk-component-icon/sm/view.js +8 -31
  818. package/bpk-component-icon/sm/virus.js +8 -31
  819. package/bpk-component-icon/sm/wallet.js +8 -31
  820. package/bpk-component-icon/sm/weather--clear.js +8 -31
  821. package/bpk-component-icon/sm/weather--cloudy.js +8 -33
  822. package/bpk-component-icon/sm/weather--fog.js +8 -31
  823. package/bpk-component-icon/sm/weather--partly-cloudy.js +8 -31
  824. package/bpk-component-icon/sm/weather--rain.js +8 -33
  825. package/bpk-component-icon/sm/weather--snow.js +8 -31
  826. package/bpk-component-icon/sm/weather--thunderstorm.js +8 -35
  827. package/bpk-component-icon/sm/weather--tornado.js +8 -31
  828. package/bpk-component-icon/sm/weather--wind.js +8 -33
  829. package/bpk-component-icon/sm/weather.js +8 -31
  830. package/bpk-component-icon/sm/wifi.js +8 -31
  831. package/bpk-component-icon/sm/window--reduce.js +8 -33
  832. package/bpk-component-icon/sm/window.js +8 -31
  833. package/bpk-component-icon/sm/world--amer.js +8 -31
  834. package/bpk-component-icon/sm/world--apac.js +8 -31
  835. package/bpk-component-icon/sm/world--emea.js +8 -31
  836. package/bpk-component-icon/src/BpkIcon.module.css +1 -1
  837. package/bpk-component-icon/src/BpkIcon.module.scss +33 -0
  838. package/bpk-component-icon/src/classNameModifierHOCFactory.js +53 -38
  839. package/bpk-component-icon/src/withAlignment.js +26 -22
  840. package/bpk-component-icon/src/withDescription.js +26 -17
  841. package/bpk-component-icon/src/withDescription.module.scss +22 -0
  842. package/bpk-component-icon/src/withRtlSupport.js +10 -13
  843. package/bpk-component-image/README.md +140 -0
  844. package/bpk-component-image/index.js +20 -38
  845. package/bpk-component-image/src/BpkBackgroundImage.js +171 -115
  846. package/bpk-component-image/src/BpkBackgroundImage.module.css +1 -1
  847. package/bpk-component-image/src/BpkBackgroundImage.module.scss +46 -0
  848. package/bpk-component-image/src/BpkImage.js +220 -152
  849. package/bpk-component-image/src/BpkImage.module.css +1 -1
  850. package/bpk-component-image/src/BpkImage.module.scss +89 -0
  851. package/bpk-component-image/src/BpkImageBorderRadiusStyles.js +7 -12
  852. package/bpk-component-image/src/customPropTypes.js +15 -10
  853. package/bpk-component-image/src/withLazyLoading.js +165 -110
  854. package/bpk-component-image/src/withLoadingBehavior.js +57 -27
  855. package/bpk-component-infinite-scroll/README.md +185 -0
  856. package/bpk-component-infinite-scroll/index.js +12 -25
  857. package/bpk-component-infinite-scroll/src/DataSource.js +31 -30
  858. package/bpk-component-infinite-scroll/src/intersection-observer.js +1 -3
  859. package/bpk-component-infinite-scroll/src/withInfiniteScroll-test.flow.js +102 -0
  860. package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +228 -157
  861. package/bpk-component-infinite-scroll/src/withInfiniteScroll.module.scss +25 -0
  862. package/bpk-component-input/README.md +119 -0
  863. package/bpk-component-input/index.js +43 -50
  864. package/bpk-component-input/src/BpkClearButton.js +63 -44
  865. package/bpk-component-input/src/BpkClearButton.module.css +1 -1
  866. package/bpk-component-input/src/BpkClearButton.module.scss +40 -0
  867. package/bpk-component-input/src/BpkInput.js +126 -90
  868. package/bpk-component-input/src/BpkInput.module.css +1 -1
  869. package/bpk-component-input/src/BpkInput.module.scss +86 -0
  870. package/bpk-component-input/src/common-types.js +79 -40
  871. package/bpk-component-input/src/themeAttributes.js +2 -8
  872. package/bpk-component-input/src/withOpenEvents.js +131 -87
  873. package/bpk-component-label/README.md +28 -0
  874. package/bpk-component-label/index.js +7 -10
  875. package/bpk-component-label/src/BpkLabel.js +67 -42
  876. package/bpk-component-label/src/BpkLabel.module.css +1 -1
  877. package/bpk-component-label/src/BpkLabel.module.scss +47 -0
  878. package/bpk-component-link/README.md +66 -0
  879. package/bpk-component-link/index.js +11 -32
  880. package/bpk-component-link/src/BpkButtonLink.js +60 -45
  881. package/bpk-component-link/src/BpkLink.js +84 -60
  882. package/bpk-component-link/src/BpkLink.module.css +1 -1
  883. package/bpk-component-link/src/BpkLink.module.scss +31 -0
  884. package/bpk-component-link/src/themeAttributes.js +18 -10
  885. package/bpk-component-list/README.md +49 -0
  886. package/bpk-component-list/index.js +23 -19
  887. package/bpk-component-list/src/BpkList.js +50 -35
  888. package/bpk-component-list/src/BpkList.module.css +1 -1
  889. package/bpk-component-list/src/BpkList.module.scss +37 -0
  890. package/bpk-component-list/src/BpkListItem.js +33 -25
  891. package/bpk-component-loading-button/README.md +46 -0
  892. package/bpk-component-loading-button/index.js +7 -17
  893. package/bpk-component-loading-button/src/BpkLoadingButton.js +150 -88
  894. package/bpk-component-loading-button/src/BpkLoadingButton.module.scss +67 -0
  895. package/bpk-component-map/README.md +211 -0
  896. package/bpk-component-map/index.js +28 -59
  897. package/bpk-component-map/src/BpkBasicMapMarker.js +48 -31
  898. package/bpk-component-map/src/BpkIconMarker.js +93 -55
  899. package/bpk-component-map/src/BpkIconMarker.module.css +1 -1
  900. package/bpk-component-map/src/BpkIconMarker.module.scss +79 -0
  901. package/bpk-component-map/src/BpkIconMarkerBackground.js +68 -46
  902. package/bpk-component-map/src/BpkIconMarkerBackground.module.css +1 -1
  903. package/bpk-component-map/src/BpkIconMarkerBackground.module.scss +53 -0
  904. package/bpk-component-map/src/BpkMap.js +145 -89
  905. package/bpk-component-map/src/{BpkMap.module.css → BpkMap.module.scss} +9 -6
  906. package/bpk-component-map/src/BpkOverlayView.js +43 -32
  907. package/bpk-component-map/src/BpkPriceMarker.js +107 -61
  908. package/bpk-component-map/src/BpkPriceMarker.module.css +1 -1
  909. package/bpk-component-map/src/BpkPriceMarker.module.scss +148 -0
  910. package/bpk-component-map/src/DefaultLoadingElement.js +19 -19
  911. package/bpk-component-map/src/DefaultLoadingElement.module.css +1 -1
  912. package/bpk-component-map/src/DefaultLoadingElement.module.scss +28 -0
  913. package/bpk-component-map/src/common-types.js +14 -12
  914. package/bpk-component-map/src/themeAttributes.js +18 -13
  915. package/bpk-component-map/src/withGoogleMapsScript.js +61 -38
  916. package/bpk-component-mobile-scroll-container/README.md +72 -0
  917. package/bpk-component-mobile-scroll-container/index.js +6 -10
  918. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +187 -120
  919. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.scss +52 -0
  920. package/bpk-component-modal/README.md +112 -0
  921. package/bpk-component-modal/index.js +10 -31
  922. package/bpk-component-modal/src/BpkModal.js +111 -73
  923. package/bpk-component-modal/src/BpkModal.module.css +1 -1
  924. package/bpk-component-modal/src/BpkModal.module.scss +46 -0
  925. package/bpk-component-modal/src/BpkModalInner.js +143 -82
  926. package/bpk-component-modal/src/BpkModalInner.module.css +1 -1
  927. package/bpk-component-modal/src/BpkModalInner.module.scss +125 -0
  928. package/bpk-component-modal/src/customPropTypes.js +29 -13
  929. package/bpk-component-modal/src/themeAttributes.js +6 -9
  930. package/bpk-component-navigation-bar/README.md +112 -0
  931. package/bpk-component-navigation-bar/index.js +25 -31
  932. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +88 -54
  933. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.css +1 -1
  934. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.scss +77 -0
  935. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +57 -36
  936. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.scss +51 -0
  937. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +54 -38
  938. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.scss +43 -0
  939. package/bpk-component-navigation-bar/src/themeAttributes.js +16 -8
  940. package/bpk-component-nudger/README.md +168 -0
  941. package/bpk-component-nudger/index.js +9 -24
  942. package/bpk-component-nudger/src/BpkConfigurableNudger.js +142 -93
  943. package/bpk-component-nudger/src/BpkNudger.js +65 -43
  944. package/bpk-component-nudger/src/BpkNudger.module.css +1 -1
  945. package/bpk-component-nudger/src/BpkNudger.module.scss +50 -0
  946. package/bpk-component-nudger/src/common-types.js +26 -19
  947. package/bpk-component-nudger/src/themeAttributes.js +6 -9
  948. package/bpk-component-overlay/README.md +51 -0
  949. package/bpk-component-overlay/index.js +12 -29
  950. package/bpk-component-overlay/src/BpkOverlay.js +80 -49
  951. package/bpk-component-overlay/src/BpkOverlay.module.css +1 -1
  952. package/bpk-component-overlay/src/BpkOverlay.module.scss +163 -0
  953. package/bpk-component-page-indicator/README.md +42 -0
  954. package/bpk-component-page-indicator/index.js +11 -24
  955. package/bpk-component-page-indicator/src/BpkPageIndicator.js +111 -69
  956. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +1 -1
  957. package/bpk-component-page-indicator/src/BpkPageIndicator.module.scss +91 -0
  958. package/bpk-component-page-indicator/src/NavButton.js +60 -47
  959. package/bpk-component-pagination/README.md +57 -0
  960. package/bpk-component-pagination/index.js +6 -17
  961. package/bpk-component-pagination/src/BpkPagination.js +82 -61
  962. package/bpk-component-pagination/src/BpkPagination.module.scss +22 -0
  963. package/bpk-component-pagination/src/BpkPaginationBreak.js +12 -18
  964. package/bpk-component-pagination/src/BpkPaginationList.js +71 -53
  965. package/bpk-component-pagination/src/BpkPaginationList.module.css +1 -1
  966. package/bpk-component-pagination/src/BpkPaginationList.module.scss +46 -0
  967. package/bpk-component-pagination/src/BpkPaginationNudger.js +51 -46
  968. package/bpk-component-pagination/src/BpkPaginationNudger.module.css +1 -1
  969. package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +34 -0
  970. package/bpk-component-pagination/src/BpkPaginationPage.js +35 -35
  971. package/bpk-component-pagination/src/BpkPaginationPage.module.css +1 -1
  972. package/bpk-component-pagination/src/BpkPaginationPage.module.scss +59 -0
  973. package/bpk-component-pagination/src/themeAttributes.js +9 -9
  974. package/bpk-component-panel/README.md +31 -0
  975. package/bpk-component-panel/index.js +4 -10
  976. package/bpk-component-panel/src/BpkPanel.js +45 -34
  977. package/bpk-component-panel/src/BpkPanel.module.css +1 -1
  978. package/bpk-component-panel/src/BpkPanel.module.scss +31 -0
  979. package/bpk-component-phone-input/README.md +98 -0
  980. package/bpk-component-phone-input/index.js +9 -10
  981. package/bpk-component-phone-input/src/BpkPhoneInput.js +185 -116
  982. package/bpk-component-phone-input/src/BpkPhoneInput.module.css +1 -1
  983. package/bpk-component-phone-input/src/BpkPhoneInput.module.scss +42 -0
  984. package/bpk-component-popover/README.md +138 -0
  985. package/bpk-component-popover/index.js +17 -31
  986. package/bpk-component-popover/src/BpkPopover.js +159 -101
  987. package/bpk-component-popover/src/BpkPopover.module.css +1 -1
  988. package/bpk-component-popover/src/BpkPopover.module.scss +127 -0
  989. package/bpk-component-popover/src/BpkPopoverPortal.js +185 -124
  990. package/bpk-component-popover/src/constants.js +7 -12
  991. package/bpk-component-popover/src/keyboardFocusScope.js +21 -19
  992. package/bpk-component-popover/src/themeAttributes.js +6 -9
  993. package/bpk-component-price/README.md +35 -0
  994. package/bpk-component-price/index.js +7 -23
  995. package/bpk-component-price/src/BpkPrice.js +102 -60
  996. package/bpk-component-price/src/BpkPrice.module.scss +61 -0
  997. package/bpk-component-price/src/common-types.js +9 -12
  998. package/bpk-component-progress/README.md +53 -0
  999. package/bpk-component-progress/index.js +8 -17
  1000. package/bpk-component-progress/src/BpkProgress.js +136 -102
  1001. package/bpk-component-progress/src/BpkProgress.module.css +1 -1
  1002. package/bpk-component-progress/src/BpkProgress.module.scss +64 -0
  1003. package/bpk-component-progress/src/themeAttributes.js +4 -8
  1004. package/bpk-component-radio/README.md +41 -0
  1005. package/bpk-component-radio/index.js +8 -17
  1006. package/bpk-component-radio/src/BpkRadio.js +83 -51
  1007. package/bpk-component-radio/src/BpkRadio.module.css +1 -1
  1008. package/bpk-component-radio/src/BpkRadio.module.scss +85 -0
  1009. package/bpk-component-radio/src/themeAttributes.js +4 -8
  1010. package/bpk-component-rating/README.md +78 -0
  1011. package/bpk-component-rating/index.js +7 -23
  1012. package/bpk-component-rating/src/BpkRating.js +152 -93
  1013. package/bpk-component-rating/src/BpkRating.module.css +1 -1
  1014. package/bpk-component-rating/src/BpkRating.module.scss +86 -0
  1015. package/bpk-component-rating/src/common-types.js +8 -14
  1016. package/bpk-component-rtl-toggle/README.md +24 -0
  1017. package/bpk-component-rtl-toggle/index.js +6 -17
  1018. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +73 -46
  1019. package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +51 -28
  1020. package/bpk-component-rtl-toggle/src/utils.js +7 -11
  1021. package/bpk-component-scrollable-calendar/README.md +100 -0
  1022. package/bpk-component-scrollable-calendar/index.js +17 -38
  1023. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.js +19 -12
  1024. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +37 -32
  1025. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +53 -43
  1026. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.module.scss +31 -0
  1027. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +166 -121
  1028. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.scss +36 -0
  1029. package/bpk-component-scrollable-calendar/src/utils.js +19 -13
  1030. package/bpk-component-scrollable-calendar/test-utils.js +246 -200
  1031. package/bpk-component-section-list/README.md +50 -0
  1032. package/bpk-component-section-list/index.js +9 -24
  1033. package/bpk-component-section-list/src/BpkSectionList.js +34 -20
  1034. package/bpk-component-section-list/src/BpkSectionListItem.js +89 -56
  1035. package/bpk-component-section-list/src/BpkSectionListItem.module.css +1 -1
  1036. package/bpk-component-section-list/src/BpkSectionListItem.module.scss +54 -0
  1037. package/bpk-component-section-list/src/BpkSectionListSection.js +59 -36
  1038. package/bpk-component-section-list/src/BpkSectionListSection.module.css +1 -1
  1039. package/bpk-component-section-list/src/BpkSectionListSection.module.scss +35 -0
  1040. package/bpk-component-select/README.md +45 -0
  1041. package/bpk-component-select/index.js +9 -17
  1042. package/bpk-component-select/src/BpkSelect.js +110 -58
  1043. package/bpk-component-select/src/BpkSelect.module.css +1 -1
  1044. package/bpk-component-select/src/BpkSelect.module.scss +126 -0
  1045. package/bpk-component-select/src/themeAttributes.js +2 -8
  1046. package/bpk-component-skip-link/README.md +28 -0
  1047. package/bpk-component-skip-link/index.js +8 -17
  1048. package/bpk-component-skip-link/src/BpkSkipLink.js +52 -34
  1049. package/bpk-component-skip-link/src/BpkSkipLink.module.css +1 -1
  1050. package/bpk-component-skip-link/src/BpkSkipLink.module.scss +50 -0
  1051. package/bpk-component-skip-link/src/themeAttributes.js +2 -8
  1052. package/bpk-component-slider/README.md +41 -0
  1053. package/bpk-component-slider/index.js +6 -17
  1054. package/bpk-component-slider/src/BpkSlider.js +52 -37
  1055. package/bpk-component-slider/src/BpkSlider.module.css +1 -1
  1056. package/bpk-component-slider/src/BpkSlider.module.scss +102 -0
  1057. package/bpk-component-slider/src/themeAttributes.js +2 -8
  1058. package/bpk-component-spinner/README.md +38 -0
  1059. package/bpk-component-spinner/changelog.yml +55 -0
  1060. package/bpk-component-spinner/index.js +32 -40
  1061. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +51 -87
  1062. package/bpk-component-spinner/src/BpkLargeSpinner.js +55 -89
  1063. package/bpk-component-spinner/src/BpkSpinner.js +54 -133
  1064. package/bpk-component-spinner/src/BpkSpinner.module.css +1 -1
  1065. package/bpk-component-spinner/src/BpkSpinner.module.scss +58 -0
  1066. package/bpk-component-spinner/src/spinnerTypes.js +5 -9
  1067. package/bpk-component-spinner/src/themeAttributes.js +4 -8
  1068. package/bpk-component-split-input/README.md +40 -0
  1069. package/bpk-component-split-input/index.js +10 -17
  1070. package/bpk-component-split-input/src/BpkInputField.js +57 -52
  1071. package/bpk-component-split-input/src/BpkInputField.module.scss +34 -0
  1072. package/bpk-component-split-input/src/BpkSplitInput.js +222 -208
  1073. package/bpk-component-split-input/src/BpkSplitInput.module.css +1 -1
  1074. package/bpk-component-split-input/src/BpkSplitInput.module.scss +36 -0
  1075. package/bpk-component-star-rating/README.md +97 -0
  1076. package/bpk-component-star-rating/index.js +21 -65
  1077. package/bpk-component-star-rating/src/BpkInteractiveStar.js +78 -51
  1078. package/bpk-component-star-rating/src/BpkInteractiveStar.module.css +1 -1
  1079. package/bpk-component-star-rating/src/BpkInteractiveStar.module.scss +66 -0
  1080. package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +101 -63
  1081. package/bpk-component-star-rating/src/BpkStar.js +96 -67
  1082. package/bpk-component-star-rating/src/BpkStar.module.css +1 -1
  1083. package/bpk-component-star-rating/src/BpkStar.module.scss +63 -0
  1084. package/bpk-component-star-rating/src/BpkStarRating.js +103 -58
  1085. package/bpk-component-star-rating/src/BpkStarRating.module.scss +21 -0
  1086. package/bpk-component-star-rating/src/themeAttributes.js +4 -8
  1087. package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +89 -58
  1088. package/bpk-component-switch/README.md +35 -0
  1089. package/bpk-component-switch/index.js +11 -25
  1090. package/bpk-component-switch/src/BpkSwitch.js +75 -48
  1091. package/bpk-component-switch/src/BpkSwitch.module.css +1 -1
  1092. package/bpk-component-switch/src/BpkSwitch.module.scss +99 -0
  1093. package/bpk-component-switch/src/themeAttributes.js +2 -8
  1094. package/bpk-component-table/README.md +64 -0
  1095. package/bpk-component-table/index.js +34 -47
  1096. package/bpk-component-table/src/BpkTable.js +58 -34
  1097. package/bpk-component-table/src/BpkTable.module.css +1 -1
  1098. package/bpk-component-table/src/BpkTable.module.scss +39 -0
  1099. package/bpk-component-table/src/BpkTableBody.js +14 -13
  1100. package/bpk-component-table/src/BpkTableCell.js +48 -30
  1101. package/bpk-component-table/src/BpkTableHead.js +14 -13
  1102. package/bpk-component-table/src/BpkTableHeadCell.js +52 -32
  1103. package/bpk-component-table/src/BpkTableRow.js +14 -13
  1104. package/bpk-component-text/README.md +74 -0
  1105. package/bpk-component-text/index.js +7 -23
  1106. package/bpk-component-text/src/BpkText.js +97 -45
  1107. package/bpk-component-text/src/BpkText.module.css +1 -1
  1108. package/bpk-component-text/src/BpkText.module.scss +139 -0
  1109. package/bpk-component-textarea/README.md +32 -0
  1110. package/bpk-component-textarea/index.js +8 -17
  1111. package/bpk-component-textarea/src/BpkTextarea.js +62 -37
  1112. package/bpk-component-textarea/src/BpkTextarea.module.css +1 -1
  1113. package/bpk-component-textarea/src/BpkTextarea.module.scss +33 -0
  1114. package/bpk-component-textarea/src/themeAttributes.js +4 -8
  1115. package/bpk-component-theme-toggle/README.md +28 -0
  1116. package/bpk-component-theme-toggle/index.js +6 -17
  1117. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +96 -77
  1118. package/bpk-component-theme-toggle/src/BpkThemeToggle.module.scss +25 -0
  1119. package/bpk-component-theme-toggle/src/theming.js +98 -55
  1120. package/bpk-component-theme-toggle/src/updateOnThemeChange.js +58 -38
  1121. package/bpk-component-theme-toggle/src/utils.js +5 -9
  1122. package/bpk-component-ticket/README.md +35 -0
  1123. package/bpk-component-ticket/index.js +6 -10
  1124. package/bpk-component-ticket/src/BpkTicket.js +128 -69
  1125. package/bpk-component-ticket/src/BpkTicket.module.css +1 -1
  1126. package/bpk-component-ticket/src/BpkTicket.module.scss +144 -0
  1127. package/bpk-component-tooltip/README.md +65 -0
  1128. package/bpk-component-tooltip/index.js +10 -17
  1129. package/bpk-component-tooltip/src/BpkTooltip.js +98 -64
  1130. package/bpk-component-tooltip/src/BpkTooltip.module.css +1 -1
  1131. package/bpk-component-tooltip/src/BpkTooltip.module.scss +149 -0
  1132. package/bpk-component-tooltip/src/BpkTooltipPortal.js +190 -120
  1133. package/bpk-component-tooltip/src/constants.js +9 -16
  1134. package/bpk-react-utils/README.md +249 -0
  1135. package/bpk-react-utils/index.js +39 -87
  1136. package/bpk-react-utils/src/Portal.js +115 -64
  1137. package/bpk-react-utils/src/TransitionInitialMount.js +40 -33
  1138. package/bpk-react-utils/src/cssModules.js +12 -14
  1139. package/bpk-react-utils/src/deprecated.js +22 -19
  1140. package/bpk-react-utils/src/deviceDetection.js +14 -11
  1141. package/bpk-react-utils/src/isRTL.js +17 -11
  1142. package/bpk-react-utils/src/withDefaultProps.js +60 -36
  1143. package/bpk-react-utils/src/wrapDisplayName.js +4 -8
  1144. package/bpk-scrim-utils/README.md +47 -0
  1145. package/bpk-scrim-utils/index.js +6 -17
  1146. package/bpk-scrim-utils/src/BpkScrim.js +29 -26
  1147. package/bpk-scrim-utils/src/bpk-scrim-content.module.scss +32 -0
  1148. package/bpk-scrim-utils/src/bpk-scrim.module.css +1 -1
  1149. package/bpk-scrim-utils/src/bpk-scrim.module.scss +45 -0
  1150. package/bpk-scrim-utils/src/customPropTypes.js +19 -11
  1151. package/bpk-scrim-utils/src/scroll-utils.js +38 -20
  1152. package/bpk-scrim-utils/src/withScrim.js +115 -94
  1153. package/bpk-theming/README.md +41 -0
  1154. package/bpk-theming/index.js +4 -10
  1155. package/bpk-theming/src/BpkThemeProvider.js +73 -59
  1156. package/package.json +1 -1
  1157. package/bpk-component-boilerplate/src/BpkBoilerplate.js +0 -38
  1158. package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +0 -18
  1159. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +0 -18
  1160. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +0 -18
  1161. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +0 -18
  1162. package/bpk-component-content-cards/src/BpkContentCard.module.css +0 -18
  1163. package/bpk-component-datatable/src/BpkDataTableHeader.module.css +0 -18
  1164. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +0 -18
  1165. package/bpk-component-loading-button/src/BpkLoadingButton.module.css +0 -18
  1166. package/bpk-component-price/src/BpkPrice.module.css +0 -18
  1167. package/bpk-storybook-utils/index.js +0 -43
  1168. package/bpk-storybook-utils/src/BpkDarkExampleWrapper.js +0 -33
  1169. package/index.css +0 -0
@@ -1,28 +1,32 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "INPUT_TYPES", {
7
- enumerable: true,
8
- get: function () {
9
- return _bpkComponentInput.INPUT_TYPES;
10
- }
11
- });
12
- exports.default = void 0;
13
- var _react = _interopRequireWildcard(require("react"));
14
- var _propTypes = _interopRequireDefault(require("prop-types"));
15
- var _bpkReactUtils = require("../../bpk-react-utils");
16
- var _bpkComponentInput = require("../../bpk-component-input");
17
- var _BpkInputField = _interopRequireDefault(require("./BpkInputField"));
18
- var _BpkSplitInputModule = _interopRequireDefault(require("./BpkSplitInput.module.css"));
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- 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); }
21
- 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; }
22
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
24
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
25
- const getClassName = (0, _bpkReactUtils.cssModules)(_BpkSplitInputModule.default);
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, { Component } from 'react';
21
+ import PropTypes from 'prop-types';
22
+
23
+ import { cssModules } from '../../bpk-react-utils';
24
+ import { INPUT_TYPES } from '../../bpk-component-input';
25
+
26
+ import InputField from './BpkInputField';
27
+ import STYLES from './BpkSplitInput.module.scss';
28
+
29
+ const getClassName = cssModules(STYLES);
26
30
 
27
31
  // keyCode constants
28
32
  const BACKSPACE = 8;
@@ -31,201 +35,211 @@ const RIGHT_ARROW = 39;
31
35
  const DELETE = 46;
32
36
  const SPACEBAR = 32;
33
37
  const ENTER = 13;
34
- class BpkSplitInput extends _react.Component {
38
+
39
+ class BpkSplitInput extends Component {
35
40
  constructor(props) {
36
41
  super(props);
37
- _defineProperty(this, "onInputChange", input => {
38
- this.setState({
39
- inputValue: input
40
- });
41
- const {
42
- onChange
43
- } = this.props;
44
- const value = input.join('');
45
- onChange(value);
46
- });
47
- _defineProperty(this, "updateInputValue", value => {
48
- const {
49
- focusedInput,
50
- inputValue
51
- } = this.state;
52
- inputValue[focusedInput] = value;
53
- this.onInputChange(inputValue);
54
- });
55
- _defineProperty(this, "handleSubmit", () => {
56
- const {
57
- onSubmit
58
- } = this.props;
59
- const {
60
- inputValue
61
- } = this.state;
62
- if (this.validateInput(inputValue)) {
63
- const value = inputValue.join('');
64
- onSubmit(value);
65
- }
66
- });
67
- _defineProperty(this, "validateInput", inputValue => {
68
- let index = 0;
69
- while (index < inputValue.length) {
70
- if (!this.isInputValid(inputValue[index])) {
71
- this.setState({
72
- focusedInput: index
73
- });
74
- return false;
75
- }
76
- index += 1;
77
- }
78
- return true;
79
- });
80
- _defineProperty(this, "isNumeric", () => this.props.type === _bpkComponentInput.INPUT_TYPES.number);
81
- _defineProperty(this, "isInputValid", value => {
82
- const isTypeValid = this.isNumeric() ? /^\d$/.test(value) : typeof value === 'string';
83
- return isTypeValid && value.trim().length === 1;
84
- });
85
- _defineProperty(this, "focusInput", inputIndex => {
86
- const {
87
- inputLength
88
- } = this.props;
89
- const focusedInput = Math.max(Math.min(inputLength - 1, inputIndex), 0);
90
- this.setState({
91
- focusedInput
92
- });
93
- });
94
- _defineProperty(this, "focusNextInput", () => {
95
- const {
96
- focusedInput
97
- } = this.state;
98
- this.focusInput(focusedInput + 1);
99
- });
100
- _defineProperty(this, "focusPreviousInput", () => {
101
- const {
102
- focusedInput
103
- } = this.state;
104
- this.focusInput(focusedInput - 1);
105
- });
106
- _defineProperty(this, "handleOnPaste", e => {
107
- e.preventDefault();
108
- const {
109
- inputLength
110
- } = this.props;
111
- const {
112
- focusedInput,
113
- inputValue
114
- } = this.state;
115
- const pastedData = e.clipboardData.getData('text/plain').slice(0, inputLength - focusedInput).split('');
116
- const charsReceived = pastedData.length;
117
- let firstInvalidInputPosition;
118
- let position = focusedInput;
119
- for (position; position < charsReceived; position += 1) {
120
- const firstElement = pastedData.shift();
121
- if (this.isInputValid(firstElement)) {
122
- inputValue[position] = firstElement;
123
- } else if (typeof firstInvalidInputPosition === 'undefined') {
124
- firstInvalidInputPosition = position;
125
- }
126
- }
127
- this.focusInput(typeof firstInvalidInputPosition !== 'undefined' ? firstInvalidInputPosition : position);
128
- this.onInputChange(inputValue);
129
- });
130
- _defineProperty(this, "handleOnKeyDown", e => {
131
- if (e.keyCode === BACKSPACE || e.key === 'Backspace') {
132
- e.preventDefault();
133
- this.updateInputValue('');
134
- this.focusPreviousInput();
135
- } else if (e.keyCode === DELETE || e.key === 'Delete') {
136
- e.preventDefault();
137
- this.updateInputValue('');
138
- } else if (e.keyCode === LEFT_ARROW || e.key === 'Left' || e.key === 'ArrowLeft') {
139
- e.preventDefault();
140
- this.focusPreviousInput();
141
- } else if (e.keyCode === RIGHT_ARROW || e.key === 'Right' || e.key === 'ArrowRight') {
142
- e.preventDefault();
143
- this.focusNextInput();
144
- } else if (e.keyCode === ENTER || e.key === 'Enter') {
145
- e.preventDefault();
146
- this.handleSubmit();
147
- } else if (e.keyCode === SPACEBAR || e.key === ' ' || e.key === 'Spacebar' || e.key === 'Space') {
148
- e.preventDefault();
149
- }
150
- });
151
- _defineProperty(this, "handleOnChange", e => {
152
- const {
153
- value
154
- } = e.target;
155
- if (this.isInputValid(value)) {
156
- this.updateInputValue(value);
157
- this.focusNextInput();
158
- }
159
- });
160
- _defineProperty(this, "handleOnFocus", (e, index) => {
161
- this.setState({
162
- focusedInput: index
163
- });
164
- e.target.select();
165
- });
166
- _defineProperty(this, "renderInputs", () => {
167
- const {
168
- focusedInput,
169
- inputValue
170
- } = this.state;
171
- const {
172
- id,
173
- inputLength,
174
- label,
175
- large,
176
- name,
177
- placeholder,
178
- type
179
- } = this.props;
180
- const inputs = [];
181
- for (let index = 0; index < inputLength; index += 1) {
182
- inputs.push( /*#__PURE__*/_react.default.createElement(_BpkInputField.default, {
183
- key: index,
184
- index: index,
185
- focus: focusedInput === index,
186
- id: `${id}-${index}`,
187
- label: label,
188
- name: name,
189
- type: type,
190
- large: large,
191
- value: inputValue && inputValue[index],
192
- placeholder: placeholder,
193
- onChange: this.handleOnChange,
194
- onInput: this.handleOnChange,
195
- onKeyDown: this.handleOnKeyDown,
196
- onPaste: this.handleOnPaste,
197
- onFocus: e => this.handleOnFocus(e, index)
198
- }));
199
- }
200
- return inputs;
201
- });
42
+
202
43
  this.state = {
203
44
  focusedInput: 0,
204
- inputValue: []
45
+ inputValue: [],
205
46
  };
206
47
  }
48
+
49
+ onInputChange = (input) => {
50
+ this.setState({ inputValue: input });
51
+ const { onChange } = this.props;
52
+ const value = input.join('');
53
+ onChange(value);
54
+ };
55
+
56
+ updateInputValue = (value) => {
57
+ const { focusedInput, inputValue } = this.state;
58
+ inputValue[focusedInput] = value;
59
+
60
+ this.onInputChange(inputValue);
61
+ };
62
+
63
+ handleSubmit = () => {
64
+ const { onSubmit } = this.props;
65
+ const { inputValue } = this.state;
66
+ if (this.validateInput(inputValue)) {
67
+ const value = inputValue.join('');
68
+ onSubmit(value);
69
+ }
70
+ };
71
+
72
+ validateInput = (inputValue) => {
73
+ let index = 0;
74
+ while (index < inputValue.length) {
75
+ if (!this.isInputValid(inputValue[index])) {
76
+ this.setState({ focusedInput: index });
77
+ return false;
78
+ }
79
+ index += 1;
80
+ }
81
+ return true;
82
+ };
83
+
84
+ isNumeric = () => this.props.type === INPUT_TYPES.number;
85
+
86
+ isInputValid = (value) => {
87
+ const isTypeValid = this.isNumeric()
88
+ ? /^\d$/.test(value)
89
+ : typeof value === 'string';
90
+ return isTypeValid && value.trim().length === 1;
91
+ };
92
+
93
+ focusInput = (inputIndex) => {
94
+ const { inputLength } = this.props;
95
+ const focusedInput = Math.max(Math.min(inputLength - 1, inputIndex), 0);
96
+ this.setState({ focusedInput });
97
+ };
98
+
99
+ focusNextInput = () => {
100
+ const { focusedInput } = this.state;
101
+ this.focusInput(focusedInput + 1);
102
+ };
103
+
104
+ focusPreviousInput = () => {
105
+ const { focusedInput } = this.state;
106
+ this.focusInput(focusedInput - 1);
107
+ };
108
+
109
+ handleOnPaste = (e) => {
110
+ e.preventDefault();
111
+ const { inputLength } = this.props;
112
+ const { focusedInput, inputValue } = this.state;
113
+
114
+ const pastedData = e.clipboardData
115
+ .getData('text/plain')
116
+ .slice(0, inputLength - focusedInput)
117
+ .split('');
118
+ const charsReceived = pastedData.length;
119
+
120
+ let firstInvalidInputPosition;
121
+ let position = focusedInput;
122
+ for (position; position < charsReceived; position += 1) {
123
+ const firstElement = pastedData.shift();
124
+ if (this.isInputValid(firstElement)) {
125
+ inputValue[position] = firstElement;
126
+ } else if (typeof firstInvalidInputPosition === 'undefined') {
127
+ firstInvalidInputPosition = position;
128
+ }
129
+ }
130
+ this.focusInput(
131
+ typeof firstInvalidInputPosition !== 'undefined'
132
+ ? firstInvalidInputPosition
133
+ : position,
134
+ );
135
+ this.onInputChange(inputValue);
136
+ };
137
+
138
+ handleOnKeyDown = (e) => {
139
+ if (e.keyCode === BACKSPACE || e.key === 'Backspace') {
140
+ e.preventDefault();
141
+ this.updateInputValue('');
142
+ this.focusPreviousInput();
143
+ } else if (e.keyCode === DELETE || e.key === 'Delete') {
144
+ e.preventDefault();
145
+ this.updateInputValue('');
146
+ } else if (
147
+ e.keyCode === LEFT_ARROW ||
148
+ e.key === 'Left' ||
149
+ e.key === 'ArrowLeft'
150
+ ) {
151
+ e.preventDefault();
152
+ this.focusPreviousInput();
153
+ } else if (
154
+ e.keyCode === RIGHT_ARROW ||
155
+ e.key === 'Right' ||
156
+ e.key === 'ArrowRight'
157
+ ) {
158
+ e.preventDefault();
159
+ this.focusNextInput();
160
+ } else if (e.keyCode === ENTER || e.key === 'Enter') {
161
+ e.preventDefault();
162
+ this.handleSubmit();
163
+ } else if (
164
+ e.keyCode === SPACEBAR ||
165
+ e.key === ' ' ||
166
+ e.key === 'Spacebar' ||
167
+ e.key === 'Space'
168
+ ) {
169
+ e.preventDefault();
170
+ }
171
+ };
172
+
173
+ handleOnChange = (e) => {
174
+ const { value } = e.target;
175
+ if (this.isInputValid(value)) {
176
+ this.updateInputValue(value);
177
+ this.focusNextInput();
178
+ }
179
+ };
180
+
181
+ handleOnFocus = (e, index) => {
182
+ this.setState({ focusedInput: index });
183
+ e.target.select();
184
+ };
185
+
186
+ renderInputs = () => {
187
+ const { focusedInput, inputValue } = this.state;
188
+ const { id, inputLength, label, large, name, placeholder, type } =
189
+ this.props;
190
+ const inputs = [];
191
+ for (let index = 0; index < inputLength; index += 1) {
192
+ inputs.push(
193
+ <InputField
194
+ key={index}
195
+ index={index}
196
+ focus={focusedInput === index}
197
+ id={`${id}-${index}`}
198
+ label={label}
199
+ name={name}
200
+ type={type}
201
+ large={large}
202
+ value={inputValue && inputValue[index]}
203
+ placeholder={placeholder}
204
+ onChange={this.handleOnChange}
205
+ onInput={this.handleOnChange}
206
+ onKeyDown={this.handleOnKeyDown}
207
+ onPaste={this.handleOnPaste}
208
+ onFocus={(e) => this.handleOnFocus(e, index)}
209
+ />,
210
+ );
211
+ }
212
+
213
+ return inputs;
214
+ };
215
+
207
216
  render() {
208
- return /*#__PURE__*/_react.default.createElement("div", {
209
- className: getClassName('bpk-split-input')
210
- }, this.renderInputs());
217
+ return (
218
+ <div className={getClassName('bpk-split-input')}>
219
+ {this.renderInputs()}
220
+ </div>
221
+ );
211
222
  }
212
223
  }
224
+
213
225
  BpkSplitInput.propTypes = {
214
- type: _propTypes.default.oneOf([_bpkComponentInput.INPUT_TYPES.text, _bpkComponentInput.INPUT_TYPES.number]),
215
- id: _propTypes.default.string.isRequired,
216
- label: _propTypes.default.string.isRequired,
217
- name: _propTypes.default.string.isRequired,
218
- inputLength: _propTypes.default.number,
219
- placeholder: _propTypes.default.string,
220
- onChange: _propTypes.default.func.isRequired,
221
- onSubmit: _propTypes.default.func.isRequired,
222
- large: _propTypes.default.bool
226
+ type: PropTypes.oneOf([INPUT_TYPES.text, INPUT_TYPES.number]),
227
+ id: PropTypes.string.isRequired,
228
+ label: PropTypes.string.isRequired,
229
+ name: PropTypes.string.isRequired,
230
+ inputLength: PropTypes.number,
231
+ placeholder: PropTypes.string,
232
+ onChange: PropTypes.func.isRequired,
233
+ onSubmit: PropTypes.func.isRequired,
234
+ large: PropTypes.bool,
223
235
  };
236
+
224
237
  BpkSplitInput.defaultProps = {
225
- type: _bpkComponentInput.INPUT_TYPES.number,
238
+ type: INPUT_TYPES.number,
226
239
  inputLength: 4,
227
240
  large: true,
228
- placeholder: ''
241
+ placeholder: '',
229
242
  };
230
- var _default = BpkSplitInput;
231
- exports.default = _default;
243
+
244
+ export default BpkSplitInput;
245
+ export { INPUT_TYPES };
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-split-input{font-size:1rem;line-height:1.5rem;font-weight:400;display:flex;width:100%;padding-top:0.25rem;flex-direction:row;align-items:center;direction:ltr}.bpk-split-input__textbox{display:flex;align-items:center}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-split-input{display:flex}
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ /* stylelint-disable */
20
+
21
+ @import '~bpk-mixins/index.scss';
22
+
23
+ .bpk-split-input {
24
+ @include bpk-body-default;
25
+ display: flex;
26
+ width: 100%;
27
+ padding-top: bpk-spacing-sm();
28
+ flex-direction: row;
29
+ align-items: center;
30
+ direction: ltr;
31
+
32
+ &__textbox {
33
+ display: flex;
34
+ align-items: center;
35
+ }
36
+ }
@@ -0,0 +1,97 @@
1
+ # bpk-component-star-rating
2
+
3
+ > Backpack rating star component.
4
+
5
+ ## Installation
6
+
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
8
+
9
+ ## Usage
10
+
11
+ ```js
12
+ import React from 'react';
13
+ import BpkStarRating, {
14
+ BpkStar,
15
+ STAR_TYPES,
16
+ BpkInteractiveStarRating,
17
+ withInteractiveStarRatingState
18
+ } from '@skyscanner/backpack-web/bpk-component-star-rating';
19
+
20
+ const InteractiveStarRating = withInteractiveStarRatingState(BpkInteractiveStarRating);
21
+
22
+ export default () => (
23
+ <div>
24
+ <BpkStar
25
+ type={STAR_TYPES.HALF}
26
+ />
27
+ <BpkStarRating
28
+ rating={3.5}
29
+ large
30
+ ratingLabel={(rating, maxRating) => `Rated ${rating} out of ${maxRating} stars`}
31
+ />
32
+ <InteractiveStarRating
33
+ id="large-star-rating"
34
+ onRatingSelect={(rating) => console.log(rating)}
35
+ getStarLabel={(rating, maxRating) => `${rating} out of ${maxRating} stars`}
36
+ />
37
+ </div>
38
+ );
39
+ ```
40
+
41
+ ## Props
42
+
43
+ ### BpkStarRating
44
+
45
+ | Property | PropType | Required | Default Value |
46
+ | -------------- | ----------------------- | -------- | ------------------- |
47
+ | ratingLabel | oneOfType(string, func) | true | - |
48
+ | className | string | false | null |
49
+ | large | bool | false | false |
50
+ | maxRating | number | false | 5 |
51
+ | rating | number | false | 0 |
52
+ | rounding | oneOf(ROUNDING_TYPES) | false | ROUNDING_TYPES.down |
53
+
54
+ ### BpkStar
55
+
56
+ | Property | PropType | Required | Default Value |
57
+ | ----------- | ----------------- | -------- | ------------- |
58
+ | type | oneOf(STAR_TYPES) | true | - |
59
+ | className | string | false | null |
60
+ | large | bool | false | false |
61
+
62
+ ### withInteractiveStarRatingState()
63
+
64
+ | Property | PropType | Required | Default Value |
65
+ | -------------- | -------- | -------- | ------------- |
66
+ | onRatingSelect | func | false | () => null |
67
+
68
+ ### BpkInteractiveStarRating
69
+
70
+ | Property | PropType | Required | Default Value |
71
+ | -------------- | -------- | -------- | ------------- |
72
+ | getStarLabel | func | true | - |
73
+ | id | string | true | - |
74
+ | className | string | false | null |
75
+ | hoverRating | number | false | 0 |
76
+ | large | bool | false | false |
77
+ | maxRating | number | false | 5 |
78
+ | onMouseLeave | func | false | () => null |
79
+ | onRatingHover | func | false | () => null |
80
+ | onRatingSelect | func | false | () => null |
81
+ | rating | number | false | 0 |
82
+
83
+ ### BpkInteractiveStar
84
+
85
+ | Property | PropType | Required | Default Value |
86
+ | ------------ | ----------------- | -------- | ------------- |
87
+ | label | bool | true | - |
88
+ | name | bool | true | - |
89
+ | type | oneOf(STAR_TYPES) | true | - |
90
+ | value | number | true | - |
91
+ | onClick | func | true | - |
92
+ | onMouseEnter | func | true | - |
93
+ | selected | bool | false | false |
94
+
95
+ ## Theme Props
96
+
97
+ * `starRatingFilledColor`
@@ -1,66 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "BpkInteractiveStar", {
7
- enumerable: true,
8
- get: function () {
9
- return _BpkInteractiveStar.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "BpkInteractiveStarRating", {
13
- enumerable: true,
14
- get: function () {
15
- return _BpkInteractiveStarRating.default;
16
- }
17
- });
18
- Object.defineProperty(exports, "BpkStar", {
19
- enumerable: true,
20
- get: function () {
21
- return _BpkStar.default;
22
- }
23
- });
24
- Object.defineProperty(exports, "BpkStarNonRtl", {
25
- enumerable: true,
26
- get: function () {
27
- return _BpkStar.BpkStarNonRtl;
28
- }
29
- });
30
- Object.defineProperty(exports, "ROUNDING_TYPES", {
31
- enumerable: true,
32
- get: function () {
33
- return _BpkStarRating.ROUNDING_TYPES;
34
- }
35
- });
36
- Object.defineProperty(exports, "STAR_TYPES", {
37
- enumerable: true,
38
- get: function () {
39
- return _BpkStar.STAR_TYPES;
40
- }
41
- });
42
- exports.default = void 0;
43
- Object.defineProperty(exports, "themeAttributes", {
44
- enumerable: true,
45
- get: function () {
46
- return _themeAttributes.default;
47
- }
48
- });
49
- Object.defineProperty(exports, "withInteractiveStarRatingState", {
50
- enumerable: true,
51
- get: function () {
52
- return _withInteractiveStarRatingState.default;
53
- }
54
- });
55
- var _BpkStar = _interopRequireWildcard(require("./src/BpkStar"));
56
- var _BpkInteractiveStar = _interopRequireDefault(require("./src/BpkInteractiveStar"));
57
- var _BpkStarRating = _interopRequireWildcard(require("./src/BpkStarRating"));
58
- var _BpkInteractiveStarRating = _interopRequireDefault(require("./src/BpkInteractiveStarRating"));
59
- var _withInteractiveStarRatingState = _interopRequireDefault(require("./src/withInteractiveStarRatingState"));
60
- var _themeAttributes = _interopRequireDefault(require("./src/themeAttributes"));
61
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
62
- 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); }
63
- 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; }
64
1
  /*
65
2
  * Backpack - Skyscanner's Design System
66
3
  *
@@ -78,5 +15,24 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
78
15
  * See the License for the specific language governing permissions and
79
16
  * limitations under the License.
80
17
  */
81
- var _default = _BpkStarRating.default;
82
- exports.default = _default;
18
+
19
+ /* @flow strict */
20
+
21
+ import BpkStar, { BpkStarNonRtl, STAR_TYPES } from './src/BpkStar';
22
+ import BpkInteractiveStar from './src/BpkInteractiveStar';
23
+ import BpkStarRating, { ROUNDING_TYPES } from './src/BpkStarRating';
24
+ import BpkInteractiveStarRating from './src/BpkInteractiveStarRating';
25
+ import withInteractiveStarRatingState from './src/withInteractiveStarRatingState';
26
+ import themeAttributes from './src/themeAttributes';
27
+
28
+ export {
29
+ BpkStar,
30
+ BpkStarNonRtl,
31
+ STAR_TYPES,
32
+ ROUNDING_TYPES,
33
+ BpkInteractiveStar,
34
+ BpkInteractiveStarRating,
35
+ withInteractiveStarRatingState,
36
+ themeAttributes,
37
+ };
38
+ export default BpkStarRating;