@skyscanner/backpack-web 37.10.0 → 38.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.
@@ -17,10 +17,9 @@
17
17
  */import BpkIconMarker from "./src/BpkIconMarker";
18
18
  import BpkMap from "./src/BpkMap";
19
19
  import BpkOverlayView from "./src/BpkOverlayView";
20
- import BpkPriceMarker, { PRICE_MARKER_STATUSES } from "./src/BpkPriceMarker";
21
- import { BpkPriceMarkerV2 } from "./src/BpkPriceMarkerV2/BpkPriceMarker";
22
- import BpkPriceMarkerButton, { MARKER_STATUSES } from "./src/BpkPriceMarkerV2/BpkPriceMarkerButton";
20
+ import BpkPriceMarker from "./src/BpkPriceMarker";
21
+ import BpkPriceMarkerButton, { MARKER_STATUSES } from "./src/BpkPriceMarkerButton";
23
22
  import { defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes } from "./src/themeAttributes";
24
23
  import withGoogleMapsScript from "./src/withGoogleMapsScript";
25
24
  export default BpkMap;
26
- export { BpkIconMarker, BpkPriceMarker, BpkPriceMarkerV2, BpkOverlayView, withGoogleMapsScript, defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes, PRICE_MARKER_STATUSES, MARKER_STATUSES, BpkPriceMarkerButton };
25
+ export { BpkIconMarker, BpkPriceMarker, BpkOverlayView, withGoogleMapsScript, defaultIconMarkerThemeAttributes, priceMarkerThemeAttributes, MARKER_STATUSES, BpkPriceMarkerButton };
@@ -6,5 +6,5 @@ type Props = {
6
6
  longitude: number;
7
7
  };
8
8
  } & BpkPriceMarkerButtonProps;
