-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: #7036
- Loading branch information
Showing
6 changed files
with
198 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 43 additions & 39 deletions
82
packages/components/src/components/pagination/test/__snapshots__/snapshot.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,58 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`kol-pagination should render with _label="Label" _on={} _max=0 _page=4 _hasButtons=false _siblingCount=0 1`] = ` | ||
<kol-pagination class="kol-pagination"> | ||
<kol-pagination> | ||
<template shadowrootmode="open"> | ||
<nav aria-label="Label"> | ||
<ul class="navigation-list"></ul> | ||
</nav> | ||
<div class="kol-pagination"> | ||
<nav aria-label="Label"> | ||
<ul class="kol-pagination__navigation-list"></ul> | ||
</nav> | ||
</div> | ||
</template> | ||
</kol-pagination> | ||
`; | ||
|
||
exports[`kol-pagination should render with _label="Label" _on={} _max=2 _page=1 1`] = ` | ||
<kol-pagination class="kol-pagination"> | ||
<kol-pagination> | ||
<template shadowrootmode="open"> | ||
<nav aria-label="Label"> | ||
<ul class="navigation-list"> | ||
<li> | ||
<kol-button-wc _disabled="" _hidelabel="" _label="kol-page-first" _tooltipalign="top" class="first" exportparts="icon"></kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _disabled="" _hidelabel="" _label="kol-page-back" _tooltipalign="top" class="previous" exportparts="icon"></kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _disabled="" _label="" class="selected"> | ||
<span slot="expert"> | ||
<span class="visually-hidden"> | ||
kol-page | ||
<div class="kol-pagination"> | ||
<nav aria-label="Label"> | ||
<ul class="kol-pagination__navigation-list"> | ||
<li> | ||
<kol-button-wc _disabled="" _hidelabel="" _label="kol-page-first" _tooltipalign="top" class="first" exportparts="icon"></kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _disabled="" _hidelabel="" _label="kol-page-back" _tooltipalign="top" class="previous" exportparts="icon"></kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _disabled="" _label="" class="selected"> | ||
<span slot="expert"> | ||
<span class="visually-hidden"> | ||
kol-page | ||
</span> | ||
1 | ||
</span> | ||
1 | ||
</span> | ||
</kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _label="" exportparts="icon"> | ||
<span slot="expert"> | ||
<span class="visually-hidden"> | ||
kol-page | ||
</kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _label="" exportparts="icon"> | ||
<span slot="expert"> | ||
<span class="visually-hidden"> | ||
kol-page | ||
</span> | ||
2 | ||
</span> | ||
2 | ||
</span> | ||
</kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _hidelabel="" _label="kol-page-next" _tooltipalign="top" class="next" exportparts="icon"></kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _hidelabel="" _label="kol-page-last" _tooltipalign="top" class="last" exportparts="icon"></kol-button-wc> | ||
</li> | ||
</ul> | ||
</nav> | ||
</kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _hidelabel="" _label="kol-page-next" _tooltipalign="top" class="next" exportparts="icon"></kol-button-wc> | ||
</li> | ||
<li> | ||
<kol-button-wc _hidelabel="" _label="kol-page-last" _tooltipalign="top" class="last" exportparts="icon"></kol-button-wc> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</template> | ||
</kol-pagination> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 37 additions & 35 deletions
72
packages/themes/ecl/src/ecl-ec/components/pagination.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,50 @@ | ||
@import '../../mixins/rem'; | ||
|
||
@layer kol-theme-component { | ||
:host { | ||
.kol-pagination { | ||
display: grid; | ||
font-family: var(--font-family); | ||
} | ||
|
||
.button { | ||
appearance: none; | ||
background-color: none; | ||
outline: none; | ||
text-decoration: none; | ||
} | ||
&__navigation-list { | ||
.button { | ||
appearance: none; | ||
background-color: none; | ||
outline: none; | ||
text-decoration: none; | ||
} | ||
|
||
.button-inner { | ||
background-color: var(--color-yellow); | ||
border: rem(2) solid var(--color-yellow); | ||
color: var(--color-black); | ||
font-weight: var(--font-weight-bold); | ||
min-height: var(--a11y-min-size); | ||
min-width: var(--a11y-min-size); | ||
padding: 0.25em 0.75em; | ||
} | ||
.button-inner { | ||
background-color: var(--color-yellow); | ||
border: rem(2) solid var(--color-yellow); | ||
color: var(--color-black); | ||
font-weight: var(--font-weight-bold); | ||
min-height: var(--a11y-min-size); | ||
min-width: var(--a11y-min-size); | ||
padding: 0.25em 0.75em; | ||
} | ||
|
||
.button:not(:disabled):hover .button-inner { | ||
background-color: var(--color-yellow-120); | ||
border-color: var(--color-yellow-120); | ||
} | ||
.button:not(:disabled):hover .button-inner { | ||
background-color: var(--color-yellow-120); | ||
border-color: var(--color-yellow-120); | ||
} | ||
|
||
.button:focus .button-inner { | ||
outline-offset: rem(-4); | ||
outline: rem(2) solid var(--color-black); | ||
} | ||
.button:focus .button-inner { | ||
outline-offset: rem(-4); | ||
outline: rem(2) solid var(--color-black); | ||
} | ||
|
||
.button:disabled .button-inner { | ||
cursor: not-allowed; | ||
opacity: 0.5; | ||
} | ||
.button:disabled .button-inner { | ||
cursor: not-allowed; | ||
opacity: 0.5; | ||
} | ||
|
||
.selected .button-inner { | ||
background-color: var(--color-blue); | ||
border-color: var(--color-blue); | ||
color: var(--color-white); | ||
opacity: 1; | ||
text-decoration: underline; | ||
.selected .button-inner { | ||
background-color: var(--color-blue); | ||
border-color: var(--color-blue); | ||
color: var(--color-white); | ||
opacity: 1; | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.