Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 4, 2026

Migrated BpkCode and BpkCodeBlock components from JavaScript with Flow types to TypeScript.

Changes

  • Component files: Converted BpkCode.js and BpkCodeBlock.js to .tsx

    • Replaced Flow types with TypeScript interfaces
    • Removed PropTypes in favor of TypeScript type checking
    • Exported BpkCodeProps and BpkCodeBlockProps types
    • Used default parameters instead of defaultProps
    • Added support for rest props using the inexact rest pattern ([rest: string]: any)
  • Test files: Converted all test files (unit and accessibility) to .tsx

    • Replaced snapshot tests with Jest expect assertions
    • Tests now verify element rendering, CSS classes, and prop handling using specific assertions
    • Removed __snapshots__ directory
  • Examples & Stories: Migrated example and story files to .tsx

  • Package index: Updated from .js to .ts with exported type definitions

  • Code consistency: Refactored BpkCode className handling to match BpkCodeBlock approach using cssModules utility

  • Documentation: Updated README.md code examples from js to tsx syntax highlighting

  • Dependency updates: Removed unused @ts-expect-error directive in examples/bpk-component-aria-live/examples.tsx as BpkCode now exports proper TypeScript types

Type definitions

export type BpkCodeProps = {
  children: ReactNode;
  alternate?: boolean;
  className?: string;
  [rest: string]: any; // Inexact rest. See decisions/inexact-rest.md
};

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [Clover-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Accessibility tests
    • The following checks were performed:
      • Ability to navigate using a keyboard only
      • Zoom functionality (Deque University explanation):
        • The page SHOULD be functional AND readable when only the text is magnified to 200% of its initial size
        • Pages must reflow as zoom increases up to 400% so that content continues to be presented in only one column i.e. Content MUST NOT require scrolling in two directions (both vertically and horizontally)
      • Ability to navigate using a screen reader only
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here
Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate BpkCode component to Typescript</issue_title>
<issue_description>I want to migrate the BpkCode component and all its tests and storybook examples to Typescript</issue_description>

Comments on the Issue (you are Copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 4, 2026 09:25
Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate BpkCode component to TypeScript [BpkCode] Migrate component to TypeScript Jan 4, 2026
Copilot AI requested a review from Faye (Faye-Xiao) January 4, 2026 09:29
@Faye-Xiao Faye (Faye-Xiao) added the minor Non breaking change label Jan 4, 2026
@Faye-Xiao Faye (Faye-Xiao) marked this pull request as ready for review January 4, 2026 09:34
Copilot AI review requested due to automatic review settings January 4, 2026 09:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the BpkCode and BpkCodeBlock components from JavaScript with Flow types to TypeScript, improving type safety and developer experience.

Key Changes:

  • Converted component files from .js to .tsx with TypeScript interfaces replacing Flow types
  • Removed PropTypes in favor of TypeScript type checking and used default parameters instead of defaultProps
  • Refactored BpkCode className handling to use cssModules utility for consistency with BpkCodeBlock

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/bpk-component-code/src/BpkCode.tsx Migrated to TypeScript and refactored className handling to use cssModules utility
packages/bpk-component-code/src/BpkCodeBlock.tsx Migrated to TypeScript with destructured parameters and default values
packages/bpk-component-code/src/BpkCode-test.tsx Removed Flow pragma from test file
packages/bpk-component-code/src/BpkCodeBlock-test.tsx Removed Flow pragma from test file
packages/bpk-component-code/src/accessibility-test.tsx Removed Flow pragma from accessibility test file
packages/bpk-component-code/index.ts Updated to TypeScript and exported component prop types
examples/bpk-component-code/examples.tsx Removed Flow pragma from examples file
examples/bpk-component-code/stories.tsx Updated Storybook story configuration to object-based syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4106 to see this build running in a browser.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Faye-Xiao
Copy link
Contributor

Hi Copilot, I noticed there are 2 snapshots in the BpkCode and BpkCodeBlock unit tests. We don't encourage using this way. Please replace that with the Jest expect.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4106 to see this build running in a browser.

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

Hi Copilot, I noticed there are 2 snapshots in the BpkCode and BpkCodeBlock unit tests. We don't encourage using this way. Please replace that with the Jest expect.

Replaced snapshot tests with Jest expect assertions in commit 7d22273. The tests now verify:

  • Element rendering and text content
  • Correct CSS class names application
  • Proper handling of alternate and className props

Removed the __snapshots__ directory as it's no longer needed.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4106 to see this build running in a browser.

@Faye-Xiao
Copy link
Contributor

Hi Copilot I found a type error as the following information:
examples/bpk-component-aria-live/examples.tsx(26,1): error TS2578: Unused 'ts-expect-error' directive.

Check it and remove the Unused 'ts-expect-error' directive for me.

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 4, 2026

Hi Copilot I found a type error as the following information:
examples/bpk-component-aria-live/examples.tsx(26,1): error TS2578: Unused 'ts-expect-error' directive.

...

Removed the unused @ts-expect-error directive in commit f709c3a. The directive was no longer needed because BpkCode now exports proper TypeScript types after the migration.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4106 to see this build running in a browser.

@skyscanner-backpack-bot
Copy link

skyscanner-backpack-bot bot commented Jan 4, 2026

Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.js) were updated, but snapshots weren't. Have you checked that the tests still pass?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against 5b94759

Copy link
Contributor

@Supremeyh Ezreal Yang (Supremeyh) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, the Usage js in README.md should update to tsx

js -> tsx

alternate = false,
children,
className,
...rest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For rest props, it may also need corresponding type, otherwise it won't accept other props. That said,

type Props = {
  children: ReactNode;
  // ...
  [rest: string]: any; // Inexact rest. See decisions/inexact-rest.md
};

or 

type Props = {
  children: ReactNode;
  // ...
} & React.HTMLAttributes<HTMLElement>;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added [rest: string]: any; to the Props type in both BpkCode and BpkCodeBlock components in commit 5b94759, following the inexact rest pattern used in other TypeScript components in the codebase.

export type Props = {
children: ReactNode;
alternate?: boolean;
className?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion: The className has default null value, should it accept it too or only string and undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation uses className?: string which accepts string or undefined (when not provided). This pattern is consistent with TypeScript optional parameters and works well with the cssModules utility which handles both undefined and falsy values. Some components in the codebase use string | null while others use the optional pattern - both are valid approaches.

@Faye-Xiao
Copy link
Contributor

Hi Copilot, check if the https://github.com/Skyscanner/backpack/blob/f709c3aba9d9fc8940c78b83f9d95fa4c28970c6/packages/bpk-component-code/README.md#usage has any JS code inside. If yes, change it to the right way.

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 5, 2026

nit, the Usage js in README.md should update to tsx

js -> `ts...

Updated README.md code block from js to tsx in commit 5b94759.

Hi Copilot, check if the https://github.com/Skyscanner/backpack/blob/f709c3aba9d9fc8940c78b83f9d95fa4c28970c6/packages/bpk-component-code/README.md#usage has any JS code inside. If yes, change it to...

Updated README.md code block from js to tsx in commit 5b94759.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4106 to see this build running in a browser.

@Faye-Xiao Faye (Faye-Xiao) merged commit 068bd94 into main Jan 5, 2026
11 checks passed
@Faye-Xiao Faye (Faye-Xiao) deleted the copilot/migrate-bpkcode-to-typescript branch January 5, 2026 05:01
Jimmy cook (jimmycook) pushed a commit that referenced this pull request Jan 6, 2026
* Initial plan

* Migrate BpkCode component to TypeScript

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Refactor BpkCode to use consistent className handling approach

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Replace snapshot tests with Jest expect assertions

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Remove unused @ts-expect-error directive for BpkCode import

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Update README to tsx and add rest props type support

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Co-authored-by: Faye <faye.xiao@skyscanner.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Faye (Faye-Xiao) added a commit that referenced this pull request Jan 7, 2026
* fix issue with carousel alignment

* Fix issue with carousel alignment on mobile

* optimize mobile left space and the code itself

* Revert "optimize mobile left space and the code itself"

This reverts commit eaf2cbe.

* Revert "Fix issue with carousel alignment on mobile"

This reverts commit 83a293f.

* [CLOV-951][BpkButton] Mark BpkButton v1 as deprecated (#4039)

* [CLOV-964][BpkButton] Export legacy props and types (#4044)

* [CLOV-964] Export legacy props and types

* lint

* [CLOV-30][BpkCheckbox] TS migration for BpkCheckbox (#4040)

* BpkCheckbox is migrated to Typescirpt now and export type BpkCheckboxProps

* [CLOV-950] [BpkButton] Migrate BpkButton to BpkButtonV2 (#4048)

* [CLOV-950] [BpkButton] Migrate BpkButton to BpkButtonV2

* update type order

* update props and other path

* Bump glob (#4046)

Bumps [glob](https://github.com/isaacs/node-glob) to 10.5.0 and updates ancestor dependency . These dependencies need to be updated together.


Updates `glob` from 10.4.5 to 10.5.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v10.4.5...v10.5.0)

Updates `glob` from 11.0.3 to 11.1.0
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v10.4.5...v10.5.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
- dependency-name: glob
  dependency-version: 11.1.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump core-js from 3.45.1 to 3.46.0 (#4028)

Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.45.1 to 3.46.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.46.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-version: 3.46.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* [CLOV-19][BpkFieldset] BpkFieldset TS Migration (#4045)

* covert BpkFielset to TS

* add check and label type check

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* change any type

* fix typecheck error

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* [GOOSE-559][BpkSwapButton] Override padding alignment set by Safari User Agent (#4052)

* Override padding alignment set by Safari User Agent

* simplify

* fix: allow word wrap anywhere when the autosuggest value is joined by _ or long words in general (#4054)

* [CLOV-349][BpkAutosuggest]Fix keyboard up and down blur issue (#4043)

* fix up and down blur issue

* fix up down issue

* fix fistHightLight

* suppress the runtime error

* modify comment

* prevent autosuggest flickering on input change

* optimise highlight Index function

* fix typecheck error

* fix test onSuggestionSelected

* Bump js-yaml from 3.14.1 to 3.14.2 (#4047)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump the babel group across 1 directory with 2 updates (#4027)

Bumps the babel group with 2 updates in the / directory: [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) and [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript).


Updates `@babel/preset-react` from 7.27.1 to 7.28.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.5/packages/babel-preset-react)

Updates `@babel/preset-typescript` from 7.27.0 to 7.28.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.5/packages/babel-preset-typescript)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-version: 7.28.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: babel
- dependency-name: "@babel/preset-typescript"
  dependency-version: 7.28.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump @skyscanner/eslint-config-skyscanner from 22.5.1 to 22.6.0 (#4026)

Bumps [@skyscanner/eslint-config-skyscanner](https://github.com/Skyscanner/eslint-config-skyscanner) from 22.5.1 to 22.6.0.
- [Release notes](https://github.com/Skyscanner/eslint-config-skyscanner/releases)
- [Changelog](https://github.com/Skyscanner/eslint-config-skyscanner/blob/main/CHANGELOG.md)
- [Commits](Skyscanner/eslint-config-skyscanner@22.5.1...22.6.0)

---
updated-dependencies:
- dependency-name: "@skyscanner/eslint-config-skyscanner"
  dependency-version: 22.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump actions/checkout from 5 to 6 (#4051)

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump the artifacts-actions group with 2 updates (#4025)

Bumps the artifacts-actions group with 2 updates: [actions/upload-artifact](https://github.com/actions/upload-artifact) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/upload-artifact` from 4.6.2 to 5.0.0
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4.6.2...v5.0.0)

Updates `actions/download-artifact` from 5.0.0 to 6.0.0
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v5.0.0...v6.0.0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: artifacts-actions
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: artifacts-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump actions/setup-node from 5 to 6 (#4016)

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump webpack from 5.101.2 to 5.103.0 (#4059)

Bumps [webpack](https://github.com/webpack/webpack) from 5.101.2 to 5.103.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.101.2...v5.103.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.103.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>

* Bump @skyscanner/stylelint-config-skyscanner from 13.1.0 to 14.2.0 (#4060)

* Bump @skyscanner/stylelint-config-skyscanner from 13.1.0 to 14.2.0

Bumps [@skyscanner/stylelint-config-skyscanner](https://github.com/Skyscanner/stylelint-config-skyscanner) from 13.1.0 to 14.2.0.
- [Release notes](https://github.com/Skyscanner/stylelint-config-skyscanner/releases)
- [Changelog](https://github.com/Skyscanner/stylelint-config-skyscanner/blob/main/CHANGELOG.md)
- [Commits](Skyscanner/stylelint-config-skyscanner@13.1.0...14.2.0)

---
updated-dependencies:
- dependency-name: "@skyscanner/stylelint-config-skyscanner"
  dependency-version: 14.2.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix check error

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kerrie Wu <kerrie.wu@skyscanner.net>

* Bump the storybook group across 1 directory with 5 updates (#4058)

* Bump the storybook group across 1 directory with 5 updates

Bumps the storybook group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@storybook/addon-a11y](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/a11y) | `9.1.13` | `10.1.2` |
| [@storybook/addon-docs](https://github.com/storybookjs/storybook/tree/HEAD/code/addons/docs) | `9.1.13` | `10.1.2` |
| [@storybook/addon-webpack5-compiler-babel](https://github.com/storybookjs/addon-webpack5-compiler-babel) | `3.0.6` | `4.0.0` |
| [@storybook/react-webpack5](https://github.com/storybookjs/storybook/tree/HEAD/code/frameworks/react-webpack5) | `9.1.13` | `10.1.2` |
| [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) | `9.1.13` | `10.1.2` |



Updates `@storybook/addon-a11y` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/a11y)

Updates `@storybook/addon-docs` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/addons/docs)

Updates `@storybook/addon-webpack5-compiler-babel` from 3.0.6 to 4.0.0
- [Release notes](https://github.com/storybookjs/addon-webpack5-compiler-babel/releases)
- [Changelog](https://github.com/storybookjs/addon-webpack5-compiler-babel/blob/main/CHANGELOG.md)
- [Commits](storybookjs/addon-webpack5-compiler-babel@v3.0.6...v4.0.0)

Updates `@storybook/react-webpack5` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/frameworks/react-webpack5)

Updates `storybook` from 9.1.13 to 10.1.2
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.2/code/core)

---
updated-dependencies:
- dependency-name: "@storybook/addon-a11y"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: "@storybook/addon-docs"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: "@storybook/addon-webpack5-compiler-babel"
  dependency-version: 4.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: "@storybook/react-webpack5"
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
- dependency-name: storybook
  dependency-version: 10.1.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: storybook
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix storybook update issue

* fix conflict and issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>
Co-authored-by: Kerrie Wu <kerrie.wu@skyscanner.net>

* Bump jws from 3.2.2 to 3.2.3 (#4066)

* Bump jws from 3.2.2 to 3.2.3

Bumps [jws](https://github.com/brianloveswords/node-jws) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jws@v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update package-lock.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gc.zhu <gc.zhu@skyscanner.net>

* [CLOV-907][BpkButton] Update BpkButton link and linkOnDark type style (#4076)

* [CLOV-907][BpkButton] Update BpkButton link and linkOnDark type style

* add implicit to BpkPaginationNudger and BpkFloatingNotification and ExpandAccessoryContent

* adjust linkOnDark hover color

* add Links example

* update link on dark hover style

* remove full props in README

* update BpkPaginationNudger to iconOnly

* remove bpk-buttob-link-disabled

* button link aligned

* support inline display svg

* add button-link-type README

* rename bpk-button--link-icon-only-aligned

* rename bpk-button--link-icon-only

* [CLOV-958][BpkButton] Remove BpkButton (v1) code and alias BpkButton to BpkButtonV2 (#4078)

* remove BpkButton code and alias BpkButton to BpkButtonV2

* refine themeAttributes file structure

* update readme

* correct file format

* udpate readme

* update readme

---------

Co-authored-by: Ezreal Yang <supremeyh@126.com>

* [CLOV-907][BpkButton] Fix BpkButton linkOnDark alignment (#4086)

* Bump lint-staged from 16.1.5 to 16.2.7 (#4071)

Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 16.1.5 to 16.2.7.
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v16.1.5...v16.2.7)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-version: 16.2.7
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IrinaWei <irina.wei@skyscanner.net>

* Bump glob from 11.1.0 to 13.0.0 (#4072)

Bumps [glob](https://github.com/isaacs/node-glob) from 11.1.0 to 13.0.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v11.1.0...v13.0.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 13.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: IrinaWei <irina.wei@skyscanner.net>

* [BpkLink] Migrate component to TypeScript (#4063)

* Initial plan

* Initial exploration

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Migrate BpkLink component to TypeScript

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Add missing semicolon in examples.tsx

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Remove unused @ts-expect-error directives for bpk-component-link imports

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Remove duplicate JS files

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Update packages/bpk-component-link/src/BpkLink.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update examples/bpk-component-link/examples.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/bpk-component-link/src/BpkLink.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix TypeScript errors: convert null to undefined for href and rel attributes

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Make href prop required in BpkLink to match original Flow type and ensure accessibility

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Extend AnchorHTMLAttributes instead of using index signature for better Storybook docgen support

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* Extend ButtonHTMLAttributes for BpkButtonLink to match BpkLink pattern and improve Storybook docgen

Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>

* omit props

* address rel

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>
Co-authored-by: Gert-Jan Vercauteren <gert-jan.vercauteren@skyscanner.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ezreal Yang <supremeyh@126.com>

* bump bpk-foundations-web to 24.0.0 (#4092)

Co-authored-by: Flora Cheng <flora.cheng@skyscanner.net>

* feat[BpkPrice]: added variant size medium (#4089)

* feat: added variant size medium to bpkPrice

* fix: fixed spacing issues picked up in PR

* chore: run tests

---------

Co-authored-by: Gert-Jan Vercauteren <gert-jan.vercauteren@skyscanner.net>

* [CLOV-657][BpkLink] Refactor BpkLink with add as prop (#4094)

* [CLOV-657] Add as prop to support BpkLink

* update ref type

* use BpkPanel in storybook examples

* remove BpkButtonLink in README and storybook

* simplify with react type

* introduce const LINK_AS

* update LINK_AS cases

* update as Element

* update snapshots

* ArgTypes specify API

* add href null

* common-types

* update import and export path

* remove LINK_AS

* remove BpkLinkPolymorphicProps

* update  processAnchorProps and getClassNames

* remove LinksAs type

* [CLOV-909][BpkLink] Mark BpkButtonLink deprecated (#4096)

* [CLOV-909][BpkButtonLink] Mark BpkButtonLink deprecated

* type label and pass rest

* [CLOV-957][BpkButton] Replace BpkButtonV2 with BpkButton across codebase (#4097)

* [CLOV-957][BpkButton] Replace BpkButtonV2 with BpkButton across codebase

* update figma path

* [Clov-353][BpkAutosuggest]Export Autosuggest default theme (#4098)

* export default them

* Update packages/bpk-component-autosuggest/index.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Bump storybook from 10.1.2 to 10.1.11 (#4100)

* Bump storybook from 10.1.2 to 10.1.11

Bumps [storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/core) from 10.1.2 to 10.1.11.
- [Release notes](https://github.com/storybookjs/storybook/releases)
- [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md)
- [Commits](https://github.com/storybookjs/storybook/commits/v10.1.11/code/core)

---
updated-dependencies:
- dependency-name: storybook
  dependency-version: 10.1.11
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update package-lock.json

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Flora Cheng <flora.cheng@skyscanner.net>

* [BpkCode] Migrate component to TypeScript (#4106)

* Initial plan

* Migrate BpkCode component to TypeScript

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Refactor BpkCode to use consistent className handling approach

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Replace snapshot tests with Jest expect assertions

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Remove unused @ts-expect-error directive for BpkCode import

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

* Update README to tsx and add rest props type support

Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Co-authored-by: Faye <faye.xiao@skyscanner.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix issue with carousel alignment on mobile

* optimize mobile left space and the code itself

* Revert "optimize mobile left space and the code itself"

This reverts commit eaf2cbe.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Vincent Liu <xiaogliu@outlook.com>
Co-authored-by: Irina-Wei <irina.wei@skyscanner.net>
Co-authored-by: Ezreal Yang <supremeyh@126.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kerrie-wu <52308828+kerrie-wu@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Noel Rajan <14931745+FireRedNinja@users.noreply.github.com>
Co-authored-by: Gert-Jan Vercauteren <gert-jan.vercauteren@skyscanner.net>
Co-authored-by: Kerrie Wu <kerrie.wu@skyscanner.net>
Co-authored-by: gc.zhu <gc.zhu@skyscanner.net>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: gert-janvercauteren <728889+gert-janvercauteren@users.noreply.github.com>
Co-authored-by: Flora Cheng <122813126+floracheng292@users.noreply.github.com>
Co-authored-by: Flora Cheng <flora.cheng@skyscanner.net>
Co-authored-by: Nic da Costa <1333205+nicdaCosta@users.noreply.github.com>
Co-authored-by: Faye-Xiao <20058385+Faye-Xiao@users.noreply.github.com>
Co-authored-by: Faye <faye.xiao@skyscanner.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Non breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate BpkCode component to Typescript

3 participants