Skip to content

Commit

Permalink
[CHUX-697] Navigation increase nav delimiters width (#1992)
Browse files Browse the repository at this point in the history
* CHUX-697:feat:navigation increase delimiters width

* CHUX-697:chore:snapshots

* CHUX-697:chore:change active state

* CHUX-697:chore:update snaps

* 2.8.13
  • Loading branch information
stavros-tomas authored Jun 27, 2024
1 parent 9832b0e commit 85a7d88
Show file tree
Hide file tree
Showing 19 changed files with 68 additions and 50 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebury/chameleon-components",
"version": "2.8.12",
"version": "2.8.13",
"main": "src/main.ts",
"sideEffects": false,
"author": "Ebury Team (http://labs.ebury.rocks/)",
Expand Down
42 changes: 21 additions & 21 deletions src/components/ec-menu/__snapshots__/ec-menu.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`EcMenu > @events > should propagate the event from the navigation link
>
<ec-stub
active-class="ec-navigation-link--is-active"
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link test-router-link ec-navigation-link ec-stub router-link-stub"
to="/bat"
>
Expand Down Expand Up @@ -58,7 +58,7 @@ exports[`EcMenu > should attach custom listeners passed in the link definition 1
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-collapsed"
class="ec-navigation-link ec-navigation-link--is-collapsed"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -103,7 +103,7 @@ exports[`EcMenu > should not render all items as compact when horizontal is not
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -137,7 +137,7 @@ exports[`EcMenu > should not render all items as compact when horizontal is not
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link ec-navigation-link"
href="/bar"
>
Expand Down Expand Up @@ -171,7 +171,7 @@ exports[`EcMenu > should not render all items as compact when horizontal is not
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link baz ec-navigation-link"
href="/baz"
>
Expand Down Expand Up @@ -205,7 +205,7 @@ exports[`EcMenu > should not render all items as compact when horizontal is not
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link ec-navigation-link"
href="/bat"
>
Expand Down Expand Up @@ -253,7 +253,7 @@ exports[`EcMenu > should render all items as compact when is horizontal 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-compact"
class="ec-navigation-link ec-navigation-link--is-compact"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -287,7 +287,7 @@ exports[`EcMenu > should render all items as compact when is horizontal 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-compact"
class="ec-navigation-link ec-navigation-link--is-compact"
data-test="ec-menu__link ec-navigation-link"
href="/bar"
>
Expand Down Expand Up @@ -321,7 +321,7 @@ exports[`EcMenu > should render all items as compact when is horizontal 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-compact"
class="ec-navigation-link ec-navigation-link--is-compact"
data-test="ec-menu__link baz ec-navigation-link"
href="/baz"
>
Expand Down Expand Up @@ -355,7 +355,7 @@ exports[`EcMenu > should render all items as compact when is horizontal 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-compact"
class="ec-navigation-link ec-navigation-link--is-compact"
data-test="ec-menu__link ec-navigation-link"
href="/bat"
>
Expand Down Expand Up @@ -399,7 +399,7 @@ exports[`EcMenu > should render as collapsed when isCollapsed is passed into 1`]
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-collapsed"
class="ec-navigation-link ec-navigation-link--is-collapsed"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -434,7 +434,7 @@ exports[`EcMenu > should render as collapsed when isCollapsed is passed into 1`]
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-collapsed"
class="ec-navigation-link ec-navigation-link--is-collapsed"
data-test="ec-menu__link ec-navigation-link"
href="/bar"
>
Expand Down Expand Up @@ -469,7 +469,7 @@ exports[`EcMenu > should render as collapsed when isCollapsed is passed into 1`]
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-collapsed"
class="ec-navigation-link ec-navigation-link--is-collapsed"
data-test="ec-menu__link baz ec-navigation-link"
href="/baz"
>
Expand Down Expand Up @@ -504,7 +504,7 @@ exports[`EcMenu > should render as collapsed when isCollapsed is passed into 1`]
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-collapsed"
class="ec-navigation-link ec-navigation-link--is-collapsed"
data-test="ec-menu__link ec-navigation-link"
href="/bat"
>
Expand Down Expand Up @@ -549,7 +549,7 @@ exports[`EcMenu > should render as expanded by default 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -583,7 +583,7 @@ exports[`EcMenu > should render as expanded by default 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link ec-navigation-link"
href="/bar"
>
Expand Down Expand Up @@ -617,7 +617,7 @@ exports[`EcMenu > should render as expanded by default 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link baz ec-navigation-link"
href="/baz"
>
Expand Down Expand Up @@ -651,7 +651,7 @@ exports[`EcMenu > should render as expanded by default 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link ec-navigation-link"
href="/bat"
>
Expand Down Expand Up @@ -695,7 +695,7 @@ exports[`EcMenu > should render as expected when set to horizontal 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-compact"
class="ec-navigation-link ec-navigation-link--is-compact"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -739,7 +739,7 @@ exports[`EcMenu > should render as expected when set to isReverse 1`] = `
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link"
class="ec-navigation-link"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down Expand Up @@ -783,7 +783,7 @@ exports[`EcMenu > should render as expected when set to isReverse and horizontal
data-test="ec-menu__item"
>
<a
class="ec-menu__link ec-navigation-link ec-navigation-link--is-compact"
class="ec-navigation-link ec-navigation-link--is-compact"
data-test="ec-menu__link foo ec-navigation-link"
href="/foo"
>
Expand Down
6 changes: 5 additions & 1 deletion src/components/ec-menu/ec-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
v-for="(link, index) of validLinks"
:key="index"
class="ec-menu__item"
:class="{ 'ec-menu__item--light-mode': isInLightMode }"
data-test="ec-menu__item"
>
<ec-navigation-link
Expand All @@ -22,7 +23,6 @@
dataTest: null,
'data-test': getLinkDataTest(link),
}"
class="ec-menu__link"
:is-collapsed="isCollapsed"
:is-compact="horizontal"
:is-in-light-mode="isInLightMode"
Expand Down Expand Up @@ -93,6 +93,10 @@ function getLinkDataTest(link: MenuLink): string {
}
/* stylelint-enable */
}
&--light-mode {
@apply tw-mt-16;
}
}
}
</style>
15 changes: 7 additions & 8 deletions src/components/ec-navigation-link/ec-navigation-link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,28 +148,27 @@ withDefaults(defineProps<NavigationLinkProps>(), {
}
&:focus {
background-color: hsla(var(--ec-key-color-level-4), 0.9);
@apply tw-text-key-4;
}
&.ec-navigation-link--light-mode {
@apply tw-bg-transparent;
@apply tw-small-strong;
&:hover,
&:focus {
@apply tw-text-gray-2;
}
@apply tw-text-gray-2;
}
}
&--light-mode {
@apply tw-small-text;
@apply tw-px-0 tw-py-16;
@apply tw-p-8;
@apply tw-text-gray-3;
@apply tw-bg-transparent;
@apply tw-capitalize;
&:hover {
&:hover,
&:focus {
@apply tw-small-strong;
@apply tw-bg-transparent;
@apply tw-text-gray-2;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w
data-test="ec-navigation"
>
<div
class="ec-navigation__header"
class=""
>
<div
class="ec-navigation__branding--mobile-menu-open ec-navigation__branding"
Expand Down Expand Up @@ -127,7 +127,7 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w
data-test="ec-navigation"
>
<div
class="ec-navigation__header"
class=""
>
<div
class="ec-navigation__branding--mobile-menu-open ec-navigation__branding"
Expand Down Expand Up @@ -216,7 +216,7 @@ exports[`EcNavigation > mobile navigation > should show render the mobile naviga
data-test="ec-navigation"
>
<div
class="ec-navigation__header"
class=""
>
<div
class="ec-navigation__branding--mobile-menu-open ec-navigation__branding"
Expand Down Expand Up @@ -302,7 +302,7 @@ exports[`EcNavigation > should apply light mode CSS classes if "isInLightMode" p
data-test="ec-navigation"
>
<div
class=""
class="ec-navigation__header"
>
<div
class="ec-navigation__branding--light-mode ec-navigation__branding"
Expand All @@ -323,7 +323,7 @@ exports[`EcNavigation > should apply light mode CSS classes if "isInLightMode" p
/>
<!--v-if-->
<div
class="ec-navigation__block ec-navigation__menu"
class="ec-navigation__block--light-mode ec-navigation__menu--light-mode ec-navigation__block ec-navigation__menu"
data-test="ec-navigation__block ec-navigation__menu"
>
Expand Down
Loading

0 comments on commit 85a7d88

Please sign in to comment.