-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,064 additions
and
85 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
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
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
40 changes: 40 additions & 0 deletions
40
packages/components/src/components/search-list-box/search-list-box.css
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
:host { | ||
/*listbox*/ | ||
--background-listbox: var(--telekom-color-background-surface); | ||
--box-shadow-listbox: 0 2px 4px 0 rgba(0, 0, 0, 0.1), | ||
0 4px 16px 0 rgba(0, 0, 0, 0.1); | ||
--max-height-listbox: 300px; | ||
--z-index-listbox: 99; | ||
--radius: var(--telekom-radius-standard); | ||
} | ||
/*listbox*/ | ||
[part='listbox'] { | ||
position: relative; | ||
} | ||
|
||
[part='listbox-scroll-container'] { | ||
max-height: var(--max-height-listbox); | ||
overflow-y: auto; | ||
} | ||
|
||
[part='listbox-pad'] { | ||
background: var(--background-listbox); | ||
box-shadow: var(--box-shadow-listbox); | ||
border-radius: var(--radius); | ||
padding: var(--radius) 0; | ||
margin-top: var(--telekom-line-weight-highlight); | ||
left: 0; | ||
position: absolute; | ||
top: 100%; | ||
width: 100%; | ||
z-index: var(--z-index-listbox); | ||
display: none; | ||
} | ||
|
||
:host([open]) [part='listbox-pad'] { | ||
display: block; | ||
} | ||
|
||
[part~='transparent'] [part='listbox'] { | ||
background-color: transparent; | ||
} |
33 changes: 33 additions & 0 deletions
33
packages/components/src/components/search-list-box/search-list-box.tsx
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Component, h, Host, Prop } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'scale-search-list-box', | ||
styleUrl: 'search-list-box.css', | ||
shadow: true, | ||
}) | ||
export class SearchListBox { | ||
@Prop() open?: boolean; | ||
@Prop() comboboxId?: string = 'combobox'; | ||
@Prop() refListBoxPadEl: any; | ||
@Prop() refListBoxEl: any; | ||
|
||
render() { | ||
return ( | ||
<Host open={this.open}> | ||
<div part="listbox-pad" ref={this.refListBoxPadEl}> | ||
<div part="listbox-scroll-container"> | ||
<div | ||
part="listbox" | ||
role="listbox" | ||
id={`${this.comboboxId}-listbox`} | ||
aria-labelledby={`${this.comboboxId}-label`} | ||
tabindex="-1" | ||
> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</div> | ||
</Host> | ||
); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/components/src/components/search-list-category/search-list-category.css
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
:host { | ||
} | ||
|
||
:host [part='head'] { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 8px 8px 8px 16px; | ||
color: var(--telekom-color-text-and-icon-additional); | ||
font: var(--telekom-text-style-small-bold); | ||
} |
26 changes: 26 additions & 0 deletions
26
packages/components/src/components/search-list-category/search-list-category.tsx
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, Element, h, Host, Prop } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'scale-search-list-category', | ||
styleUrl: 'search-list-category.css', | ||
shadow: true, | ||
}) | ||
export class SearchListCategory { | ||
@Element() hostElement: HTMLElement; | ||
|
||
@Prop() refListBoxEl: any; | ||
|
||
render() { | ||
return ( | ||
<Host> | ||
<div part="base"> | ||
<div part="head"> | ||
<slot name="title"></slot> | ||
<slot name="action"></slot> | ||
</div> | ||
<slot></slot> | ||
</div> | ||
</Host> | ||
); | ||
} | ||
} |
Oops, something went wrong.