@skyscanner/backpack-web 18.2.1 → 20.0.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 (265) hide show
  1. package/README.md +0 -1
  2. package/bpk-animate-height/README.md +1 -1
  3. package/bpk-animate-height/src/AnimateHeight.js +1 -1
  4. package/bpk-component-accordion/README.md +0 -3
  5. package/bpk-component-accordion/src/BpkAccordion.js +1 -1
  6. package/bpk-component-accordion/src/BpkAccordionItem.js +3 -2
  7. package/bpk-component-accordion/src/withAccordionItemState.js +2 -1
  8. package/bpk-component-accordion/src/withSingleItemAccordionState.js +2 -8
  9. package/bpk-component-aria-live/README.md +0 -1
  10. package/bpk-component-aria-live/src/BpkAriaLive.js +0 -1
  11. package/bpk-component-autosuggest/README.md +1 -1
  12. package/bpk-component-autosuggest/src/BpkAutosuggest.js +0 -1
  13. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +1 -1
  14. package/bpk-component-badge/README.md +0 -1
  15. package/bpk-component-badge/src/BpkBadge.js +0 -1
  16. package/bpk-component-banner-alert/README.md +2 -3
  17. package/bpk-component-banner-alert/src/AnimateAndFade.js +2 -1
  18. package/bpk-component-banner-alert/src/BpkBannerAlert.js +1 -3
  19. package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +0 -8
  20. package/bpk-component-banner-alert/src/BpkBannerAlertDismissable.js +0 -1
  21. package/bpk-component-banner-alert/src/BpkBannerAlertExpandable.js +1 -1
  22. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +1 -3
  23. package/bpk-component-banner-alert/src/common-types.js +1 -9
  24. package/bpk-component-banner-alert/src/withBannerAlertState.js +2 -1
  25. package/bpk-component-barchart/README.md +0 -1
  26. package/bpk-component-barchart/src/BpkBarchart.js +1 -1
  27. package/bpk-component-barchart/src/BpkBarchartBar.js +0 -1
  28. package/bpk-component-barchart/src/BpkBarchartBars.js +0 -1
  29. package/bpk-component-barchart/src/BpkBarchartDefs.js +0 -2
  30. package/bpk-component-barchart/src/BpkChartAxis.js +1 -1
  31. package/bpk-component-barchart/src/BpkChartDataTable.js +0 -1
  32. package/bpk-component-barchart/src/BpkChartGridLines.js +0 -1
  33. package/bpk-component-barchart/src/BpkChartMargin.js +1 -1
  34. package/bpk-component-blockquote/README.md +0 -1
  35. package/bpk-component-blockquote/src/BpkBlockquote.js +0 -1
  36. package/bpk-component-breadcrumb/README.md +1 -1
  37. package/bpk-component-breadcrumb/src/BpkBreadcrumb.js +5 -4
  38. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.js +1 -1
  39. package/bpk-component-breakpoint/README.md +0 -1
  40. package/bpk-component-breakpoint/src/BpkBreakpoint.js +1 -1
  41. package/bpk-component-button/README.md +0 -3
  42. package/bpk-component-button/index.js +0 -2
  43. package/bpk-component-button/src/BpkButton.js +0 -9
  44. package/bpk-component-button/src/BpkButtonBase.js +1 -3
  45. package/bpk-component-button/src/BpkButtonDestructive.js +1 -3
  46. package/bpk-component-button/src/BpkButtonFeatured.js +1 -3
  47. package/bpk-component-button/src/BpkButtonLink.js +1 -7
  48. package/bpk-component-button/src/BpkButtonLinkOnDark.js +1 -7
  49. package/bpk-component-button/src/BpkButtonPrimary.js +1 -3
  50. package/bpk-component-button/src/BpkButtonPrimaryOnDark.js +1 -3
  51. package/bpk-component-button/src/BpkButtonPrimaryOnLight.js +1 -3
  52. package/bpk-component-button/src/BpkButtonSecondary.js +1 -3
  53. package/bpk-component-button/src/BpkButtonSecondaryOnDark.js +1 -3
  54. package/bpk-component-button/src/commonButtonTests.js +0 -1
  55. package/bpk-component-calendar/README.md +2 -2
  56. package/bpk-component-calendar/src/BpkCalendarContainer.js +4 -19
  57. package/bpk-component-calendar/src/BpkCalendarDate.js +1 -1
  58. package/bpk-component-calendar/src/BpkCalendarGrid.js +2 -19
  59. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +2 -7
  60. package/bpk-component-calendar/src/BpkCalendarGridTransition.js +1 -1
  61. package/bpk-component-calendar/src/BpkCalendarNav.js +0 -1
  62. package/bpk-component-calendar/src/Week.js +2 -21
  63. package/bpk-component-calendar/src/composeCalendar.js +1 -12
  64. package/bpk-component-card/README.md +0 -2
  65. package/bpk-component-card/src/BpkCard.js +1 -1
  66. package/bpk-component-card/src/BpkDividedCard.js +0 -1
  67. package/bpk-component-checkbox/README.md +0 -1
  68. package/bpk-component-checkbox/src/BpkCheckbox.js +1 -1
  69. package/bpk-component-chip/README.md +0 -1
  70. package/bpk-component-chip/src/BpkDismissibleChip.js +0 -2
  71. package/bpk-component-chip/src/BpkDropdownChip.js +0 -2
  72. package/bpk-component-chip/src/BpkSelectableChip.js +1 -1
  73. package/bpk-component-close-button/README.md +0 -1
  74. package/bpk-component-close-button/src/BpkCloseButton.js +1 -1
  75. package/bpk-component-code/README.md +0 -1
  76. package/bpk-component-code/src/BpkCode.js +1 -1
  77. package/bpk-component-code/src/BpkCodeBlock.js +1 -1
  78. package/bpk-component-content-cards/README.md +0 -1
  79. package/bpk-component-content-cards/src/BpkContentCard.js +0 -2
  80. package/bpk-component-content-cards/src/BpkContentCards.js +0 -2
  81. package/bpk-component-datatable/README.md +3 -4
  82. package/bpk-component-datatable/src/BpkDataTable.js +3 -2
  83. package/bpk-component-datatable/src/BpkDataTableColumn.js +0 -1
  84. package/bpk-component-datatable/src/BpkDataTableHeader.js +2 -2
  85. package/bpk-component-datepicker/README.md +2 -2
  86. package/bpk-component-datepicker/src/BpkDatepicker.js +3 -13
  87. package/bpk-component-description-list/README.md +0 -1
  88. package/bpk-component-description-list/src/ComponentFactory.js +0 -1
  89. package/bpk-component-dialog/README.md +1 -1
  90. package/bpk-component-dialog/src/BpkDialog.js +0 -2
  91. package/bpk-component-dialog/src/BpkDialogInner.js +0 -2
  92. package/bpk-component-drawer/README.md +1 -1
  93. package/bpk-component-drawer/src/BpkDrawer.js +1 -1
  94. package/bpk-component-drawer/src/BpkDrawerContent.js +1 -1
  95. package/bpk-component-fieldset/README.md +1 -1
  96. package/bpk-component-fieldset/src/BpkFieldset.js +2 -1
  97. package/bpk-component-flare/README.md +0 -1
  98. package/bpk-component-flare/src/BpkContentBubble.js +0 -1
  99. package/bpk-component-flare/src/BpkFlareBar.js +0 -1
  100. package/bpk-component-flare/src/svgs/pointer.svg +1 -1
  101. package/bpk-component-floating-notification/README.md +0 -1
  102. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +1 -1
  103. package/bpk-component-form-validation/README.md +0 -1
  104. package/bpk-component-form-validation/src/BpkFormValidation.js +0 -1
  105. package/bpk-component-graphic-promotion/README.md +0 -1
  106. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +4 -4
  107. package/bpk-component-grid-toggle/README.md +0 -1
  108. package/bpk-component-grid-toggle/src/BpkGridToggle.js +2 -2
  109. package/bpk-component-horizontal-nav/README.md +1 -1
  110. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.js +4 -3
  111. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.js +2 -1
  112. package/bpk-component-icon/README.md +0 -3
  113. package/bpk-component-icon/index.js +0 -4
  114. package/bpk-component-icon/src/classNameModifierHOCFactory.js +0 -1
  115. package/bpk-component-icon/src/withAlignment.js +0 -2
  116. package/bpk-component-icon/src/withDescription.js +1 -1
  117. package/bpk-component-image/README.md +0 -1
  118. package/bpk-component-image/src/BpkBackgroundImage.js +4 -20
  119. package/bpk-component-image/src/BpkImage.js +4 -22
  120. package/bpk-component-image/src/withLazyLoading.js +9 -5
  121. package/bpk-component-image/src/withLoadingBehavior.js +6 -5
  122. package/bpk-component-infinite-scroll/README.md +0 -2
  123. package/bpk-component-infinite-scroll/src/withInfiniteScroll-test.flow.js +3 -3
  124. package/bpk-component-infinite-scroll/src/withInfiniteScroll.js +2 -6
  125. package/bpk-component-input/README.md +0 -2
  126. package/bpk-component-input/index.js +2 -11
  127. package/bpk-component-input/src/BpkClearButton.js +0 -1
  128. package/bpk-component-input/src/BpkInput.js +1 -1
  129. package/bpk-component-input/src/withOpenEvents.js +2 -2
  130. package/bpk-component-label/README.md +0 -1
  131. package/bpk-component-label/src/BpkLabel.js +1 -1
  132. package/bpk-component-link/README.md +0 -1
  133. package/bpk-component-link/src/BpkButtonLink.js +3 -8
  134. package/bpk-component-link/src/BpkLink.js +2 -8
  135. package/bpk-component-list/README.md +0 -1
  136. package/bpk-component-list/src/BpkList.js +1 -1
  137. package/bpk-component-list/src/BpkListItem.js +1 -1
  138. package/bpk-component-loading-button/README.md +0 -1
  139. package/bpk-component-loading-button/src/BpkLoadingButton.js +1 -1
  140. package/bpk-component-map/README.md +0 -3
  141. package/bpk-component-map/src/BpkBasicMapMarker.js +1 -1
  142. package/bpk-component-map/src/BpkIconMarker.js +1 -1
  143. package/bpk-component-map/src/BpkIconMarkerBackground.js +0 -2
  144. package/bpk-component-map/src/BpkMap.js +2 -1
  145. package/bpk-component-map/src/BpkOverlayView.js +1 -1
  146. package/bpk-component-map/src/BpkPriceMarker.js +0 -1
  147. package/bpk-component-map/src/DefaultLoadingElement.js +0 -2
  148. package/bpk-component-map/src/withGoogleMapsScript.js +1 -1
  149. package/bpk-component-mobile-scroll-container/README.md +0 -1
  150. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.js +2 -1
  151. package/bpk-component-modal/README.md +1 -1
  152. package/bpk-component-modal/src/BpkModal.js +0 -1
  153. package/bpk-component-modal/src/BpkModalInner.js +1 -1
  154. package/bpk-component-navigation-bar/README.md +0 -3
  155. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +3 -2
  156. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +1 -1
  157. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +1 -1
  158. package/bpk-component-nudger/README.md +2 -2
  159. package/bpk-component-nudger/src/BpkConfigurableNudger.js +0 -1
  160. package/bpk-component-nudger/src/BpkNudger.js +0 -1
  161. package/bpk-component-overlay/README.md +1 -3
  162. package/bpk-component-overlay/index.js +1 -2
  163. package/bpk-component-overlay/src/BpkOverlay.js +2 -15
  164. package/bpk-component-page-indicator/README.md +0 -1
  165. package/bpk-component-page-indicator/src/BpkPageIndicator.js +0 -1
  166. package/bpk-component-page-indicator/src/NavButton.js +0 -1
  167. package/bpk-component-pagination/README.md +0 -1
  168. package/bpk-component-pagination/src/BpkPagination.js +0 -1
  169. package/bpk-component-pagination/src/BpkPaginationBreak.js +0 -1
  170. package/bpk-component-pagination/src/BpkPaginationList.js +0 -1
  171. package/bpk-component-pagination/src/BpkPaginationNudger.js +0 -1
  172. package/bpk-component-pagination/src/BpkPaginationPage.js +0 -1
  173. package/bpk-component-panel/README.md +0 -1
  174. package/bpk-component-panel/src/BpkPanel.js +0 -1
  175. package/bpk-component-phone-input/README.md +1 -1
  176. package/bpk-component-phone-input/src/BpkPhoneInput.js +0 -1
  177. package/bpk-component-popover/README.md +1 -1
  178. package/bpk-component-popover/src/BpkPopover.js +1 -1
  179. package/bpk-component-popover/src/BpkPopoverPortal.js +2 -1
  180. package/bpk-component-price/README.md +4 -4
  181. package/bpk-component-price/src/BpkPrice.js +60 -25
  182. package/bpk-component-price/src/BpkPrice.module.scss +18 -5
  183. package/bpk-component-progress/README.md +1 -1
  184. package/bpk-component-progress/src/BpkProgress.js +1 -1
  185. package/bpk-component-radio/README.md +0 -1
  186. package/bpk-component-radio/src/BpkRadio.js +1 -1
  187. package/bpk-component-rating/README.md +0 -1
  188. package/bpk-component-rating/src/BpkRating.js +1 -1
  189. package/bpk-component-rtl-toggle/README.md +0 -1
  190. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +2 -2
  191. package/bpk-component-rtl-toggle/src/updateOnDirectionChange.js +1 -1
  192. package/bpk-component-scrollable-calendar/README.md +1 -1
  193. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +1 -1
  194. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +0 -2
  195. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +3 -8
  196. package/bpk-component-section-list/README.md +0 -1
  197. package/bpk-component-section-list/src/BpkSectionList.js +1 -1
  198. package/bpk-component-section-list/src/BpkSectionListItem.js +1 -1
  199. package/bpk-component-section-list/src/BpkSectionListSection.js +3 -2
  200. package/bpk-component-select/README.md +0 -2
  201. package/bpk-component-select/src/BpkSelect.js +3 -2
  202. package/bpk-component-skip-link/README.md +0 -1
  203. package/bpk-component-skip-link/src/BpkSkipLink.js +0 -1
  204. package/bpk-component-slider/README.md +1 -1
  205. package/bpk-component-slider/src/BpkSlider.js +0 -1
  206. package/bpk-component-spinner/README.md +0 -1
  207. package/bpk-component-spinner/src/BpkExtraLargeSpinner.js +0 -1
  208. package/bpk-component-spinner/src/BpkLargeSpinner.js +0 -1
  209. package/bpk-component-spinner/src/BpkSpinner.js +0 -1
  210. package/bpk-component-split-input/README.md +0 -1
  211. package/bpk-component-split-input/src/BpkInputField.js +1 -1
  212. package/bpk-component-split-input/src/BpkSplitInput.js +1 -1
  213. package/bpk-component-star-rating/README.md +0 -1
  214. package/bpk-component-star-rating/src/BpkInteractiveStar.js +0 -1
  215. package/bpk-component-star-rating/src/BpkInteractiveStarRating.js +0 -1
  216. package/bpk-component-star-rating/src/BpkStar.js +0 -1
  217. package/bpk-component-star-rating/src/BpkStarRating.js +0 -1
  218. package/bpk-component-star-rating/src/withInteractiveStarRatingState.js +2 -1
  219. package/bpk-component-switch/README.md +0 -1
  220. package/bpk-component-switch/index.js +2 -5
  221. package/bpk-component-switch/src/BpkSwitch.js +3 -18
  222. package/bpk-component-switch/src/BpkSwitch.module.scss +6 -13
  223. package/bpk-component-table/README.md +0 -2
  224. package/bpk-component-table/src/BpkTable.js +4 -14
  225. package/bpk-component-table/src/BpkTable.module.scss +0 -8
  226. package/bpk-component-table/src/BpkTableBody.js +1 -1
  227. package/bpk-component-table/src/BpkTableCell.js +1 -1
  228. package/bpk-component-table/src/BpkTableHead.js +1 -1
  229. package/bpk-component-table/src/BpkTableHeadCell.js +5 -10
  230. package/bpk-component-table/src/BpkTableRow.js +1 -1
  231. package/bpk-component-text/README.md +0 -3
  232. package/bpk-component-text/src/BpkText.js +1 -1
  233. package/bpk-component-textarea/README.md +0 -1
  234. package/bpk-component-textarea/src/BpkTextarea.js +0 -1
  235. package/bpk-component-theme-toggle/README.md +0 -2
  236. package/bpk-component-theme-toggle/src/BpkThemeToggle.js +2 -2
  237. package/bpk-component-theme-toggle/src/updateOnThemeChange.js +1 -1
  238. package/bpk-component-ticket/README.md +0 -1
  239. package/bpk-component-ticket/src/BpkTicket.js +1 -1
  240. package/bpk-component-tooltip/README.md +1 -1
  241. package/bpk-component-tooltip/src/BpkTooltip.js +1 -1
  242. package/bpk-component-tooltip/src/BpkTooltipPortal.js +3 -2
  243. package/bpk-react-utils/README.md +1 -7
  244. package/bpk-react-utils/src/TransitionInitialMount.js +1 -1
  245. package/bpk-react-utils/src/withDefaultProps.js +1 -1
  246. package/bpk-scrim-utils/src/BpkScrim.js +0 -1
  247. package/bpk-scrim-utils/src/withScrim.js +1 -1
  248. package/bpk-theming/src/BpkThemeProvider.js +1 -1
  249. package/package.json +2 -2
  250. package/bpk-component-button/BpkButtonOutline.js +0 -21
  251. package/bpk-component-button/src/BpkButtonOutline.js +0 -48
  252. package/bpk-component-button/src/BpkButtonOutline.module.css +0 -18
  253. package/bpk-component-button/src/BpkButtonOutline.module.scss +0 -23
  254. package/bpk-component-grid/README.md +0 -90
  255. package/bpk-component-grid/index.js +0 -25
  256. package/bpk-component-grid/src/BpkGridColumn.js +0 -118
  257. package/bpk-component-grid/src/BpkGridColumn.module.css +0 -18
  258. package/bpk-component-grid/src/BpkGridColumn.module.scss +0 -73
  259. package/bpk-component-grid/src/BpkGridContainer.js +0 -62
  260. package/bpk-component-grid/src/BpkGridContainer.module.css +0 -18
  261. package/bpk-component-grid/src/BpkGridContainer.module.scss +0 -33
  262. package/bpk-component-grid/src/BpkGridRow.js +0 -57
  263. package/bpk-component-grid/src/BpkGridRow.module.css +0 -18
  264. package/bpk-component-grid/src/BpkGridRow.module.scss +0 -29
  265. package/bpk-component-image/src/customPropTypes.js +0 -37
