Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/components/src/components/nav/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { Component, h, Host, Prop, State, Watch } from '@stencil/core';
import { translate } from '../../i18n';
import { addNavLabel, removeNavLabel } from '../../utils/unique-nav-labels';
import { watchNavLinks } from './validation';
import { KolButtonTag, KolButtonWcTag, KolLinkWcTag } from '../../core/component-names';
import { KolButtonWcTag, KolLinkWcTag } from '../../core/component-names';
import type { StencilUnknown } from '../../schema';

const linkValidator = (link: ButtonOrLinkOrTextWithChildrenProps): boolean => {
Expand Down Expand Up @@ -230,7 +230,8 @@ export class KolNav implements NavAPI {
</nav>
{hasCompactButton && (
<div class="compact">
<KolButtonTag
<KolButtonWcTag
class="toggle-button"
_ariaControls="nav"
_ariaExpanded={!hideLabel}
_icons={hideLabel ? 'codicon codicon-chevron-right' : 'codicon codicon-chevron-left'}
Expand All @@ -246,7 +247,7 @@ export class KolNav implements NavAPI {
}}
_tooltipAlign="right"
_variant="ghost"
></KolButtonTag>
></KolButtonWcTag>
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports[`kol-nav should render with _label="Nav Label" _links=[{"_label":"Homepa
</ul>
</nav>
<div class="compact">
<kol-button _ariacontrols="nav" _ariaexpanded="" _hidelabel="" _icons="codicon codicon-chevron-left" _label="kol-nav-minimize" _tooltipalign="right" _variant="ghost"></kol-button>
<kol-button-wc _ariacontrols="nav" _ariaexpanded="" _hidelabel="" _icons="codicon codicon-chevron-left" _label="kol-nav-minimize" _tooltipalign="right" _variant="ghost" class="toggle-button"></kol-button-wc>
</div>
</div>
</template>
Expand Down
32 changes: 32 additions & 0 deletions packages/themes/bwst/src/components/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,36 @@
justify-content: center;
}
}

.toggle-button :is(a, button) > .kol-span-wc,
.toggle-button :is(a, button):disabled:hover > .kol-span-wc {
border-color: var(--color-light);
background-color: var(--color-light);
box-shadow: none;
color: var(--color-primary);
font-weight: 400;
border-radius: var(--border-radius);
border-style: solid;
border-width: var(--border-width);
min-height: var(--a11y-min-size);
min-width: var(--a11y-min-size);
padding: rem(8) rem(14);
text-align: center;
transition-duration: 0.2s;
transition-property: background-color, color, border-color;
}

.toggle-button :is(a, button):active > .kol-span-wc,
.toggle-button :is(a, button):hover > .kol-span-wc {
background-color: var(--color-primary-variant);
border-color: var(--color-primary-variant);
box-shadow: 0 2px 8px 2px rgba(8, 35, 48, 0.24);
color: var(--color-light);
}

.toggle-button :is(a, button):active > .kol-span-wc {
border-color: var(--color-light);
box-shadow: none;
outline: none;
}
}
22 changes: 22 additions & 0 deletions packages/themes/default/src/components/nav.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@use '../mixins/rem' as *;
@use '../mixins/focus-outline' as *;
@use '../mixins/button' as *;

@layer kol-theme-component {
:host {
Expand Down Expand Up @@ -83,4 +84,25 @@
justify-content: center;
}
}

.toggle-button :is(a, button) > .kol-span-wc,
.toggle-button :is(a, button):disabled:hover > .kol-span-wc {
color: var(--color-primary);
font-weight: 700;
min-height: var(--a11y-min-size);
min-width: var(--a11y-min-size);
border-color: var(--color-light);
background-color: var(--color-light);
border-radius: var(--border-radius);
border-style: solid;
box-shadow: none;
}

.toggle-button :is(a, button):active > .kol-span-wc,
.toggle-button :is(a, button):hover > .kol-span-wc {
background-color: var(--color-primary-variant);
border-color: var(--color-primary-variant);
box-shadow: 0 2px 8px 2px rgba(8, 35, 48, 0.24);
color: var(--color-light);
}
}
21 changes: 21 additions & 0 deletions packages/themes/ecl/src/ecl-ec/components/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,25 @@
.expanded > div > .expand-button kol-icon::part(icon)::before {
content: '\eab4';
}

button.toggle-button :focus .kol-span-wc {
outline-offset: -2px;
}

.toggle-button a .kol-span-wc,
.toggle-button button .kol-span-wc {
background-color: transparent;
border-color: transparent;
color: var(--color-blue);
}

.toggle-button a:focus .kol-span-wc,
.toggle-button button:focus .kol-span-wc {
outline-color: var(--color-blue);
}

.toggle-button a:hover .kol-span-wc,
.toggle-button button:hover .kol-span-wc {
color: var(--color-blue-130);
}
}
15 changes: 15 additions & 0 deletions packages/themes/ecl/src/ecl-eu/components/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,19 @@
.expanded > div > .expand-button kol-icon::part(icon)::before {
content: '\eab4';
}

.toggle-button a > .kol-span-wc,
.toggle-button button > .kol-span-wc {
color: #0e47cb;
}

.toggle-button a:focus-visible > .kol-span-wc,
.toggle-button button:focus-visible > .kol-span-wc {
outline-color: #0e47cb;
}

.toggle-button a:hover > .kol-span-wc,
.toggle-button button:hover > .kol-span-wc {
color: #0e47cb;
}
}
24 changes: 23 additions & 1 deletion packages/themes/itzbund/src/components/nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
/* compact button */
:host > div > div:last-child {
margin-top: 0.5em;
width: 100%;
text-align: center;
}

Expand All @@ -104,4 +103,27 @@
.kol-span-wc {
justify-items: baseline;
}

.toggle-button :is(a, button) > .kol-span-wc,
.toggle-button :is(a, button):disabled:hover > .kol-span-wc {
background-color: var(--color-ghost);
color: var(--color-anthrazit);
display: grid;
place-items: center;
border-radius: 32px;
border-style: solid;
min-width: var(--a11y-min-size);
min-height: var(--a11y-min-size);
border-width: var(--spacing);
font-size: inherit;
padding: 0 rem(8);
border-color: transparent;
}

.toggle-button :is(a, button):hover > .kol-span-wc,
.toggle-button :is(a, button):focus > .kol-span-wc {
background-color: var(--color-ghost);
border-color: var(--color-ghost);
color: var(--color-anthrazit);
}
}
Loading