diff --git a/docs/src/documentation/05-development/04-migration-guides/01-v16.mdx b/docs/src/documentation/05-development/04-migration-guides/01-v16.mdx new file mode 100644 index 0000000000..ab2fdeb354 --- /dev/null +++ b/docs/src/documentation/05-development/04-migration-guides/01-v16.mdx @@ -0,0 +1,71 @@ +--- +title: v16 +description: How to migrate to Orbit 16.0.0 +redirect_from: + - /migration-guides/v16/ +--- + +# Orbit Migration Guide v16 + +This migration guide focuses on the process of migrating from Orbit v15 to v16.0, as some breaking changes were introduced. +With this guide, we aim to walk through all the breaking changes and how they can be addressed, allowing the migration to be smoother and effortlessly. + +This version addresses especially a change in the design tokens, and tailwind classes. + +## Token and tailwind classes + +A number of new design tokens were introduced and others were removed. This means that some of the tailwind classes have been updated to reflect these changes. + +### Border Radius + +Four border radius tokens were removed and six new ones were added. + +Here's the mapping for the new tokens: + +- `borderRadiusSmall` -> `borderRadius50` +- `borderRadiusNormal` -> `borderRadius100` (value change from 3px to 4px) +- `borderRadiusLarge` -> `borderRadius150` +- `borderRadiusCircle` -> `borderRadiusFull` +- `borderRadius300` (new value of 12px) +- `borderRadius400` (new value of 16px) + +And their respective tailwind classes: + +- `rounded-small` -> `rounded-50` +- `rounded-normal` -> `rounded-100` (value change from 3px to 4px) +- `rounded-large` -> `rounded-150` +- `rounded-circle` -> `rounded-full` +- `rounded-300` +- `rounded-400` + +## Box component + +Because the Box component props rely heavily on design tokens and their values, some of the prop values have been updated to reflect the changes in the design tokens. + +**Before:** + +```jsx +"small" borderRadius +"normal" borderRadius +"large" borderRadius +"circle" borderRadius +``` + +**Now:** + +```jsx +"50" borderRadius +"100" borderRadius +"150" borderRadius +"full" borderRadius +``` + +## Codemod + +A codemod was made available to help with the migration. It should target all the tokens and tailwind classes that were updated and correctly migrate them. + +Please ensure the changes are expected and there is no change missing. Please note that the codemod **does not** cover the Box component changes. + +```bash +node .../transforms/tokens-v16.mjs +``` diff --git a/docs/src/documentation/05-development/04-migration-guides/01-v15.mdx b/docs/src/documentation/05-development/04-migration-guides/02-v15.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/01-v15.mdx rename to docs/src/documentation/05-development/04-migration-guides/02-v15.mdx diff --git a/docs/src/documentation/05-development/04-migration-guides/02-v14.mdx b/docs/src/documentation/05-development/04-migration-guides/03-v14.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/02-v14.mdx rename to docs/src/documentation/05-development/04-migration-guides/03-v14.mdx diff --git a/docs/src/documentation/05-development/04-migration-guides/03-v12.mdx b/docs/src/documentation/05-development/04-migration-guides/04-v12.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/03-v12.mdx rename to docs/src/documentation/05-development/04-migration-guides/04-v12.mdx diff --git a/docs/src/documentation/05-development/04-migration-guides/04-v11.mdx b/docs/src/documentation/05-development/04-migration-guides/05-v11.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/04-v11.mdx rename to docs/src/documentation/05-development/04-migration-guides/05-v11.mdx diff --git a/docs/src/documentation/05-development/04-migration-guides/05-v10.mdx b/docs/src/documentation/05-development/04-migration-guides/06-v10.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/05-v10.mdx rename to docs/src/documentation/05-development/04-migration-guides/06-v10.mdx diff --git a/docs/src/documentation/05-development/04-migration-guides/06-v9.mdx b/docs/src/documentation/05-development/04-migration-guides/07-v9.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/06-v9.mdx rename to docs/src/documentation/05-development/04-migration-guides/07-v9.mdx diff --git a/docs/src/documentation/05-development/04-migration-guides/07-v7.mdx b/docs/src/documentation/05-development/04-migration-guides/08-v7.mdx similarity index 100% rename from docs/src/documentation/05-development/04-migration-guides/07-v7.mdx rename to docs/src/documentation/05-development/04-migration-guides/08-v7.mdx