@skyscanner/backpack-web 41.1.0 → 41.3.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 (66) hide show
  1. package/bpk-component-autosuggest/index.js +2 -2
  2. package/bpk-component-autosuggest/src/BpkAutosuggestV2/BpkAutosuggest.d.ts +13 -0
  3. package/bpk-component-autosuggest/src/BpkAutosuggestV2/BpkAutosuggest.js +3 -3
  4. package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +3 -2
  5. package/bpk-component-button/src/BpkButtonV2/BpkButton.module.css +1 -1
  6. package/bpk-component-card-list/src/BpkCardList.js +2 -2
  7. package/bpk-component-card-list/src/BpkCardListGridStack/BpkCardListGridStack.js +2 -2
  8. package/bpk-component-card-list/src/BpkExpand/ExpandAccessoryContent.js +2 -2
  9. package/bpk-component-chip-group/src/Nudger.js +2 -2
  10. package/bpk-component-drawer/src/BpkDrawerContent.js +3 -2
  11. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +2 -2
  12. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.js +2 -2
  13. package/bpk-component-grid-toggle/src/BpkGridToggle.js +3 -2
  14. package/bpk-component-icon/lg/baggage-cabin-included-tick.js +14 -0
  15. package/bpk-component-icon/lg/baggage-cabin-not-included-cross.js +14 -0
  16. package/bpk-component-icon/lg/baggage-cabin-uncertain.js +14 -0
  17. package/bpk-component-icon/lg/baggage-checked-included-tick.js +14 -0
  18. package/bpk-component-icon/lg/baggage-checked-not-included-cross.js +14 -0
  19. package/bpk-component-icon/lg/baggage-checked-uncertain.js +14 -0
  20. package/bpk-component-icon/lg/vdl-cars.js +14 -0
  21. package/bpk-component-icon/lg/vdl-flight.js +14 -0
  22. package/bpk-component-icon/lg/vdl-home-beach.js +14 -0
  23. package/bpk-component-icon/lg/vdl-home-cars.js +14 -0
  24. package/bpk-component-icon/lg/vdl-home-flight.js +14 -0
  25. package/bpk-component-icon/lg/vdl-home-hotels.js +14 -0
  26. package/bpk-component-icon/lg/vdl-hotels.js +14 -0
  27. package/bpk-component-icon/lg/vdl-tab-drops-selected.js +16 -0
  28. package/bpk-component-icon/lg/vdl-tab-drops.js +16 -0
  29. package/bpk-component-icon/lg/vdl-tab-profile-selected.js +14 -0
  30. package/bpk-component-icon/lg/vdl-tab-profile.js +14 -0
  31. package/bpk-component-icon/lg/vdl-tab-saved-selected.js +17 -0
  32. package/bpk-component-icon/lg/vdl-tab-saved.js +17 -0
  33. package/bpk-component-icon/lg/vdl-tab-search-selected.js +14 -0
  34. package/bpk-component-icon/lg/vdl_tab-search.js +14 -0
  35. package/bpk-component-icon/lg/walk.js +14 -0
  36. package/bpk-component-icon/sm/baggage-cabin-included-tick.js +14 -0
  37. package/bpk-component-icon/sm/baggage-cabin-not-included-cross.js +14 -0
  38. package/bpk-component-icon/sm/baggage-cabin-uncertain.js +14 -0
  39. package/bpk-component-icon/sm/baggage-checked-included-tick.js +14 -0
  40. package/bpk-component-icon/sm/baggage-checked-not-included-cross.js +14 -0
  41. package/bpk-component-icon/sm/baggage-checked-uncertain.js +14 -0
  42. package/bpk-component-icon/sm/vdl-cars.js +14 -0
  43. package/bpk-component-icon/sm/vdl-flight.js +14 -0
  44. package/bpk-component-icon/sm/vdl-hotels.js +14 -0
  45. package/bpk-component-icon/sm/walk.js +14 -0
  46. package/bpk-component-link/index.d.ts +12 -3
  47. package/bpk-component-link/index.js +10 -1
  48. package/bpk-component-link/src/BpkButtonLink.d.ts +8 -0
  49. package/bpk-component-link/src/BpkButtonLink.js +10 -0
  50. package/bpk-component-link/src/BpkLink.d.ts +2 -15
  51. package/bpk-component-link/src/BpkLink.js +85 -40
  52. package/bpk-component-link/src/common-types.d.ts +44 -0
  53. package/bpk-component-link/src/common-types.js +1 -0
  54. package/bpk-component-loading-button/src/BpkLoadingButton.js +2 -2
  55. package/bpk-component-modal/src/BpkModalInner.js +3 -2
  56. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.d.ts +4 -5
  57. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +3 -2
  58. package/bpk-component-nudger/src/BpkNudger.js +3 -3
  59. package/bpk-component-page-indicator/src/NavButton.js +2 -2
  60. package/bpk-component-pagination/src/BpkPaginationNudger.js +2 -2
  61. package/bpk-component-popover/src/BpkPopover.js +7 -4
  62. package/bpk-component-price/src/BpkPrice.js +3 -0
  63. package/bpk-component-price/src/common-types.js +1 -0
  64. package/bpk-component-rtl-toggle/src/BpkRtlToggle.js +3 -2
  65. package/bpk-component-snippet/src/BpkSnippet.js +2 -2
  66. package/package.json +3 -3
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import PropTypes from 'prop-types';
20
- import { BpkButtonV2, BUTTON_TYPES } from "../../bpk-component-button";
20
+ import BpkButton, { BUTTON_TYPES } from "../../bpk-component-button";
21
21
  import { withRtlSupport, withButtonAlignment } from "../../bpk-component-icon";
