diff --git a/packages/components/psammead-navigation/CHANGELOG.md b/packages/components/psammead-navigation/CHANGELOG.md index a42b7a1aa8..1f4bda9794 100644 --- a/packages/components/psammead-navigation/CHANGELOG.md +++ b/packages/components/psammead-navigation/CHANGELOG.md @@ -3,6 +3,8 @@ | Version | Description | |---------|-------------| +| 2.3.0 | [PR#2117](https://github.com/bbc/psammead/pull/2117) Pass `dir` prop to `Navigation` component instead of `NavigationLi` | +| 2.2.11 | [PR#2092](https://github.com/bbc/psammead/pull/2092) Refactored navigation component | | 2.2.12 | [PR#2145](https://github.com/bbc/psammead/pull/2145) Talos - Bump Dependencies - @bbc/psammead-styles | | 2.2.11 | [PR#1963](https://github.com/bbc/psammead/pull/2092) Refactored navigation component | 2.2.10 | [PR#2081](https://github.com/bbc/psammead/pull/2081) Talos - Bump Dependencies - @bbc/psammead-styles, @bbc/psammead-visually-hidden-text | diff --git a/packages/components/psammead-navigation/README.md b/packages/components/psammead-navigation/README.md index 0ab5f2ca06..b193a898b5 100644 --- a/packages/components/psammead-navigation/README.md +++ b/packages/components/psammead-navigation/README.md @@ -19,6 +19,7 @@ The `@bbc/psammead-navigation` package is a set of two components, `NavigationUl | script | object | Yes | N/A | `{ canon: { groupA: { fontSize: '28', lineHeight: '32',}, groupB: { fontSize: '32', lineHeight: '36', }, groupD: { fontSize: '44', lineHeight: '48', }, }, trafalgar: { groupA: { fontSize: '20', lineHeight: '24', }, groupB: { fontSize: '24', lineHeight: '28', }, groupD: { fontSize: '32', lineHeight: '36', }, }, }` | | skipLinkText | string | Yes | N/A | `Skip to content` | | service | string | Yes | N/A | `'news'` | +| dir | string | No | `ltr` | `rtl` | ### NavigationUl @@ -34,7 +35,6 @@ The `@bbc/psammead-navigation` package is a set of two components, `NavigationUl | -------- | ------- | -------- | ------- | -------- | | url | string | Yes | N/A | `/sport` | | script | object | Yes | N/A | `{ canon: { groupA: { fontSize: '28', lineHeight: '32',}, groupB: { fontSize: '32', lineHeight: '36', }, groupD: { fontSize: '44', lineHeight: '48', }, }, trafalgar: { groupA: { fontSize: '20', lineHeight: '24', }, groupB: { fontSize: '24', lineHeight: '28', }, groupD: { fontSize: '32', lineHeight: '36', }, }, }` | -| dir | string | No | `ltr` | `rtl` | | active | boolean | No | `false` | `true` | | currentPageText | string | No | `null` | `Current page` | | service | string | Yes | N/A | `'news'` | diff --git a/packages/components/psammead-navigation/package-lock.json b/packages/components/psammead-navigation/package-lock.json index 36deaeca0e..5538f8f481 100644 --- a/packages/components/psammead-navigation/package-lock.json +++ b/packages/components/psammead-navigation/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bbc/psammead-navigation", - "version": "2.2.12", + "version": "2.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/components/psammead-navigation/package.json b/packages/components/psammead-navigation/package.json index 563a04bea6..1c753c99d8 100644 --- a/packages/components/psammead-navigation/package.json +++ b/packages/components/psammead-navigation/package.json @@ -1,6 +1,6 @@ { "name": "@bbc/psammead-navigation", - "version": "2.2.12", + "version": "2.3.0", "description": "A navigation bar to use on index pages", "main": "dist/index.js", "module": "esm/index.js", diff --git a/packages/components/psammead-navigation/src/__snapshots__/index.test.jsx.snap b/packages/components/psammead-navigation/src/__snapshots__/index.test.jsx.snap index fbac43baaf..79a4373e1a 100644 --- a/packages/components/psammead-navigation/src/__snapshots__/index.test.jsx.snap +++ b/packages/components/psammead-navigation/src/__snapshots__/index.test.jsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Navigation should render correctly 1`] = ` -.c7 { +.c8 { -webkit-clip-path: inset(100%); clip-path: inset(100%); -webkit-clip: rect(1px,1px,1px,1px); @@ -13,10 +13,6 @@ exports[`Navigation should render correctly 1`] = ` margin: 0; } -.c0 { - background-color: #B80000; -} - .c1 { position: relative; max-width: 80rem; @@ -64,23 +60,22 @@ exports[`Navigation should render correctly 1`] = ` overflow: hidden; } -.c4 { +.c5 { display: inline-block; position: relative; z-index: 2; } -.c4::after { +.c5::after { content: ''; position: absolute; bottom: 0; width: 80rem; border-bottom: 0.0625rem solid #eab3b3; z-index: -1; - left: 0; } -.c5 { +.c6 { font-size: 0.9375rem; line-height: 1.25rem; font-family: ReithSans,Helvetica,Arial,sans-serif; @@ -94,7 +89,7 @@ exports[`Navigation should render correctly 1`] = ` padding: 0.75rem 1rem; } -.c5:hover::after { +.c6:hover::after { content: ''; position: absolute; left: 0; @@ -104,7 +99,7 @@ exports[`Navigation should render correctly 1`] = ` border-bottom: 0.3125rem solid #FFFFFF; } -.c5:focus::after { +.c6:focus::after { content: ''; position: absolute; left: 0; @@ -115,7 +110,7 @@ exports[`Navigation should render correctly 1`] = ` border: 0.25rem solid #FFFFFF; } -.c8 { +.c9 { font-size: 0.9375rem; line-height: 1.25rem; font-family: ReithSans,Helvetica,Arial,sans-serif; @@ -129,7 +124,7 @@ exports[`Navigation should render correctly 1`] = ` padding: 0.75rem 1rem; } -.c8:hover::after { +.c9:hover::after { content: ''; position: absolute; left: 0; @@ -138,7 +133,7 @@ exports[`Navigation should render correctly 1`] = ` border-bottom: 0.25rem solid #FFFFFF; } -.c8:focus::after { +.c9:focus::after { content: ''; position: absolute; left: 0; @@ -149,7 +144,7 @@ exports[`Navigation should render correctly 1`] = ` border: 0.25rem solid #FFFFFF; } -.c6::after { +.c7::after { content: ''; position: absolute; left: 0; @@ -158,6 +153,14 @@ exports[`Navigation should render correctly 1`] = ` border-bottom: 0.25rem solid #FFFFFF; } +.c0 { + background-color: #B80000; +} + +.c0 .c4::after { + left: 0; +} + @media (min-width:20rem) and (max-width:37.4375rem) { .c2 { font-size: 1rem; @@ -185,47 +188,48 @@ exports[`Navigation should render correctly 1`] = ` } @media (min-width:20rem) and (max-width:37.4375rem) { - .c5 { + .c6 { font-size: 1rem; line-height: 1.25rem; } } @media (min-width:37.5rem) { - .c5 { + .c6 { font-size: 1rem; line-height: 1.25rem; } } @media (max-width:24.9375rem) { - .c5 { + .c6 { padding: 0.75rem 0.5rem; } } @media (min-width:20rem) and (max-width:37.4375rem) { - .c8 { + .c9 { font-size: 1rem; line-height: 1.25rem; } } @media (min-width:37.5rem) { - .c8 { + .c9 { font-size: 1rem; line-height: 1.25rem; } } @media (max-width:24.9375rem) { - .c8 { + .c9 { padding: 0.75rem 0.5rem; } }