@skyscanner/backpack-web 31.10.0 → 32.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 (184) hide show
  1. package/bpk-component-accordion/src/BpkAccordion.module.css +2 -2
  2. package/bpk-component-accordion/src/BpkAccordionItem.module.css +2 -2
  3. package/bpk-component-aria-live/src/BpkAriaLive.module.css +2 -2
  4. package/bpk-component-autosuggest/src/BpkAutosuggest.module.css +2 -2
  5. package/bpk-component-badge/index.js +1 -3
  6. package/bpk-component-badge/src/BpkBadge.module.css +2 -2
  7. package/bpk-component-banner-alert/src/BpkAnimateAndFade.module.css +2 -2
  8. package/bpk-component-banner-alert/src/BpkBannerAlert.module.css +2 -2
  9. package/bpk-component-barchart/src/BpkBarchart.module.css +2 -2
  10. package/bpk-component-barchart/src/BpkBarchartBar.module.css +2 -2
  11. package/bpk-component-barchart/src/BpkChartAxis.module.css +2 -2
  12. package/bpk-component-barchart/src/BpkChartDataTable.module.css +2 -2
  13. package/bpk-component-barchart/src/BpkChartGridLines.module.css +2 -2
  14. package/bpk-component-blockquote/src/BpkBlockquote.module.css +2 -2
  15. package/bpk-component-boilerplate/src/BpkBoilerplate.module.css +2 -2
  16. package/bpk-component-bottom-sheet/src/BpkBottomSheet.module.css +2 -2
  17. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.module.css +2 -2
  18. package/bpk-component-breadcrumb/src/BpkBreadcrumb.module.css +2 -2
  19. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +2 -2
  20. package/bpk-component-button/src/BpkButtonBase.module.css +2 -2
  21. package/bpk-component-button/src/BpkButtonDestructive.module.css +2 -2
  22. package/bpk-component-button/src/BpkButtonFeatured.module.css +2 -2
  23. package/bpk-component-button/src/BpkButtonLink.module.css +2 -2
  24. package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +2 -2
  25. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +2 -2
  26. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +2 -2
  27. package/bpk-component-button/src/BpkButtonSecondary.module.css +2 -2
  28. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +2 -2
  29. package/bpk-component-button/src/BpkButtonV2/BpkButton.module.css +2 -2
  30. package/bpk-component-calendar/src/BpkCalendar.module.css +2 -2
  31. package/bpk-component-calendar/src/BpkCalendarDate.module.css +2 -2
  32. package/bpk-component-calendar/src/BpkCalendarGrid.module.css +2 -2
  33. package/bpk-component-calendar/src/BpkCalendarGridHeader.module.css +2 -2
  34. package/bpk-component-calendar/src/BpkCalendarGridTransition.module.css +2 -2
  35. package/bpk-component-calendar/src/BpkCalendarNav.module.css +2 -2
  36. package/bpk-component-card/src/BpkCard.module.css +2 -2
  37. package/bpk-component-card/src/BpkCardWrapper.module.css +2 -2
  38. package/bpk-component-card/src/BpkDividedCard.module.css +2 -2
  39. package/bpk-component-card-button/src/BpkSaveButton.module.css +2 -2
  40. package/bpk-component-checkbox/src/BpkCheckbox.module.css +2 -2
  41. package/bpk-component-chip/src/BpkSelectableChip.module.css +2 -2
  42. package/bpk-component-close-button/src/BpkCloseButton.module.css +2 -2
  43. package/bpk-component-code/src/BpkCode.module.css +2 -2
  44. package/bpk-component-code/src/BpkCodeBlock.module.css +2 -2
  45. package/bpk-component-content-cards/src/BpkContentCard.module.css +2 -2
  46. package/bpk-component-content-cards/src/BpkContentCards.module.css +2 -2
  47. package/bpk-component-datatable/index.js +3 -2
  48. package/bpk-component-datatable/src/BpkDataTable.js +38 -103
  49. package/bpk-component-datatable/src/BpkDataTable.module.css +2 -2
  50. package/bpk-component-datatable/src/BpkDataTableHeader.js +22 -2
  51. package/bpk-component-datatable/src/BpkDataTableHeader.module.css +2 -2
  52. package/bpk-component-datatable/src/common-types.js +22 -0
  53. package/bpk-component-datatable/src/utils.js +14 -148
  54. package/bpk-component-datepicker/src/BpkDatepicker.module.css +2 -2
  55. package/bpk-component-description-list/src/BpkDescriptionList.module.css +2 -2
  56. package/bpk-component-dialog/src/BpkDialog.module.css +2 -2
  57. package/bpk-component-dialog/src/BpkDialogInner.module.css +2 -2
  58. package/bpk-component-drawer/src/BpkDrawer.module.css +2 -2
  59. package/bpk-component-drawer/src/BpkDrawerContent.module.css +2 -2
  60. package/bpk-component-fieldset/src/BpkFieldset.module.css +2 -2
  61. package/bpk-component-flare/src/bpk-content-bubble.module.css +2 -2
  62. package/bpk-component-flare/src/bpk-flare-bar.module.css +2 -2
  63. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +2 -2
  64. package/bpk-component-form-validation/src/BpkFormValidation.module.css +2 -2
  65. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +2 -2
  66. package/bpk-component-grid-toggle/src/BpkGridToggle.module.css +2 -2
  67. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +2 -2
  68. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.css +2 -2
  69. package/bpk-component-icon/src/BpkIcon.module.css +2 -2
  70. package/bpk-component-icon/src/withDescription.module.css +2 -2
  71. package/bpk-component-image/src/BpkBackgroundImage.module.css +2 -2
  72. package/bpk-component-image/src/BpkImage.module.css +2 -2
  73. package/bpk-component-infinite-scroll/src/withInfiniteScroll.module.css +2 -2
  74. package/bpk-component-info-banner/src/BpkAnimateAndFade.module.css +2 -2
  75. package/bpk-component-info-banner/src/BpkInfoBanner.module.css +2 -2
  76. package/bpk-component-input/src/BpkClearButton.module.css +2 -2
  77. package/bpk-component-input/src/BpkInput.module.css +2 -2
  78. package/bpk-component-label/src/BpkLabel.module.css +2 -2
  79. package/bpk-component-link/src/BpkLink.module.css +2 -2
  80. package/bpk-component-list/src/BpkList.module.css +2 -2
  81. package/bpk-component-loading-button/src/BpkLoadingButton.module.css +2 -2
  82. package/bpk-component-map/src/BpkIconMarker.module.css +2 -2
  83. package/bpk-component-map/src/BpkIconMarkerBackground.module.css +2 -2
  84. package/bpk-component-map/src/BpkMap.module.css +2 -2
  85. package/bpk-component-map/src/BpkPriceMarker.module.css +2 -2
  86. package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.module.css +2 -2
  87. package/bpk-component-map/src/DefaultLoadingElement.module.css +2 -2
  88. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.css +2 -2
  89. package/bpk-component-modal/src/BpkModal.module.css +2 -2
  90. package/bpk-component-modal/src/BpkModalInner.module.css +2 -2
  91. package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +2 -2
  92. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.css +2 -2
  93. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.css +2 -2
  94. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.css +2 -2
  95. package/bpk-component-nudger/src/BpkNudger.module.css +2 -2
  96. package/bpk-component-overlay/src/BpkOverlay.module.css +2 -2
  97. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +2 -2
  98. package/bpk-component-pagination/src/BpkPagination.module.css +2 -2
  99. package/bpk-component-pagination/src/BpkPaginationList.module.css +2 -2
  100. package/bpk-component-pagination/src/BpkPaginationNudger.module.css +2 -2
  101. package/bpk-component-pagination/src/BpkPaginationPage.module.css +2 -2
  102. package/bpk-component-panel/src/BpkPanel.module.css +2 -2
  103. package/bpk-component-phone-input/src/BpkPhoneInput.module.css +2 -2
  104. package/bpk-component-popover/src/BpkPopover.module.css +2 -2
  105. package/bpk-component-price/src/BpkPrice.module.css +2 -2
  106. package/bpk-component-progress/src/BpkProgress.module.css +2 -2
  107. package/bpk-component-radio/src/BpkRadio.module.css +2 -2
  108. package/bpk-component-rating/src/BpkRating.module.css +2 -2
  109. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.module.css +2 -2
  110. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.css +2 -2
  111. package/bpk-component-section-header/src/BpkSectionHeader.module.css +2 -2
  112. package/bpk-component-section-list/src/BpkSectionListItem.module.css +2 -2
  113. package/bpk-component-section-list/src/BpkSectionListSection.module.css +2 -2
  114. package/bpk-component-select/src/BpkSelect.module.css +2 -2
  115. package/bpk-component-skip-link/src/BpkSkipLink.module.css +2 -2
  116. package/bpk-component-slider/src/BpkSlider.module.css +2 -2
  117. package/bpk-component-spinner/src/BpkSpinner.module.css +2 -2
  118. package/bpk-component-split-input/src/BpkInputField.module.css +2 -2
  119. package/bpk-component-split-input/src/BpkSplitInput.module.css +2 -2
  120. package/bpk-component-star-rating/src/BpkInteractiveStar.module.css +2 -2
  121. package/bpk-component-star-rating/src/BpkStar.module.css +2 -2
  122. package/bpk-component-star-rating/src/BpkStarRating.module.css +2 -2
  123. package/bpk-component-swap-button/src/BpkSwapButton.js +2 -2
  124. package/bpk-component-swap-button/src/BpkSwapButton.module.css +2 -2
  125. package/bpk-component-switch/src/BpkSwitch.module.css +2 -2
  126. package/bpk-component-table/src/BpkTable.module.css +2 -2
  127. package/bpk-component-text/src/BpkText.module.css +2 -2
  128. package/bpk-component-textarea/src/BpkTextarea.module.css +2 -2
  129. package/bpk-component-theme-toggle/src/BpkThemeToggle.module.css +2 -2
  130. package/bpk-component-ticket/src/BpkTicket.module.css +2 -2
  131. package/bpk-component-tooltip/src/BpkTooltip.module.css +2 -2
  132. package/bpk-mixins/{src/mixins/_badges-v2.scss → _badges-v2.scss} +3 -1
  133. package/bpk-mixins/{src/mixins/_badges.scss → _badges.scss} +13 -9
  134. package/bpk-mixins/{src/mixins/_borders.scss → _borders.scss} +11 -9
  135. package/bpk-mixins/{src/mixins/_breakpoints.scss → _breakpoints.scss} +3 -1
  136. package/bpk-mixins/{src/mixins/_buttons.scss → _buttons.scss} +7 -4
  137. package/bpk-mixins/{src/mixins/_cards.scss → _cards.scss} +6 -1
  138. package/bpk-mixins/{src/mixins/_chips.scss → _chips.scss} +8 -0
  139. package/bpk-mixins/{src/mixins/_forms.scss → _forms.scss} +5 -1
  140. package/bpk-mixins/_icons.scss +88 -0
  141. package/bpk-mixins/_index.scss +20 -17
  142. package/bpk-mixins/{src/mixins/_layers.scss → _layers.scss} +18 -15
  143. package/bpk-mixins/{src/mixins/_margins.scss → _margins.scss} +4 -0
  144. package/bpk-mixins/{src/mixins/_panels.scss → _panels.scss} +6 -2
  145. package/bpk-mixins/{src/mixins/_radii.scss → _radii.scss} +3 -1
  146. package/bpk-mixins/{src/mixins/_scroll-indicators.scss → _scroll-indicators.scss} +3 -1
  147. package/bpk-mixins/{src/mixins/_shadows.scss → _shadows.scss} +3 -1
  148. package/bpk-mixins/{src/mixins/_svgs.scss → _spinners.scss} +5 -68
  149. package/bpk-mixins/{src/_bonds.scss → _tokens.scss} +2 -0
  150. package/bpk-mixins/{src/mixins/_typography.scss → _typography.scss} +6 -2
  151. package/bpk-mixins/{src/mixins/_utils.scss → _utils.scss} +4 -0
  152. package/bpk-scrim-utils/src/bpk-scrim-content.module.css +2 -2
  153. package/bpk-scrim-utils/src/bpk-scrim.module.css +2 -2
  154. package/bpk-stylesheets/base.css +1 -2
  155. package/bpk-stylesheets/font.css +2 -2
  156. package/bpk-stylesheets/index.scss +18 -14
  157. package/bpk-stylesheets/normalize.css +422 -0
  158. package/package.json +15 -2
  159. package/unstable__bpk-mixins/_badges-v2.scss +240 -0
  160. package/unstable__bpk-mixins/_badges.scss +240 -0
  161. package/unstable__bpk-mixins/_borders.scss +268 -0
  162. package/unstable__bpk-mixins/_breakpoints.scss +221 -0
  163. package/unstable__bpk-mixins/_buttons.scss +568 -0
  164. package/unstable__bpk-mixins/_cards.scss +94 -0
  165. package/unstable__bpk-mixins/_chips.scss +240 -0
  166. package/unstable__bpk-mixins/_forms.scss +1049 -0
  167. package/unstable__bpk-mixins/_icons.scss +88 -0
  168. package/{bpk-mixins/sass-functions.js → unstable__bpk-mixins/_index.scss} +19 -10
  169. package/unstable__bpk-mixins/_layers.scss +199 -0
  170. package/unstable__bpk-mixins/_margins.scss +75 -0
  171. package/unstable__bpk-mixins/_panels.scss +71 -0
  172. package/unstable__bpk-mixins/_radii.scss +80 -0
  173. package/unstable__bpk-mixins/_scroll-indicators.scss +79 -0
  174. package/unstable__bpk-mixins/_shadows.scss +58 -0
  175. package/unstable__bpk-mixins/_spinners.scss +102 -0
  176. package/{bpk-component-datatable/src/sort-types.js → unstable__bpk-mixins/_tokens.scss} +3 -6
  177. package/unstable__bpk-mixins/_typography.scss +1039 -0
  178. package/unstable__bpk-mixins/_utils.scss +266 -0
  179. package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.d.ts +0 -22
  180. package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.js +0 -47
  181. package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.module.css +0 -18
  182. package/bpk-component-datatable/src/BpkDataTableColumn.js +0 -54
  183. package/bpk-component-datatable/src/BpkDataTableColumn.module.css +0 -18
  184. package/bpk-component-datatable/src/hasChildrenOfType.js +0 -35
