-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1403 from swisstopo/feature/viewer-1366-struktur-…
…datenpanel-anpassen Feature 1366: Struktur Datenpanel anpassen
- Loading branch information
Showing
29 changed files
with
1,011 additions
and
265 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,44 @@ | ||
import {css, html, LitElement} from 'lit'; | ||
import {customElement, property} from 'lit/decorators.js'; | ||
|
||
@customElement('ngm-core-button') | ||
export class CoreButton extends LitElement { | ||
@property({reflect: true}) | ||
accessor variant: Variant = 'default'; | ||
|
||
@property({type: Boolean, attribute: 'active', reflect: true}) | ||
accessor isActive: boolean = false; | ||
|
||
readonly render = () => html` | ||
<button> | ||
<slot></slot> | ||
</button> | ||
`; | ||
|
||
static readonly styles = css` | ||
button { | ||
font-family: var(--font); | ||
font-size: 14px; | ||
} | ||
:host([variant='text']) button { | ||
color: var(--color-highlight--darker); | ||
border: none; | ||
background-color: transparent; | ||
cursor: pointer; | ||
} | ||
:host([variant='text'][active]) button { | ||
color: var(--color-action); | ||
} | ||
:host([variant='text']) button:hover { | ||
color: var(--color-action--light); | ||
} | ||
`; | ||
} | ||
|
||
export type Variant = | ||
| 'default' | ||
| 'text' |
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,49 @@ | ||
import {css, html, LitElement} from 'lit'; | ||
import {customElement, property} from 'lit/decorators.js'; | ||
|
||
@customElement('ngm-core-icon') | ||
export class CoreIcon extends LitElement { | ||
@property() | ||
accessor icon: IconName | null = null; | ||
|
||
@property({type: Boolean, attribute: 'interactive'}) | ||
accessor isInteractive: boolean = false; | ||
|
||
readonly render = () => html``; | ||
|
||
static readonly styles = css` | ||
:host { | ||
display: inline-block; | ||
--size: var(--icon-size--normal); | ||
width: var(--size); | ||
height: var(--size); | ||
background-color: var(--color-bg-contrast); | ||
mask: var(--mask, none) no-repeat center; | ||
-webkit-mask: var(--mask, none) no-repeat center; | ||
/* Hide element if no valid icon has been specified. */ | ||
visibility: hidden; | ||
} | ||
:host([interactive]:hover) { | ||
cursor: pointer; | ||
background-color: var(--color-action); | ||
} | ||
:host([icon='close']) { | ||
visibility: initial; | ||
--mask: url('images/i_close.svg'); | ||
} | ||
:host([icon='dropdown']) { | ||
visibility: initial; | ||
--mask: url('images/i_menu-1.svg') | ||
} | ||
`; | ||
} | ||
|
||
export type IconName = | ||
| 'close' | ||
| 'dropdown' |
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,2 @@ | ||
import './core-button'; | ||
import './core-icon'; |
Oops, something went wrong.