@@ -19,7 +19,7 @@
19
19
  import focusScope from 'a11y-focus-scope';
20
20
  import focusStore from 'a11y-focus-store';
21
21
  import PropTypes from 'prop-types';
22
- import React, { Component } from 'react';
22
+ import { Component } from 'react';
23
23
 
24
24
  import {
25
25
  cssModules,
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import React, { Component } from 'react';
19
+ import { Component } from 'react';
20
20
  import PropTypes from 'prop-types';
21
21
 
22
22
  const uniq = (arr = []) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "18.2.1",
3
+ "version": "20.0.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "@skyscanner/bpk-svgs": "^16.2.0",
29
29
  "a11y-focus-scope": "^1.1.3",
30
30
  "a11y-focus-store": "^1.0.0",
31
- "bpk-mixins": "^39.1.0",
31
+ "bpk-mixins": "^39.1.1",
32
32
  "d3-path": "^2.0.0",
33
33
  "d3-scale": "^4.0.2",
34
34
  "date-fns": "^2.21.1",
@@ -1,21 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- /* @flow strict */
20
-
21
- export { default } from './src/BpkButtonOutline';
@@ -1,48 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- /* @flow strict */
20
-
21
- import React from 'react';
22
-
23
- import { type Props, defaultProps, propTypes } from './common-types';
24
- import BpkButtonBase, { cssModules } from './BpkButtonBase';
25
- import STYLES from './BpkButtonOutline.module.scss';
26
-
27
- const getClassName = cssModules(STYLES);
28
-
29
- const BpkButtonOutline = (props: Props) => {
30
- const { className, ...rest } = props;
31
-
32
- const classNames = [getClassName('bpk-button--outline')];
33
-
34
- if (className) {
35
- classNames.push(className);
36
- }
37
- const classNamesFinal = classNames.join(' ');
38
-
39
- return (
40
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
41
- <BpkButtonBase className={classNamesFinal} {...rest} />
42
- );
43
- };
44
-
45
- BpkButtonOutline.propTypes = { ...propTypes };
46
- BpkButtonOutline.defaultProps = { ...defaultProps };
47
-
48
- export default BpkButtonOutline;
@@ -1,18 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-button--outline{background-color:rgba(0,0,0,0);background-image:none;color:#fff;box-shadow:0 0 0 2px #fff inset}.bpk-no-touch-support .bpk-button--outline:hover:not(:active):not(:disabled){background-color:rgba(0,0,0,0);box-shadow:0 0 0 2px rgba(255,255,255,0.5) inset}:global(.bpk-no-touch-support) .bpk-button--outline:hover:not(:active):not(:disabled){background-color:rgba(0,0,0,0);box-shadow:0 0 0 2px rgba(255,255,255,0.5) inset}.bpk-button--outline:active{background-color:rgba(0,0,0,0);box-shadow:0 0 0 3px #fff inset}.bpk-button--outline:disabled{background-color:#dddde5;background-image:none;color:#b2b2bf;box-shadow:none}
@@ -1,23 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- @import '~bpk-mixins/index.scss';
20
-
21
- .bpk-button--outline {
22
- @include bpk-button--outline;
23
- }
@@ -1,90 +0,0 @@
1
- # bpk-component-grid
2
-
3
- > Backpack grid components.
4
-
5
- This component is deprecated and will be removed in a future release.
6
-
7
- ## Installation
8
-
9
- Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
-
11
- ## Usage
12
-
13
- ```js
14
- import React from 'react';
15
- import { BpkGridContainer, BpkGridRow, BpkGridColumn } from '@skyscanner/backpack-web/bpk-component-grid';
16
-
17
- export default () => (
18
- <BpkGridContainer>
19
- <BpkGridRow>
20
- <BpkGridColumn width={8} tabletWidth={12}>
21
- Search controls
22
- </BpkGridColumn>
23
- <BpkGridColumn width={4} tabletWidth={0}>
24
- MPU
25
- </BpkGridColumn>
26
- </BpkGridRow>
27
- <BpkGridRow>
28
- <BpkGridColumn width={12}>
29
- Provider logos
30
- </BpkGridColumn>
31
- </BpkGridRow>
32
- <BpkGridRow>
33
- <BpkGridColumn width={4} mobileWidth={12}>
34
- Content panel
35
- </BpkGridColumn>
36
- <BpkGridColumn width={4} mobileWidth={12}>
37
- Content panel
38
- </BpkGridColumn>
39
- <BpkGridColumn width={4} mobileWidth={12}>
40
- Content panel
41
- </BpkGridColumn>
42
- </BpkGridRow>
43
- <BpkGridRow>
44
- <BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
45
- Confidence statement
46
- </BpkGridColumn>
47
- <BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
48
- Confidence statement
49
- </BpkGridColumn>
50
- <BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
51
- Confidence statement
52
- </BpkGridColumn>
53
- <BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
54
- Confidence statement
55
- </BpkGridColumn>
56
- </BpkGridRow>
57
- </BpkGridContainer>
58
- );
59
- ```
60
-
61
- ## Props
62
-
63
- ### BpkGridContainer
64
-
65
- | Property | PropType | Required | Default Value |
66
- | --------- | -------- | -------- | ------------- |
67
- | children | node | true | - |
68
- | debug | bool | false | false |
69
- | fullWidth | bool | false | false |
70
-
71
- ### BpkGridRow
72
-
73
- | Property | PropType | Required | Default Value |
74
- | --------- | -------- | -------- | ------------- |
75
- | children | node | true | - |
76
- | padded | bool | false | true |
77
-
78
- ### BpkGridColumn
79
-
80
- | Property | PropType | Required | Default Value |
81
- | ------------ | -------- | -------- | ------------- |
82
- | children | node | true | - |
83
- | width | number | true | - |
84
- | mobileWidth | number | false | null |
85
- | tabletWidth | number | false | null |
86
- | offset | number | false | null |
87
- | mobileOffset | number | false | null |
88
- | tabletOffset | number | false | null |
89
- | padded | bool | false | true |
90
- | debug | bool | false | false |
@@ -1,25 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import Container from './src/BpkGridContainer';
20
- import Row from './src/BpkGridRow';
21
- import Column from './src/BpkGridColumn';
22
-
23
- export const BpkGridContainer = Container;
24
- export const BpkGridRow = Row;
25
- export const BpkGridColumn = Column;
@@ -1,118 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import PropTypes from 'prop-types';
20
- import React from 'react';
21
-
22
- import { cssModules } from '../../bpk-react-utils';
23
-
24
- import STYLES from './BpkGridColumn.module.scss';
25
-
26
- const getClassName = cssModules(STYLES);
27
-
28
- // IE11 doesn't support `Number.isNaN` so we must use the global.
29
- // When IE11 support drops we can migrate.
30
- // eslint-disable-next-line no-restricted-globals
31
- const isNumeric = (n) => !isNaN(parseFloat(n)) && isFinite(n);
32
-
33
- const BpkGridColumn = (props) => {
34
- const {
35
- children,
36
- className,
37
- debug,
38
- mobileOffset,
39
- mobileWidth,
40
- offset,
41
- padded,
42
- tabletOffset,
43
- tabletWidth,
44
- width,
45
- ...rest
46
- } = props;
47
-
48
- const classNames = ['bpk-grid__column', `bpk-grid__column--${width}`].map(
49
- getClassName,
50
- );
51
-
52
- if (isNumeric(mobileWidth)) {
53
- classNames.push(getClassName(`bpk-grid__column--mobile-${mobileWidth}`));
54
- }
55
- if (isNumeric(tabletWidth)) {
56
- classNames.push(getClassName(`bpk-grid__column--tablet-${tabletWidth}`));
57
- }
58
- if (isNumeric(offset)) {
59
- classNames.push(getClassName(`bpk-grid__column--offset-${offset}`));
60
- }
61
- if (isNumeric(mobileOffset)) {
62
- classNames.push(
63
- getClassName(`bpk-grid__column--offset-mobile-${mobileOffset}`),
64
- );
65
- }
66
- if (isNumeric(tabletOffset)) {
67
- classNames.push(
68
- getClassName(`bpk-grid__column--offset-tablet-${tabletOffset}`),
69
- );
70
- }
71
- if (padded) {
72
- classNames.push(getClassName('bpk-grid__column--padded'));
73
- }
74
- if (debug) {
75
- classNames.push(getClassName('bpk-grid__column--debug'));
76
- }
77
- if (className) {
78
- classNames.push(className);
79
- }
80
-
81
- return (
82
- <div className={classNames.join(' ')} {...rest}>
83
- {debug ? (
84
- <div className={getClassName('bpk-grid__column-debugger')}>
85
- {children}
86
- </div>
87
- ) : (
88
- children
89
- )}
90
- </div>
91
- );
92
- };
93
-
94
- BpkGridColumn.propTypes = {
95
- children: PropTypes.node.isRequired,
96
- width: PropTypes.number.isRequired,
97
- mobileWidth: PropTypes.number,
98
- tabletWidth: PropTypes.number,
99
- offset: PropTypes.number,
100
- mobileOffset: PropTypes.number,
101
- tabletOffset: PropTypes.number,
102
- padded: PropTypes.bool,
103
- debug: PropTypes.bool,
104
- className: PropTypes.string,
105
- };
106
-
107
- BpkGridColumn.defaultProps = {
108
- mobileWidth: null,
109
- tabletWidth: null,
110
- offset: null,
111
- mobileOffset: null,
112
- tabletOffset: null,
113
- padded: true,
114
- debug: false,
115
- className: null,
116
- };
117
-
118
- export default BpkGridColumn;
@@ -1,18 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-grid__column{float:left;padding-right:.75rem;padding-left:.75rem}html[dir='rtl'] .bpk-grid__column{float:right}.bpk-grid__column--padded{padding-top:.75rem;padding-bottom:.75rem}.bpk-grid__column--debug{padding:.75rem}.bpk-grid__column-debugger{background-color:#fff}.bpk-grid__column--0{display:none}.bpk-grid__column--1{display:block;width:8.33333%}.bpk-grid__column--2{display:block;width:16.66667%}.bpk-grid__column--3{display:block;width:25%}.bpk-grid__column--4{display:block;width:33.33333%}.bpk-grid__column--5{display:block;width:41.66667%}.bpk-grid__column--6{display:block;width:50%}.bpk-grid__column--7{display:block;width:58.33333%}.bpk-grid__column--8{display:block;width:66.66667%}.bpk-grid__column--9{display:block;width:75%}.bpk-grid__column--10{display:block;width:83.33333%}.bpk-grid__column--11{display:block;width:91.66667%}.bpk-grid__column--12{display:block;width:100%}.bpk-grid__column--offset-0{margin-left:0}html[dir='rtl'] .bpk-grid__column--offset-0{margin-right:0}.bpk-grid__column--offset-1{margin-left:8.33333%}html[dir='rtl'] .bpk-grid__column--offset-1{margin-right:8.33333%;margin-left:0}.bpk-grid__column--offset-2{margin-left:16.66667%}html[dir='rtl'] .bpk-grid__column--offset-2{margin-right:16.66667%;margin-left:0}.bpk-grid__column--offset-3{margin-left:25%}html[dir='rtl'] .bpk-grid__column--offset-3{margin-right:25%;margin-left:0}.bpk-grid__column--offset-4{margin-left:33.33333%}html[dir='rtl'] .bpk-grid__column--offset-4{margin-right:33.33333%;margin-left:0}.bpk-grid__column--offset-5{margin-left:41.66667%}html[dir='rtl'] .bpk-grid__column--offset-5{margin-right:41.66667%;margin-left:0}.bpk-grid__column--offset-6{margin-left:50%}html[dir='rtl'] .bpk-grid__column--offset-6{margin-right:50%;margin-left:0}.bpk-grid__column--offset-7{margin-left:58.33333%}html[dir='rtl'] .bpk-grid__column--offset-7{margin-right:58.33333%;margin-left:0}.bpk-grid__column--offset-8{margin-left:66.66667%}html[dir='rtl'] .bpk-grid__column--offset-8{margin-right:66.66667%;margin-left:0}.bpk-grid__column--offset-9{margin-left:75%}html[dir='rtl'] .bpk-grid__column--offset-9{margin-right:75%;margin-left:0}.bpk-grid__column--offset-10{margin-left:83.33333%}html[dir='rtl'] .bpk-grid__column--offset-10{margin-right:83.33333%;margin-left:0}.bpk-grid__column--offset-11{margin-left:91.66667%}html[dir='rtl'] .bpk-grid__column--offset-11{margin-right:91.66667%;margin-left:0}.bpk-grid__column--offset-12{margin-left:100%}html[dir='rtl'] .bpk-grid__column--offset-12{margin-right:100%;margin-left:0}@media (max-width: 50.25rem){.bpk-grid__column--tablet-0{display:none}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-1{display:block;width:8.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-2{display:block;width:16.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-3{display:block;width:25%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-4{display:block;width:33.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-5{display:block;width:41.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-6{display:block;width:50%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-7{display:block;width:58.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-8{display:block;width:66.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-9{display:block;width:75%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-10{display:block;width:83.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-11{display:block;width:91.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-12{display:block;width:100%}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-0{margin-left:0}html[dir='rtl'] .bpk-grid__column--offset-tablet-0{margin-right:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-1{margin-left:8.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-1{margin-right:8.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-2{margin-left:16.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-2{margin-right:16.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-3{margin-left:25%}html[dir='rtl'] .bpk-grid__column--offset-tablet-3{margin-right:25%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-4{margin-left:33.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-4{margin-right:33.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-5{margin-left:41.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-5{margin-right:41.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-6{margin-left:50%}html[dir='rtl'] .bpk-grid__column--offset-tablet-6{margin-right:50%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-7{margin-left:58.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-7{margin-right:58.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-8{margin-left:66.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-8{margin-right:66.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-9{margin-left:75%}html[dir='rtl'] .bpk-grid__column--offset-tablet-9{margin-right:75%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-10{margin-left:83.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-10{margin-right:83.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-11{margin-left:91.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-11{margin-right:91.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-12{margin-left:100%}html[dir='rtl'] .bpk-grid__column--offset-tablet-12{margin-right:100%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-0{display:none}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-1{display:block;width:8.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-2{display:block;width:16.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-3{display:block;width:25%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-4{display:block;width:33.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-5{display:block;width:41.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-6{display:block;width:50%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-7{display:block;width:58.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-8{display:block;width:66.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-9{display:block;width:75%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-10{display:block;width:83.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-11{display:block;width:91.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-12{display:block;width:100%}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-0{margin-left:0}html[dir='rtl'] .bpk-grid__column--offset-mobile-0{margin-right:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-1{margin-left:8.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-1{margin-right:8.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-2{margin-left:16.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-2{margin-right:16.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-3{margin-left:25%}html[dir='rtl'] .bpk-grid__column--offset-mobile-3{margin-right:25%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-4{margin-left:33.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-4{margin-right:33.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-5{margin-left:41.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-5{margin-right:41.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-6{margin-left:50%}html[dir='rtl'] .bpk-grid__column--offset-mobile-6{margin-right:50%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-7{margin-left:58.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-7{margin-right:58.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-8{margin-left:66.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-8{margin-right:66.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-9{margin-left:75%}html[dir='rtl'] .bpk-grid__column--offset-mobile-9{margin-right:75%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-10{margin-left:83.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-10{margin-right:83.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-11{margin-left:91.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-11{margin-right:91.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-12{margin-left:100%}html[dir='rtl'] .bpk-grid__column--offset-mobile-12{margin-right:100%;margin-left:0}}
@@ -1,73 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- @import '~bpk-mixins/index.scss';
20
-
21
- .bpk-grid {
22
- &__column {
23
- @include bpk-grid__column;
24
-
25
- &--padded {
26
- @include bpk-grid__column--padded;
27
- }
28
-
29
- &--debug {
30
- @include bpk-grid__column--debug;
31
- }
32
-
33
- &-debugger {
34
- @include bpk-grid__column-debugger;
35
- }
36
-
37
- @for $i from 0 through $bpk-grid-columns {
38
- &--#{$i} {
39
- @include bpk-grid__column--($i);
40
- }
41
- }
42
-
43
- @for $i from 0 through $bpk-grid-columns {
44
- &--offset-#{$i} {
45
- @include bpk-grid__column--offset-($i);
46
- }
47
- }
48
-
49
- @for $i from 0 through $bpk-grid-columns {
50
- &--tablet-#{$i} {
51
- @include bpk-grid__column--tablet-($i);
52
- }
53
- }
54
-
55
- @for $i from 0 through $bpk-grid-columns {
56
- &--offset-tablet-#{$i} {
57
- @include bpk-grid__column--offset-tablet-($i);
58
- }
59
- }
60
-
61
- @for $i from 0 through $bpk-grid-columns {
62
- &--mobile-#{$i} {
63
- @include bpk-grid__column--mobile-($i);
64
- }
65
- }
66
-
67
- @for $i from 0 through $bpk-grid-columns {
68
- &--offset-mobile-#{$i} {
69
- @include bpk-grid__column--offset-mobile-($i);
70
- }
71
- }
72
- }
73
- }
@@ -1,62 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import PropTypes from 'prop-types';
20
- import React from 'react';
21
-
22
- import { cssModules } from '../../bpk-react-utils';
23
-
24
- import STYLES from './BpkGridContainer.module.scss';
25
-
26
- const getClassName = cssModules(STYLES);
27
-
28
- const BpkGridContainer = (props) => {
29
- const { children, className, debug, fullWidth, ...rest } = props;
30
- const classNames = [getClassName('bpk-grid__container')];
31
-
32
- if (debug) {
33
- classNames.push(getClassName('bpk-grid__container--debug'));
34
- }
35
- if (fullWidth) {
36
- classNames.push(getClassName('bpk-grid__container--full-width'));
37
- }
38
- if (className) {
39
- classNames.push(className);
40
- }
41
-
42
- return (
43
- <div className={classNames.join(' ')} {...rest}>
44
- {children}
45
- </div>
46
- );
47
- };
48
-
49
- BpkGridContainer.propTypes = {
50
- children: PropTypes.node.isRequired,
51
- debug: PropTypes.bool,
52
- fullWidth: PropTypes.bool,
53
- className: PropTypes.string,
54
- };
55
-
56
- BpkGridContainer.defaultProps = {
57
- debug: false,
58
- fullWidth: false,
59
- className: null,
60
- };
61
-
62
- export default BpkGridContainer;
@@ -1,18 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-grid__container{max-width:71.25rem;margin:0 auto;padding-right:.75rem;padding-left:.75rem}@media (min-width: 50.3125rem){.bpk-grid__container{padding-right:1.5rem;padding-left:1.5rem}}.bpk-grid__container--debug{background-color:#f1f2f8}.bpk-grid__container--full-width{max-width:100%}
@@ -1,33 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- @import '~bpk-mixins/index.scss';
20
-
21
- .bpk-grid {
22
- &__container {
23
- @include bpk-grid__container;
24
-
25
- &--debug {
26
- @include bpk-grid__container--debug;
27
- }
28
-
29
- &--full-width {
30
- @include bpk-grid__container--full-width;
31
- }
32
- }
33
- }
@@ -1,57 +0,0 @@
1
- /*
2
- * Backpack - Skyscanner's Design System
3
- *
4
- * Copyright 2016 Skyscanner Ltd
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import PropTypes from 'prop-types';
20
- import React from 'react';
21
-
22
- import { cssModules } from '../../bpk-react-utils';
23
-
24
- import STYLES from './BpkGridRow.module.scss';
25
-
26
- const getClassName = cssModules(STYLES);
27
-
28
- const BpkGridRow = (props) => {
29
- const classNames = [getClassName('bpk-grid__row')];
30
- const { children, className, padded, ...rest } = props;
31
-
32
- if (padded) {
33
- classNames.push(getClassName('bpk-grid__row--padded'));
34
- }
35
- if (className) {
36
- classNames.push(className);
37
- }
38
-
39
- return (
40
- <div className={classNames.join(' ')} {...rest}>
41
- {children}
42
- </div>
43
- );
44
- };
45
-
46
- BpkGridRow.propTypes = {
47
- children: PropTypes.node.isRequired,
48
- padded: PropTypes.bool,
49
- className: PropTypes.string,
50
- };
51
-
52
- BpkGridRow.defaultProps = {
53
- padded: true,
54
- className: null,
55
- };
56
-
57
- export default BpkGridRow;