22
22
  import ArrowLeftIcon from "../../bpk-component-icon/sm/arrow-left";
23
23
  import ArrowRightIcon from "../../bpk-component-icon/sm/arrow-right";
@@ -37,7 +37,7 @@ const BpkPaginationNudger = props => {
37
37
  } = props;
38
38
  return /*#__PURE__*/_jsx("div", {
39
39
  className: getClassName('bpk-pagination-nudger'),
40
- children: /*#__PURE__*/_jsxs(BpkButtonV2, {
40
+ children: /*#__PURE__*/_jsxs(BpkButton, {
41
41
  type: BUTTON_TYPES.link,
42
42
  onClick: onNudge,
43
43
  disabled: disabled,
@@ -22,7 +22,7 @@ import { surfaceHighlightDay } from '@skyscanner/bpk-foundations-web/tokens/base
22
22
 
23
23
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
24
  import BpkCloseButton from "../../bpk-component-close-button";
25
- import { BpkButtonLink } from "../../bpk-component-link";
25
+ import BpkLink from "../../bpk-component-link";
26
26
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
27
27
  import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
28
28
  import { ARROW_ID } from "./constants";
@@ -179,7 +179,8 @@ const BpkPopover = ({
179
179
  setIsOpenState(false);
180
180
  },
181
181
  ...closeButtonProps
182
- }) : closeButtonText && /*#__PURE__*/_jsx(BpkButtonLink, {
182
+ }) : closeButtonText && /*#__PURE__*/_jsx(BpkLink, {
183
+ as: "button",
183
184
  onClick: event => {
184
185
  bindEventSource(EVENT_SOURCES.CLOSE_LINK, onClose, event);
185
186
  setIsOpenState(false);
@@ -196,13 +197,15 @@ const BpkPopover = ({
196
197
  children: children
197
198
  }), actionText && onAction && /*#__PURE__*/_jsx("div", {
198
199
  className: getClassName('bpk-popover__action'),
199
- children: /*#__PURE__*/_jsx(BpkButtonLink, {
200
+ children: /*#__PURE__*/_jsx(BpkLink, {
201
+ as: "button",
200
202
  onClick: onAction,
201
203
  children: actionText
202
204
  })
203
205
  }), !labelAsTitle && closeButtonText && /*#__PURE__*/_jsx("footer", {
204
206
  className: getClassName('bpk-popover__footer'),
205
- children: /*#__PURE__*/_jsx(BpkButtonLink, {
207
+ children: /*#__PURE__*/_jsx(BpkLink, {
208
+ as: "button",
206
209
  onClick: event => {
207
210
  bindEventSource(EVENT_SOURCES.CLOSE_LINK, onClose, event);
208
211
  setIsOpenState(false);
@@ -25,6 +25,9 @@ const getPriceTextStyle = size => {
25
25
  if (size === SIZES.small) {
26
26
  return TEXT_STYLES.heading4;
27
27
  }
28
+ if (size === SIZES.medium) {
29
+ return TEXT_STYLES.heading3;
30
+ }
28
31
  if (size === SIZES.large) {
29
32
  return TEXT_STYLES.xxl;
30
33
  }
@@ -17,6 +17,7 @@
17
17
  */export const SIZES = {
18
18
  xsmall: 'xsmall',
19
19
  small: 'small',
20
+ medium: 'medium',
20
21
  large: 'large'
21
22
  };
22
23
  export const ALIGNS = {
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import { Component } from 'react';
20
- import { BpkButtonLink } from "../../bpk-component-link";
20
+ import BpkLink from "../../bpk-component-link";
21
21
  import { getHtmlElement, DIRECTIONS, DIRECTION_CHANGE_EVENT } from "./utils";
22
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
23
  const getDirection = () => {
@@ -59,7 +59,8 @@ class BpkRtlToggle extends Component {
59
59
  };
60
60
  render() {
61
61
  const onOrOff = this.state.direction === DIRECTIONS.RTL ? 'off' : 'on';
62
- return /*#__PURE__*/_jsxs(BpkButtonLink, {
62
+ return /*#__PURE__*/_jsxs(BpkLink, {
63
+ as: "button",
63
64
  title: "Keyboard Shortcut: ctrl + cmd + r",
64
65
  onClick: this.toggleRtl,
65
66
  children: ["RTL ", onOrOff]
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import BpkBreakpoint, { BREAKPOINTS } from "../../bpk-component-breakpoint";
20
- import { BpkButtonV2, BUTTON_TYPES } from "../../bpk-component-button";
20
+ import BpkButton, { BUTTON_TYPES } from "../../bpk-component-button";
21
21
  import BpkImage, { BORDER_RADIUS_STYLES, withLazyLoading } from "../../bpk-component-image";
22
22
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text/src/BpkText";
23
23
  import { cssModules } from "../../bpk-react-utils";
@@ -120,7 +120,7 @@ const BpkSnippet = ({
120
120
  textStyle: isMobile ? BODY_STYLE.bodyDefault : bodyStyle,
121
121
  children: bodyText
122
122
  })
123
- }), buttonText && onClick && /*#__PURE__*/_jsx(BpkButtonV2, {
123
+ }), buttonText && onClick && /*#__PURE__*/_jsx(BpkButton, {
124
124
  type: buttonStyle,
125
125
  onClick: onClick,
126
126
  children: buttonText
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "41.1.0",
3
+ "version": "41.3.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,8 +27,8 @@
27
27
  "@radix-ui/react-compose-refs": "^1.1.1",
28
28
  "@radix-ui/react-slider": "1.3.5",
29
29
  "@react-google-maps/api": "^2.19.3",
30
- "@skyscanner/bpk-foundations-web": "^23.0.0",
31
- "@skyscanner/bpk-svgs": "^20.9.0",
30
+ "@skyscanner/bpk-foundations-web": "^24.0.0",
31
+ "@skyscanner/bpk-svgs": "^20.11.0",
32
32
  "a11y-focus-scope": "^1.1.3",
33
33
  "a11y-focus-store": "^1.0.0",
34
34
  "d3-path": "^3.1.0",