@@ -0,0 +1,102 @@
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 at-rule-disallowed-list */
20
+
21
+ @use 'tokens.scss';
22
+ @use 'icons.scss';
23
+ @use 'utils.scss';
24
+
25
+ @keyframes bpk-keyframe-spin {
26
+ 100% {
27
+ transform: rotate(1turn);
28
+ }
29
+ }
30
+
31
+ /// Small spinner.
32
+ ///
33
+ /// @param {key} $spinner - The key of the desired SVG datauri from the $bpk-spinners map.
34
+ ///
35
+ /// @example scss
36
+ /// .selector {
37
+ /// @include bpk-spinner(spinner-sky-gray-tint-02);
38
+ /// }
39
+
40
+ @mixin bpk-spinner() {
41
+ width: tokens.bpk-spacing-base();
42
+ height: tokens.bpk-spacing-base();
43
+ animation: bpk-keyframe-spin 600ms linear infinite;
44
+ }
45
+
46
+ /// Large spinner. Modifies the bpk-spinner mixin.
47
+ ///
48
+ /// @require {mixin} bpk-spinner
49
+ ///
50
+ /// @example scss
51
+ /// .selector {
52
+ /// @include bpk-spinner(spinner-sky-gray-tint-02);
53
+ /// @include bpk-spinner--lg();
54
+ /// }
55
+
56
+ @mixin bpk-spinner--lg() {
57
+ width: tokens.bpk-spacing-lg();
58
+ height: tokens.bpk-spacing-lg();
59
+ }
60
+
61
+ /// Extra large spinner. Modifies the bpk-spinner mixin.
62
+ ///
63
+ /// @require {mixin} bpk-spinner
64
+ ///
65
+ /// @example scss
66
+ /// .selector {
67
+ /// @include bpk-spinner(spinner-sky-gray-tint-02);
68
+ /// @include bpk-spinner--xl();
69
+ /// }
70
+
71
+ @mixin bpk-spinner--xl() {
72
+ width: tokens.bpk-spacing-xl();
73
+ height: tokens.bpk-spacing-xl();
74
+ }
75
+
76
+ /// Align spinner to button. Modifies the bpk-spinner mixin.
77
+ ///
78
+ /// @require {mixin} bpk-spinner
79
+ ///
80
+ /// @example scss
81
+ /// .selector {
82
+ /// @include bpk-spinner();
83
+ /// @include bpk-icon--align-to-button();
84
+ /// }
85
+
86
+ @mixin bpk-spinner--align-to-button() {
87
+ vertical-align: baseline;
88
+ }
89
+
90
+ /// Align spinner to large button. Modifies the bpk-spinner mixin.
91
+ ///
92
+ /// @require {mixin} bpk-spinner
93
+ ///
94
+ /// @example scss
95
+ /// .selector {
96
+ /// @include bpk-spinner();
97
+ /// @include bpk-spinner--align-to-large-button();
98
+ /// }
99
+
100
+ @mixin bpk-spinner--align-to-large-button() {
101
+ @include icons.bpk-icon-lg--align-to-large-button;
102
+ }
@@ -14,9 +14,6 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */ // This file exists to break a cycle that would otherwise happen between
18
- // BpkDataTableColumn.js and common-types.js
19
- export const SORT_DIRECTION_TYPES = {
20
- ASC: 'ASC',
21
- DESC: 'DESC'
22
- };
17
+ */
18
+
19
+ @forward '@skyscanner/bpk-foundations-web/tokens/base.default';