9
- export declare const BpkPriceMarkerV2: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
- export {};
9
+ declare const BpkPriceMarker: (props: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export default BpkPriceMarker;
@@ -14,75 +14,38 @@
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
- */import PropTypes from 'prop-types';
18
- import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
19
- import { cssModules } from "../../bpk-react-utils";
17
+ */
18
+
20
19
  import BpkBasicMapMarker from "./BpkBasicMapMarker";
21
- import { LatLongPropType } from "./common-types";
22
- import STYLES from "./BpkPriceMarker.module.css";
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- const getClassName = cssModules(STYLES);
25
- export const PRICE_MARKER_STATUSES = {
26
- default: 'default',
27
- focused: 'focused',
28
- viewed: 'viewed'
29
- };
20
+ import BpkPriceMarkerButton, { MARKER_STATUSES } from "./BpkPriceMarkerButton";
21
+ import { jsx as _jsx } from "react/jsx-runtime";
30
22
  const BpkPriceMarker = props => {
31
23
  const {
32
- arrowClassName,
24
+ accessibilityLabel,
33
25
  buttonProps,
34
26
  className,
35
- disabled,
27
+ icon,
36
28
  label,
37
29
  onClick,
38
30
  position,
39
- status,
31
+ status = MARKER_STATUSES.unselected,
40
32
  ...rest
41
33
  } = props;
42
- const markerWrapperClassNames = getClassName('bpk-price-marker__wrapper');
43
- const classNames = getClassName('bpk-price-marker', `bpk-price-marker-${status}`, onClick && 'bpk-price-marker--dynamic', className, disabled && `bpk-price-marker-disabled`);
44
- const arrowClassNames = getClassName('bpk-price-marker__arrow', `bpk-price-marker__arrow-${status}`, arrowClassName, disabled && `bpk-price-marker__arrow-disabled`);
45
- return (
46
- /*#__PURE__*/
47
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
48
- _jsx(BpkBasicMapMarker, {
49
- position: position,
50
- ...rest,
51
- children: /*#__PURE__*/_jsxs("button", {
52
- type: "button",
53
- className: markerWrapperClassNames,
54
- onClick: onClick,
55
- disabled: disabled,
56
- ...buttonProps,
57
- children: [/*#__PURE__*/_jsx("span", {
58
- className: classNames,
59
- children: /*#__PURE__*/_jsx(BpkText, {
60
- textStyle: status === PRICE_MARKER_STATUSES.focused ? TEXT_STYLES.label1 : TEXT_STYLES.label2,
61
- children: label
62
- })
63
- }), /*#__PURE__*/_jsx("div", {
64
- className: arrowClassNames
65
- })]
66
- })
34
+ const allButtonProps = {
35
+ className,
36
+ icon,
37
+ label,
38
+ onClick,
39
+ status,
40
+ buttonProps
41
+ };
42
+ return /*#__PURE__*/_jsx(BpkBasicMapMarker, {
43
+ position: position,
44
+ "aria-label": accessibilityLabel,
45
+ ...rest,
46
+ children: /*#__PURE__*/_jsx(BpkPriceMarkerButton, {
47
+ ...allButtonProps
67
48
  })
68
- );
69
- };
70
- BpkPriceMarker.propTypes = {
71
- label: PropTypes.string.isRequired,
72
- position: LatLongPropType.isRequired,
73
- arrowClassName: PropTypes.string,
74
- className: PropTypes.string,
75
- onClick: PropTypes.func,
76
- disabled: PropTypes.bool,
77
- status: PropTypes.oneOf(Object.keys(PRICE_MARKER_STATUSES)),
78
- buttonProps: PropTypes.object // eslint-disable-line react/forbid-prop-types
79
- };
80
- BpkPriceMarker.defaultProps = {
81
- className: null,
82
- arrowClassName: null,
83
- onClick: null,
84
- disabled: false,
85
- status: PRICE_MARKER_STATUSES.default,
86
- buttonProps: null
49
+ });
87
50
  };
88
51
  export default BpkPriceMarker;
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import BpkText, { TEXT_STYLES } from "../../../bpk-component-text";
20
- import { cssModules } from "../../../bpk-react-utils";
19
+ import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
20
+ import { cssModules } from "../../bpk-react-utils";
21
21
  import STYLES from "./BpkPriceMarkerButton.module.css";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
23
  const getClassName = cssModules(STYLES);
@@ -0,0 +1,2 @@
1
+ import BpkPanel from './src/BpkPanel';
2
+ export default BpkPanel;
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ export type Props = {
3
+ children: ReactNode;
4
+ padded?: boolean;
5
+ fullWidth?: boolean;
6
+ className?: string | null;
7
+ keyline?: boolean;
8
+ [rest: string]: any;
9
+ };
10
+ declare const BpkPanel: ({ children, className, fullWidth, keyline, padded, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export default BpkPanel;
@@ -16,26 +16,32 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import PropTypes from 'prop-types';
20
19
  import { cssModules } from "../../bpk-react-utils";
21
20
  import STYLES from "./BpkPanel.module.css";
22
21
  import { jsx as _jsx } from "react/jsx-runtime";
23
22
  const getClassName = cssModules(STYLES);
24
- const BpkPanel = props => {
23
+ const BpkPanel = ({
24
+ children,
25
+ className = null,
26
+ fullWidth = false,
27
+ keyline = true,
28
+ padded = true,
29
+ ...rest
30
+ }) => {
25
31
  const classNames = [getClassName('bpk-panel')];
26
- const {
27
- children,
28
- className,
29
- fullWidth,
30
- padded,
31
- ...rest
32
- } = props;
33
32
  if (padded) {
34
33
  classNames.push(getClassName('bpk-panel--padded'));
35
34
  }
36
35
  if (fullWidth) {
37
36
  classNames.push(getClassName('bpk-panel--full-width'));
38
37
  }
38
+ if (keyline) {
39
+ if (fullWidth) {
40
+ classNames.push(getClassName('bpk-panel--full-width-keyline'));
41
+ } else {
42
+ classNames.push(getClassName('bpk-panel--keyline'));
43
+ }
44
+ }
39
45
  if (className) {
40
46
  classNames.push(className);
41
47
  }
@@ -45,15 +51,4 @@ const BpkPanel = props => {
45
51
  children: children
46
52
  });
47
53
  };
48
- BpkPanel.propTypes = {
49
- children: PropTypes.node.isRequired,
50
- padded: PropTypes.bool,
51
- fullWidth: PropTypes.bool,
52
- className: PropTypes.string
53
- };
54
- BpkPanel.defaultProps = {
55
- padded: true,
56
- fullWidth: false,
57
- className: null
58
- };
59
54
  export default BpkPanel;
@@ -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
- .bpk-panel{display:block;background-color:#fff;box-shadow:0 0 0 1px #c1c7cf inset;border-radius:.75rem}.bpk-panel--padded{padding:1rem}.bpk-panel--full-width{border-radius:0;box-shadow:#c1c7cf 0 -0.0625rem 0 0 inset,#c1c7cf 0 .0625rem 0 0 inset}
18
+ .bpk-panel{display:block;background-color:#fff;border-radius:.75rem}.bpk-panel--padded{padding:1rem}.bpk-panel--full-width{border-radius:0}.bpk-panel--keyline{box-shadow:0 0 0 1px #c1c7cf inset}.bpk-panel--full-width-keyline{box-shadow:#c1c7cf 0 -0.0625rem 0 0 inset,#c1c7cf 0 .0625rem 0 0 inset}
@@ -1,4 +1,3 @@
1
- import PropTypes from 'prop-types';
2
1
  import type { ReactNode } from 'react';
3
2
  import { RATING_SIZES, RATING_SCALES } from './common-types';
4
3
  type ValueOf<T> = T[keyof T];
@@ -11,26 +10,7 @@ type Props = {
11
10
  subtitle?: string;
12
11
  title?: string | ReactNode;
13
12
  value: string | number;
13
+ [rest: string]: any;
14
14
  };
15
- declare const BpkRating: {
16
- (props: Props): import("react/jsx-runtime").JSX.Element;
17
- propTypes: {
18
- ariaLabel: PropTypes.Validator<string>;
19
- value: PropTypes.Validator<NonNullable<NonNullable<string | number | null | undefined>>>;
20
- className: PropTypes.Requireable<string>;
21
- ratingScale: PropTypes.Requireable<string>;
22
- size: PropTypes.Requireable<string>;
23
- subtitle: PropTypes.Requireable<string>;
24
- showScale: PropTypes.Requireable<boolean>;
25
- title: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
26
- };
27
- defaultProps: {
28
- className: null;
29
- ratingScale: "zeroToFive";
30
- size: "base";
31
- subtitle: null;
32
- showScale: boolean;
33
- title: null;
34
- };
35
- };
15
+ declare const BpkRating: ({ ariaLabel, className, ratingScale, showScale, size, subtitle, title, value, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
36
16
  export default BpkRating;
@@ -16,7 +16,6 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import PropTypes from 'prop-types';
20
19
  import clamp from 'lodash.clamp';
21
20
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
22
21
  import { cssModules } from "../../bpk-react-utils";
@@ -37,18 +36,17 @@ const getMaxValue = ratingScale => {
37
36
  return 10;
38
37
  }
39
38
  };
40
- const BpkRating = props => {
41
- const {
42
- ariaLabel,
43
- className,
44
- ratingScale,
45
- showScale,
46
- size,
47
- subtitle,
48
- title,
49
- value,
50
- ...rest
51
- } = props;
39
+ const BpkRating = ({
40
+ ariaLabel,
41
+ className,
42
+ ratingScale = RATING_SCALES.zeroToFive,
43
+ showScale = true,
44
+ size = RATING_SIZES.base,
45
+ subtitle = undefined,
46
+ title = null,
47
+ value,
48
+ ...rest
49
+ }) => {
52
50
  const classNames = getClassName('bpk-rating', className, size === RATING_SIZES.large && title && subtitle && 'bpk-rating--large');
53
51
  const valueStyles = getClassName('bpk-rating__value');
54
52
  const scaleStyles = getClassName('bpk-rating__scale');
@@ -96,42 +94,24 @@ const BpkRating = props => {
96
94
  })]
97
95
  }), /*#__PURE__*/_jsxs("div", {
98
96
  className: textWrapperStyles,
99
- children: [title && /*#__PURE__*/_jsx(BpkText, {
100
- textStyle: titleTextSize,
101
- tagName: "span",
102
- "aria-hidden": "true",
103
- children: /*#__PURE__*/_jsx("span", {
104
- className: titleStyles,
97
+ children: [title && /*#__PURE__*/_jsx("span", {
98
+ className: titleStyles,
99
+ children: /*#__PURE__*/_jsx(BpkText, {
100
+ textStyle: titleTextSize,
101
+ tagName: "span",
102
+ "aria-hidden": "true",
105
103
  children: title
106
104
  })
107
- }), subtitle && /*#__PURE__*/_jsx(BpkText, {
108
- textStyle: subtitleTextSize,
109
- tagName: "span",
110
- "aria-hidden": "true",
111
- children: /*#__PURE__*/_jsx("span", {
112
- className: subtitleStyles,
105
+ }), subtitle && /*#__PURE__*/_jsx("span", {
106
+ className: subtitleStyles,
107
+ children: /*#__PURE__*/_jsx(BpkText, {
108
+ textStyle: subtitleTextSize,
109
+ tagName: "span",
110
+ "aria-hidden": "true",
113
111
  children: subtitle
114
112
  })
115
113
  })]
116
114
  })]
117
115
  });
118
116
  };
119
- BpkRating.propTypes = {
120
- ariaLabel: PropTypes.string.isRequired,
121
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
122
- className: PropTypes.string,
123
- ratingScale: PropTypes.oneOf(Object.keys(RATING_SCALES)),
124
- size: PropTypes.oneOf(Object.keys(RATING_SIZES)),
125
- subtitle: PropTypes.string,
126
- showScale: PropTypes.bool,
127
- title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
128
- };
129
- BpkRating.defaultProps = {
130
- className: null,
131
- ratingScale: RATING_SCALES.zeroToFive,
132
- size: RATING_SIZES.base,
133
- subtitle: null,
134
- showScale: true,
135
- title: null
136
- };
137
117
  export default BpkRating;
@@ -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
- .bpk-rating{display:flex;flex-flow:row nowrap;align-items:baseline}.bpk-rating--large{align-items:center}.bpk-rating__value{padding-inline-end:.5rem}.bpk-rating__text-wrapper{display:flex;flex-direction:row;align-items:baseline;white-space:nowrap}.bpk-rating__text-wrapper--large{padding-top:.0625rem;flex-direction:column;align-items:flex-start}.bpk-rating__scale{color:#626971}.bpk-rating__title--with-subtitle{padding-right:.5rem}html[dir=rtl] .bpk-rating__title--with-subtitle{padding-right:0;padding-left:.5rem}.bpk-rating__subtitle{color:#626971}
18
+ .bpk-rating{display:flex;flex-flow:row nowrap;align-items:baseline}.bpk-rating--large{align-items:center}.bpk-rating__value{padding-inline-end:.5rem}.bpk-rating__text-wrapper{display:flex;min-width:0;flex-direction:row;align-items:baseline;white-space:nowrap}.bpk-rating__text-wrapper--large{padding-top:.0625rem;flex-direction:column;align-items:flex-start}.bpk-rating__scale{color:#626971}.bpk-rating__title--with-subtitle{padding-right:.5rem}html[dir=rtl] .bpk-rating__title--with-subtitle{padding-right:0;padding-left:.5rem}.bpk-rating__subtitle{min-width:0;max-width:100%;flex:1 1 auto;color:#626971;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
@@ -39,8 +39,9 @@ type Props = {
39
39
  textStyle?: TextStyle;
40
40
  tagName?: Tag;
41
41
  className?: string | null;
42
+ color?: string | null;
42
43
  id?: string;
43
44
  [rest: string]: any;
44
45
  };
45
- declare const BpkText: ({ children, className, tagName: TagName, textStyle, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
46
+ declare const BpkText: ({ children, className, color, tagName: TagName, textStyle, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
46
47
  export default BpkText;
@@ -56,18 +56,30 @@ export const TEXT_STYLES = {
56
56
  const BpkText = ({
57
57
  children,
58
58
  className = null,
59
+ color = null,
59
60
  tagName: TagName = 'span',
60
61
  textStyle = TEXT_STYLES.bodyDefault,
61
62
  ...rest
62
63
  }) => {
63
64
  const classNames = getClassName('bpk-text', `bpk-text--${textStyle}`, className);
65
+ const {
66
+ style,
67
+ ...otherProps
68
+ } = rest;
69
+ const computedStyles = {
70
+ ...style,
71
+ ...(color ? {
72
+ color
73
+ } : {})
74
+ };
64
75
  return (
65
76
  /*#__PURE__*/
66
77
  // Allowed, TagName is always a dom element.
67
78
  // eslint-disable-next-line @skyscanner/rules/forbid-component-props
68
79
  _jsx(TagName, {
69
80
  className: classNames,
70
- ...rest,
81
+ style: computedStyles,
82
+ ...otherProps,
71
83
  children: children
72
84
  })
73
85
  );
@@ -36,7 +36,6 @@
36
36
  display: block;
37
37
  background-color: $bpk-card-background-color;
38
38
 
39
- @include bpk-border-sm($bpk-panel-border-color);
40
39
  @include bpk-border-radius-md;
41
40
  }
42
41
 
@@ -53,7 +52,21 @@
53
52
  padding: $bpk-card-padding;
54
53
  }
55
54
 
56
- /// Makes panel full width by removing left and right border.
55
+ /// Controls if we have a keyline or not on the panel
56
+ /// Modifies the bpk-panel mixin.
57
+ ///
58
+ /// @require {mixin} bpk-panel
59
+ ///
60
+ /// @example scss
61
+ /// .selector {
62
+ /// @include bpk-panel();
63
+ /// @include bpk-panel--keyline();
64
+ /// }
65
+ @mixin bpk-panel--keyline {
66
+ @include bpk-border-sm($bpk-panel-border-color);
67
+ }
68
+
69
+ /// Makes panel full width by removing the border radius
57
70
  /// Modifies the bpk-panel mixin.
58
71
  ///
59
72
  /// @require {mixin} bpk-panel
@@ -65,6 +78,18 @@
65
78
  /// }
66
79
  @mixin bpk-panel--full-width {
67
80
  border-radius: 0;
81
+ }
82
+
83
+ /// Sets the keyline to only show on the top and bottom when full
84
+ ///
85
+ /// @require {mixin} bpk-panel
86
+ ///
87
+ /// @example scss
88
+ /// .selector {
89
+ /// @include bpk-panel();
90
+ /// @include bpk-panel--full-width-keyline();
91
+ /// }
92
+ @mixin bpk-panel--full-width-keyline {
68
93
  box-shadow:
69
94
  $bpk-panel-border-color 0 -1 * $bpk-one-pixel-rem 0 0 inset,
70
95
  $bpk-panel-border-color 0 $bpk-one-pixel-rem 0 0 inset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "37.10.0",
3
+ "version": "38.0.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,9 +31,9 @@
31
31
  "@skyscanner/bpk-svgs": "^20.6.0",
32
32
  "a11y-focus-scope": "^1.1.3",
33
33
  "a11y-focus-store": "^1.0.0",
34
- "d3-path": "^2.0.0",
34
+ "d3-path": "^3.1.0",
35
35
  "d3-scale": "^4.0.2",
36
- "intersection-observer": "^0.7.0",
36
+ "intersection-observer": "^0.12.2",
37
37
  "lodash": "^4.17.20",
38
38
  "lodash.clamp": "^4.0.3",
39
39
  "lodash.debounce": "^4.0.8",
@@ -36,7 +36,6 @@
36
36
  display: block;
37
37
  background-color: tokens.$bpk-card-background-color;
38
38
 
39
- @include borders.bpk-border-sm(tokens.$bpk-panel-border-color);
40
39
  @include radii.bpk-border-radius-md;
41
40
  }
42
41
 
@@ -53,7 +52,21 @@
53
52
  padding: tokens.$bpk-card-padding;
54
53
  }
55
54
 
56
- /// Makes panel full width by removing left and right border.
55
+ /// Controls if we have a keyline or not on the panel
56
+ /// Modifies the bpk-panel mixin.
57
+ ///
58
+ /// @require {mixin} bpk-panel
59
+ ///
60
+ /// @example scss
61
+ /// .selector {
62
+ /// @include bpk-panel();
63
+ /// @include bpk-panel--keyline();
64
+ /// }
65
+ @mixin bpk-panel--keyline {
66
+ @include borders.bpk-border-sm(tokens.$bpk-panel-border-color);
67
+ }
68
+
69
+ /// Makes panel full width by removing the border radius
57
70
  /// Modifies the bpk-panel mixin.
58
71
  ///
59
72
  /// @require {mixin} bpk-panel
@@ -65,6 +78,18 @@
65
78
  /// }
66
79
  @mixin bpk-panel--full-width {
67
80
  border-radius: 0;
81
+ }
82
+
83
+ /// Sets the keyline to only show on the top and bottom when full
84
+ ///
85
+ /// @require {mixin} bpk-panel
86
+ ///
87
+ /// @example scss
88
+ /// .selector {
89
+ /// @include bpk-panel();
90
+ /// @include bpk-panel--full-width-keyline();
91
+ /// }
92
+ @mixin bpk-panel--full-width-keyline {
68
93
  box-shadow:
69
94
  tokens.$bpk-panel-border-color 0 -1 * tokens.$bpk-one-pixel-rem 0 0 inset,
70
95
  tokens.$bpk-panel-border-color 0 tokens.$bpk-one-pixel-rem 0 0 inset;
@@ -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
- .bpk-price-marker{display:flex;padding:.125rem .5rem;justify-content:center;align-items:center;border:3px solid;border-radius:.5rem}.bpk-price-marker--dynamic{cursor:pointer}.bpk-price-marker-default{color:#fff;border-color:#0062e3;border-color:var(--bpk-price-marker-background-color, rgb(0, 98, 227));background-color:#0062e3;background-color:var(--bpk-price-marker-background-color, rgb(0, 98, 227))}.bpk-price-marker-viewed{color:hsla(0,0%,100%,.8);color:var(--bpk-price-marker-viewed-color, rgba(255, 255, 255, 0.8));border-color:#0062e3;border-color:var(--bpk-price-marker-viewed-border-color, rgb(0, 98, 227));background-color:#0062e3;background-color:var(--bpk-price-marker-viewed-background-color, rgb(0, 98, 227))}.bpk-price-marker-focused{padding:.375rem .5rem;background-color:#fff;border-color:#0062e3;border-color:var(--bpk-price-marker-selected-border-color, rgb(0, 98, 227));color:#0062e3;color:var(--bpk-price-marker-selected-color, rgb(0, 98, 227))}.bpk-price-marker-disabled{z-index:-2;border-color:#fff;background-color:#fff;color:rgba(0,0,0,.2)}.bpk-price-marker__wrapper{position:relative;display:flex;padding:0;flex-direction:column;align-items:center;transform:translate(calc(-50% - 3px), calc(-100% - 3px - 1rem / 2));border:none;background:none}.bpk-price-marker__arrow{position:absolute;top:50%;z-index:-1;width:1rem;height:1rem;transform:rotate(45deg);border-radius:25%;background-color:#0062e3}.bpk-price-marker__arrow-default{background-color:#0062e3;background-color:var(--bpk-price-marker-background-color, rgb(0, 98, 227))}.bpk-price-marker__arrow-viewed{background-color:#0062e3;background-color:var(--bpk-price-marker-viewed-border-color, rgb(0, 98, 227))}.bpk-price-marker__arrow-focused{top:75%;background-color:#0062e3;background-color:var(--bpk-price-marker-selected-border-color, rgb(0, 98, 227))}.bpk-price-marker__arrow-disabled{top:75%;z-index:-3;background-color:#fff}
@@ -1,51 +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 BpkBasicMapMarker from "../BpkBasicMapMarker";
20
- import BpkPriceMarkerButton, { MARKER_STATUSES } from "./BpkPriceMarkerButton";
21
- import { jsx as _jsx } from "react/jsx-runtime";
22
- // eslint-disable-next-line import/prefer-default-export
23
- export const BpkPriceMarkerV2 = props => {
24
- const {
25
- accessibilityLabel,
26
- buttonProps,
27
- className,
28
- icon,
29
- label,
30
- onClick,
31
- position,
32
- status = MARKER_STATUSES.unselected,
33
- ...rest
34
- } = props;
35
- const allButtonProps = {
36
- className,
37
- icon,
38
- label,
39
- onClick,
40
- status,
41
- buttonProps
42
- };
43
- return /*#__PURE__*/_jsx(BpkBasicMapMarker, {
44
- position: position,
45
- "aria-label": accessibilityLabel,
46
- ...rest,
47
- children: /*#__PURE__*/_jsx(BpkPriceMarkerButton, {
48
- ...allButtonProps
49
- })
50
- });
51
- };