@skyscanner/backpack-web 41.10.0 → 41.11.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bpk-component-accordion/src/BpkAccordion.js +2 -1
- package/bpk-component-accordion/src/BpkAccordionItem.js +2 -1
- package/bpk-component-aria-live/src/BpkAriaLive.js +2 -1
- package/bpk-component-autosuggest/src/BpkAutosuggestV2/BpkAutosuggest.js +2 -1
- package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +14 -5
- package/bpk-component-breakpoint/src/BpkBreakpoint.js +2 -2
- package/bpk-component-breakpoint/src/useMediaQuery.js +27 -14
- package/bpk-component-bubble/src/BpkBubble.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarDate.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarGrid.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarGridTransition.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarNav.js +2 -1
- package/bpk-component-calendar/src/BpkCalendarWeek.js +2 -1
- package/bpk-component-card-list/src/BpkCardList.js +3 -0
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListCarousel.js +15 -30
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListCarousel.module.css +1 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/BpkCardListRowRailContainer.js +14 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/constants.d.ts +1 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/constants.js +1 -1
- package/bpk-component-card-list/src/BpkCardListRowRail/utils.d.ts +25 -8
- package/bpk-component-card-list/src/BpkCardListRowRail/utils.js +118 -35
- package/bpk-component-card-list/src/common-types.d.ts +3 -0
- package/bpk-component-chip/src/BpkDismissibleChip.js +3 -2
- package/bpk-component-chip/src/BpkDropdownChip.js +2 -0
- package/bpk-component-chip/src/BpkIconChip.js +2 -0
- package/bpk-component-chip/src/BpkSelectableChip.js +2 -1
- package/bpk-component-chip-group/src/BpkMultiSelectChipGroup.js +2 -1
- package/bpk-component-chip-group/src/BpkStickyChip.js +2 -1
- package/bpk-component-content-cards/src/BpkContentCard.module.css +1 -1
- package/bpk-component-input/src/withOpenEvents.d.ts +11 -12
- package/bpk-component-input/src/withOpenEvents.js +3 -3
- package/bpk-component-map/src/BpkBasicMapMarker.js +3 -0
- package/bpk-component-map/src/BpkPriceMarker.js +2 -0
- package/bpk-component-nudger/src/BpkNudger.js +2 -2
- package/bpk-component-panel/index.d.ts +2 -0
- package/bpk-component-panel/index.js +1 -0
- package/bpk-component-panel/src/BpkPanel.d.ts +14 -1
- package/bpk-component-panel/src/BpkPanel.js +4 -1
- package/bpk-component-panel/src/BpkPanel.module.css +1 -1
- package/bpk-component-price-range/src/BpkPriceMarker.js +2 -1
- package/bpk-component-price-range/src/BpkPriceRange.js +2 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +2 -1
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +2 -1
- package/bpk-component-tooltip/src/BpkTooltip.js +2 -1
- package/bpk-mixins/_index.scss +1 -0
- package/bpk-mixins/_surfaces.scss +52 -0
- package/bpk-react-utils/index.d.ts +13 -1
- package/bpk-react-utils/index.js +4 -2
- package/bpk-react-utils/src/surfaceColors.d.ts +11 -0
- package/bpk-react-utils/src/surfaceColors.js +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
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';
|
|
22
|
+
|
|
23
|
+
////
|
|
24
|
+
/// @group surfaces
|
|
25
|
+
////
|
|
26
|
+
|
|
27
|
+
// Keys must stay in sync with bpk-react-utils/src/surfaceColors.ts
|
|
28
|
+
$bpk-surface-bg-colors: (
|
|
29
|
+
'surface-default': tokens.$bpk-surface-default-day,
|
|
30
|
+
'surface-elevated': tokens.$bpk-surface-elevated-day,
|
|
31
|
+
'surface-hero': tokens.$bpk-surface-hero-day,
|
|
32
|
+
'surface-contrast': tokens.$bpk-surface-contrast-day,
|
|
33
|
+
'surface-highlight': tokens.$bpk-surface-highlight-day,
|
|
34
|
+
'surface-subtle': tokens.$bpk-surface-subtle-day,
|
|
35
|
+
'surface-low-contrast': tokens.$bpk-surface-low-contrast-day,
|
|
36
|
+
'surface-tint': tokens.$bpk-surface-tint-day,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
/// Generates background-color modifier classes for all surface colors.
|
|
40
|
+
///
|
|
41
|
+
/// @example scss
|
|
42
|
+
/// .bpk-panel {
|
|
43
|
+
/// @include bpk-surface-bg-colors;
|
|
44
|
+
/// }
|
|
45
|
+
|
|
46
|
+
@mixin bpk-surface-bg-colors {
|
|
47
|
+
@each $color-name, $color-value in $bpk-surface-bg-colors {
|
|
48
|
+
&--#{$color-name} {
|
|
49
|
+
background-color: $color-value;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -7,9 +7,11 @@ import { isDeviceIphone, isDeviceIpad, isDeviceIos } from './src/deviceDetection
|
|
|
7
7
|
import { getDataComponentAttribute } from './src/getDataComponentAttribute';
|
|
8
8
|
import isRTL from './src/isRTL';
|
|
9
9
|
import { setNativeValue } from './src/nativeEventHandler';
|
|
10
|
+
import { SURFACE_COLORS } from './src/surfaceColors';
|
|
10
11
|
import withDefaultProps from './src/withDefaultProps';
|
|
11
12
|
import wrapDisplayName from './src/wrapDisplayName';
|
|
12
|
-
export {
|
|
13
|
+
export type { SurfaceBgColor } from './src/surfaceColors';
|
|
14
|
+
export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, BpkDialogWrapper, setNativeValue, getDataComponentAttribute, SURFACE_COLORS, };
|
|
13
15
|
declare const _default: {
|
|
14
16
|
Portal: typeof Portal;
|
|
15
17
|
TransitionInitialMount: ({ appearActiveClassName, appearClassName, children, transitionTimeout, }: {
|
|
@@ -43,5 +45,15 @@ declare const _default: {
|
|
|
43
45
|
getDataComponentAttribute: (componentName: string) => {
|
|
44
46
|
"data-backpack-ds-component": string;
|
|
45
47
|
};
|
|
48
|
+
SURFACE_COLORS: {
|
|
49
|
+
readonly surfaceDefault: "surface-default";
|
|
50
|
+
readonly surfaceElevated: "surface-elevated";
|
|
51
|
+
readonly surfaceHero: "surface-hero";
|
|
52
|
+
readonly surfaceContrast: "surface-contrast";
|
|
53
|
+
readonly surfaceHighlight: "surface-highlight";
|
|
54
|
+
readonly surfaceSubtle: "surface-subtle";
|
|
55
|
+
readonly surfaceLowContrast: "surface-low-contrast";
|
|
56
|
+
readonly surfaceTint: "surface-tint";
|
|
57
|
+
};
|
|
46
58
|
};
|
|
47
59
|
export default _default;
|
package/bpk-react-utils/index.js
CHANGED
|
@@ -26,9 +26,10 @@ import { isDeviceIphone, isDeviceIpad, isDeviceIos } from "./src/deviceDetection
|
|
|
26
26
|
import { getDataComponentAttribute } from "./src/getDataComponentAttribute";
|
|
27
27
|
import isRTL from "./src/isRTL";
|
|
28
28
|
import { setNativeValue } from "./src/nativeEventHandler";
|
|
29
|
+
import { SURFACE_COLORS } from "./src/surfaceColors";
|
|
29
30
|
import withDefaultProps from "./src/withDefaultProps";
|
|
30
31
|
import wrapDisplayName from "./src/wrapDisplayName";
|
|
31
|
-
export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, BpkDialogWrapper, setNativeValue, getDataComponentAttribute };
|
|
32
|
+
export { Portal, TransitionInitialMount, cssModules, deprecated, withDefaultProps, wrapDisplayName, isDeviceIphone, isDeviceIpad, isDeviceIos, isRTL, BpkDialogWrapper, setNativeValue, getDataComponentAttribute, SURFACE_COLORS };
|
|
32
33
|
export default {
|
|
33
34
|
Portal,
|
|
34
35
|
TransitionInitialMount,
|
|
@@ -42,5 +43,6 @@ export default {
|
|
|
42
43
|
isRTL,
|
|
43
44
|
BpkDialogWrapper,
|
|
44
45
|
setNativeValue,
|
|
45
|
-
getDataComponentAttribute
|
|
46
|
+
getDataComponentAttribute,
|
|
47
|
+
SURFACE_COLORS
|
|
46
48
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const SURFACE_COLORS: {
|
|
2
|
+
readonly surfaceDefault: "surface-default";
|
|
3
|
+
readonly surfaceElevated: "surface-elevated";
|
|
4
|
+
readonly surfaceHero: "surface-hero";
|
|
5
|
+
readonly surfaceContrast: "surface-contrast";
|
|
6
|
+
readonly surfaceHighlight: "surface-highlight";
|
|
7
|
+
readonly surfaceSubtle: "surface-subtle";
|
|
8
|
+
readonly surfaceLowContrast: "surface-low-contrast";
|
|
9
|
+
readonly surfaceTint: "surface-tint";
|
|
10
|
+
};
|
|
11
|
+
export type SurfaceBgColor = (typeof SURFACE_COLORS)[keyof typeof SURFACE_COLORS];
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
// Values must stay in sync with bpk-mixins/_surfaces.scss
|
|
20
|
+
export const SURFACE_COLORS = {
|
|
21
|
+
surfaceDefault: 'surface-default',
|
|
22
|
+
surfaceElevated: 'surface-elevated',
|
|
23
|
+
surfaceHero: 'surface-hero',
|
|
24
|
+
surfaceContrast: 'surface-contrast',
|
|
25
|
+
surfaceHighlight: 'surface-highlight',
|
|
26
|
+
surfaceSubtle: 'surface-subtle',
|
|
27
|
+
surfaceLowContrast: 'surface-low-contrast',
|
|
28
|
+
surfaceTint: 'surface-tint'
|
|
29
|
+
};
|