@skyscanner/backpack-web 28.0.0 → 28.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
4
  export default (({
4
5
  styles = {},
5
6
  ...props
6
- }) => /*#__PURE__*/_jsx("svg", {
7
+ }) => /*#__PURE__*/_jsxs("svg", {
7
8
  xmlns: "http://www.w3.org/2000/svg",
8
9
  viewBox: "0 0 24 24",
9
10
  "aria-hidden": "true",
@@ -12,7 +13,11 @@ export default (({
12
13
  height: "1.5rem"
13
14
  },
14
15
  ...props,
15
- children: /*#__PURE__*/_jsx("path", {
16
- d: "M12 2a10 10 0 1010 10A10 10 0 0012 2zm3.962 6.748l-3.038 7.9a.55.55 0 01-.932.159.535.535 0 01-.082-.151l-.97-2.467a2 2 0 00-1.13-1.13l-2.466-.97a.535.535 0 01-.15-.081.55.55 0 01.158-.931l7.9-3.04v.001a.55.55 0 01.71.71z"
17
- })
16
+ children: [/*#__PURE__*/_jsx("path", {
17
+ d: "M12 2c5.523 0 10 4.477 10 10 0 .472-.033.936-.096 1.39a6 6 0 00-6.33-3.32.87.87 0 00-.437-.336 4.407 4.407 0 00-1.496.032c-.501.02-1.108-.208-1.173-.706l-.007-.077-.003-.079c-.005-.15-.01-.3-.124-.384a.423.423 0 00-.391-.001 10.48 10.48 0 00-1.473.871c-.436.302-.984.38-1.482.221l-.148-.055.053-.968.068-.068c.12-.096.286-.132.458-.155l.32-.04c.212-.035.388-.1.43-.3a1.664 1.664 0 00-.021-.361c-.004-.312.241-.503.536-.67l.454-.245c.295-.167.54-.359.539-.67a1.962 1.962 0 00-.189-.583 1.521 1.521 0 01.497-1.495 8 8 0 00.016 16h.027a6.007 6.007 0 002.515 1.673C13.731 21.887 12.88 22 12 22 6.477 22 2 17.523 2 12S6.477 2 12 2z"
18
+ }), /*#__PURE__*/_jsx("path", {
19
+ d: "M10.5 16c0 .31.023.613.069.91a.834.834 0 01-.088-.033l-.1-.051c-.122-.067-.197-.109-.52.017a1.99 1.99 0 01-2.162-.706 4.283 4.283 0 01-.804-2.258c.006-.261.086-.516.23-.733.047-.094.159-.18.286-.26l.196-.117c.114-.065.22-.127.29-.186l.13-.11c.444-.376.78-.66.93-1.2l.043-.19L11 11l.243.088c.494.16 1.02.205 1.557.188A5.99 5.99 0 0010.5 16zM9.77 5.38c-.138.021-.29.238-.436.487l-.27.468c-.07.117-.137.214-.198.27a.173.173 0 00-.067.098c0 .03.01.06.026.085l.301.35.461-.195c.31-.123.625-.234.943-.333-.01.003-.027-.025-.048-.074l-.153-.406-.09-.22c-.127-.29-.288-.556-.47-.53z"
20
+ }), /*#__PURE__*/_jsx("path", {
21
+ d: "M16.5 21a5 5 0 113.963-1.951l2.244 2.244a1 1 0 01-1.414 1.414l-2.346-2.346A4.978 4.978 0 0116.5 21zm0-2a3 3 0 100-6 3 3 0 000 6z"
22
+ })]
18
23
  }));
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
4
  export default (({
4
5
  styles = {},
5
6
  ...props
6
- }) => /*#__PURE__*/_jsx("svg", {
7
+ }) => /*#__PURE__*/_jsxs("svg", {
7
8
  xmlns: "http://www.w3.org/2000/svg",
8
9
  viewBox: "0 0 24 24",
9
10
  "aria-hidden": "true",
@@ -12,7 +13,11 @@ export default (({
12
13
  height: "1rem"
13
14
  },
14
15
  ...props,
15
- children: /*#__PURE__*/_jsx("path", {
16
- d: "M12 1.5A10.5 10.5 0 1022.5 12 10.5 10.5 0 0012 1.5zm4.16 7.085l-3.19 8.295a.577.577 0 01-.978.167.563.563 0 01-.086-.158l-1.019-2.59a2.1 2.1 0 00-1.186-1.186l-2.59-1.019a.564.564 0 01-.158-.086.577.577 0 01.167-.978l8.295-3.19a.577.577 0 01.745.745z"
17
- })
16
+ children: [/*#__PURE__*/_jsx("path", {
17
+ d: "M12 1.5c5.799 0 10.5 4.701 10.5 10.5 0 .887-.11 1.748-.317 2.57a6.003 6.003 0 00-6.276-4.041c.055-.35-.236-.79-.614-.908a4.627 4.627 0 00-1.57.033c-.479.02-1.049-.177-1.2-.606l-.032-.136-.007-.08-.008-.176c-.007-.124-.03-.24-.126-.31a.444.444 0 00-.41-.002c-.54.263-1.057.57-1.547.916a1.78 1.78 0 01-1.521.242l-.19-.068.056-1.017.08-.079a.786.786 0 01.325-.13l.125-.022.287-.036c.254-.034.473-.092.522-.325a1.742 1.742 0 00-.022-.378c-.003-.273.175-.458.413-.614l.124-.075.529-.287.123-.075c.239-.156.418-.34.417-.613a2.06 2.06 0 00-.199-.612 1.6 1.6 0 01-.038-.291v-.145l.026-.214-.097.007-.327.035a7.501 7.501 0 00.257 14.903 6.018 6.018 0 003.288 2.717c-.823.207-1.684.317-2.571.317-5.799 0-10.5-4.701-10.5-10.5S6.201 1.5 12 1.5z"
18
+ }), /*#__PURE__*/_jsx("path", {
19
+ d: "M11.27 11.063c.781.235 1.635.21 2.489.098a6 6 0 00-3.222 6.005.908.908 0 01-.106-.035l-.072-.032-.113-.06c-.102-.052-.202-.067-.493.046a2.09 2.09 0 01-2.269-.742 4.497 4.497 0 01-.844-2.37c.006-.275.09-.542.242-.77.044-.088.143-.17.26-.248l.121-.075.24-.14.104-.065.084-.063.305-.258c.377-.326.663-.613.803-1.097l.051-.22 2.1-.087.32.113zM9.658 5.05c.175-.026.331.207.46.482l.053.12.108.273.113.304.026.062.028.045c.004.004.008.005.01.004-.334.104-.664.22-.99.35l-.484.204-.316-.367-.02-.042-.008-.047.027-.058.11-.118.07-.096.072-.114.321-.555.086-.135c.114-.17.227-.297.334-.312z"
20
+ }), /*#__PURE__*/_jsx("path", {
21
+ d: "M16.5 21a4.48 4.48 0 002.286-.623l2.168 2.169a1.125 1.125 0 001.591-1.591l-2.168-2.169A4.5 4.5 0 1016.5 21zm0-2.25a2.25 2.25 0 110-4.5 2.25 2.25 0 010 4.5z"
22
+ })]
18
23
  }));
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-icon-marker__wrapper{position:relative;z-index:1;padding:1rem .8125rem;border:none;background:none}.bpk-icon-marker__wrapper--selected{z-index:2;padding:1rem 1rem}.bpk-icon-marker__icon{position:absolute;top:0.3rem;left:.3125rem;color:#fff}.bpk-icon-marker__icon>svg{fill:currentcolor}.bpk-icon-marker__icon--interactive{cursor:pointer}.bpk-icon-marker__icon--disabled{color:#0c838a;color:var(--bpk-icon-marker-default-disabled-color, #0c838a)}.bpk-icon-marker__icon--selected{top:0.5rem;left:.5rem;color:#0c838a;color:var(--bpk-icon-marker-default-selected-color, #0c838a)}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-icon-marker__wrapper{position:absolute;top:-32px;left:-13px;z-index:1;padding:16px 13px;border:none;background:none}.bpk-icon-marker__wrapper--selected{top:-40px;left:-16px;z-index:2;padding:20px 16px}.bpk-icon-marker__icon{position:absolute;top:4.8px;left:5px;color:#fff}.bpk-icon-marker__icon>svg{position:absolute;width:16px !important;height:16px !important;fill:currentcolor}.bpk-icon-marker__icon--interactive{cursor:pointer}.bpk-icon-marker__icon--disabled{color:#0c838a;color:var(--bpk-icon-marker-default-disabled-color, #0c838a)}.bpk-icon-marker__icon--selected{top:8px;left:8px;color:#0c838a;color:var(--bpk-icon-marker-default-selected-color, #0c838a)}
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-price-marker{display:flex;padding:0.1875rem 0.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, #0062e3);background-color:#0062e3;background-color:var(--bpk-price-marker-background-color, #0062e3)}.bpk-price-marker-viewed{color:rgba(255,255,255,0.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, #0062e3);background-color:#0062e3;background-color:var(--bpk-price-marker-viewed-background-color, #0062e3)}.bpk-price-marker-focused{padding:0.375rem 0.5rem;background-color:#fff;border-color:#0062e3;border-color:var(--bpk-price-marker-selected-border-color, #0062e3);color:#0062e3;color:var(--bpk-price-marker-selected-color, #0062e3)}.bpk-price-marker-disabled{z-index:-2;border-color:#fff;background-color:#fff;color:rgba(0,0,0,0.2)}.bpk-price-marker__wrapper{position:relative;display:flex;flex-direction:column;align-items:center;border:none;background:none}.bpk-price-marker__arrow{position:absolute;top:1.3rem;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, #0062e3)}.bpk-price-marker__arrow-viewed{background-color:#0062e3;background-color:var(--bpk-price-marker-viewed-border-color, #0062e3)}.bpk-price-marker__arrow-focused{top:1.8rem;background-color:#0062e3;background-color:var(--bpk-price-marker-selected-border-color, #0062e3)}.bpk-price-marker__arrow-disabled{z-index:-3;background-color:#fff}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-price-marker{display:flex;padding:.125rem 0.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, #0062e3);background-color:#0062e3;background-color:var(--bpk-price-marker-background-color, #0062e3)}.bpk-price-marker-viewed{color:rgba(255,255,255,0.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, #0062e3);background-color:#0062e3;background-color:var(--bpk-price-marker-viewed-background-color, #0062e3)}.bpk-price-marker-focused{padding:0.375rem 0.5rem;background-color:#fff;border-color:#0062e3;border-color:var(--bpk-price-marker-selected-border-color, #0062e3);color:#0062e3;color:var(--bpk-price-marker-selected-color, #0062e3)}.bpk-price-marker-disabled{z-index:-2;border-color:#fff;background-color:#fff;color:rgba(0,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, #0062e3)}.bpk-price-marker__arrow-viewed{background-color:#0062e3;background-color:var(--bpk-price-marker-viewed-border-color, #0062e3)}.bpk-price-marker__arrow-focused{top:75%;background-color:#0062e3;background-color:var(--bpk-price-marker-selected-border-color, #0062e3)}.bpk-price-marker__arrow-disabled{top:75%;z-index:-3;background-color:#fff}
@@ -26,6 +26,7 @@ const BpkPrice = props => {
26
26
  const {
27
27
  align,
28
28
  className,
29
+ leadingClassName,
29
30
  leadingText,
30
31
  previousPrice,
31
32
  price,
@@ -41,7 +42,7 @@ const BpkPrice = props => {
41
42
  ,
42
43
  ...rest,
43
44
  children: [/*#__PURE__*/_jsxs("div", {
44
- className: getClassName(previousPrice && 'bpk-price__leading', isAlignRight && 'bpk-price__leading--right'),
45
+ className: getClassName(previousPrice && 'bpk-price__leading', isAlignRight && 'bpk-price__leading--right', leadingClassName),
45
46
  children: [previousPrice && /*#__PURE__*/_jsx(BpkText, {
46
47
  className: getClassName('bpk-price__previous-price'),
47
48
  textStyle: isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm,
@@ -80,7 +81,8 @@ BpkPrice.propTypes = {
80
81
  className: PropTypes.string,
81
82
  leadingText: PropTypes.string,
82
83
  trailingText: PropTypes.string,
83
- previousPrice: PropTypes.string
84
+ previousPrice: PropTypes.string,
85
+ leadingClassName: PropTypes.string
84
86
  };
85
87
  BpkPrice.defaultProps = {
86
88
  size: SIZES.small,
@@ -88,6 +90,7 @@ BpkPrice.defaultProps = {
88
90
  className: null,
89
91
  leadingText: null,
90
92
  trailingText: null,
91
- previousPrice: null
93
+ previousPrice: null,
94
+ leadingClassName: null
92
95
  };
93
96
  export default BpkPrice;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "28.0.0",
3
+ "version": "28.1.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "@popperjs/core": "^2.11.5",
26
26
  "@react-google-maps/api": "^2.12.0",
27
27
  "@skyscanner/bpk-foundations-web": "^17.0.0",
28
- "@skyscanner/bpk-svgs": "^18.0.0",
28
+ "@skyscanner/bpk-svgs": "^18.1.0",
29
29
  "a11y-focus-scope": "^1.1.3",
30
30
  "a11y-focus-store": "^1.0.0",
31
31
  "d3-path": "^2.0.0",
package/index.css DELETED
File without changes