-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui-kit): alwatr-card element (elevated, filled, outlined cards) (#…
…579)
- Loading branch information
Showing
8 changed files
with
268 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import {customElement, AlwatrSmartElement, css, html} from '@alwatr/element'; | ||
|
||
import '@alwatr/ui-kit/card/card.js'; | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'alwatr-page-card': AlwatrPageCard; | ||
} | ||
} | ||
|
||
/** | ||
* Alwatr Demo Home Page | ||
*/ | ||
@customElement('alwatr-page-card') | ||
export class AlwatrPageCard extends AlwatrSmartElement { | ||
static override styles = css` | ||
:host { | ||
display: flex; | ||
flex-wrap: wrap; | ||
padding: var(--sys-spacing-track); | ||
box-sizing: border-box; | ||
height: 100%; | ||
gap: var(--sys-spacing-track); | ||
} | ||
alwatr-card { | ||
flex-grow: 1; | ||
display: flex; | ||
align-items: flex-end; | ||
width: 25%; | ||
user-select: none; | ||
} | ||
input { | ||
padding: var(--sys-spacing-track); | ||
color: inherit; | ||
background-color: transparent; | ||
border: 0; | ||
border-bottom: 1px solid transparent; | ||
} | ||
input:focus { | ||
border-bottom-color: currentColor; | ||
outline: 0; | ||
} | ||
`; | ||
|
||
override render(): unknown { | ||
super.render(); | ||
return html` | ||
<alwatr-card type="elevated"><input type="text" value="elevated"/></alwatr-card> | ||
<alwatr-card type="elevated"><input type="text" value="elevated"/></alwatr-card> | ||
<alwatr-card type="elevated" disabled><input type="text" value="elevated" disabled/></alwatr-card> | ||
<alwatr-card type="filled"><input type="text" value="filled"/></alwatr-card> | ||
<alwatr-card type="filled"><input type="text" value="filled"/></alwatr-card> | ||
<alwatr-card type="filled" disabled><input type="text" value="filled" disabled/></alwatr-card> | ||
<alwatr-card type="outlined"><input type="text" value="outlined"/></alwatr-card> | ||
<alwatr-card type="outlined"><input type="text" value="outlined"/></alwatr-card> | ||
<alwatr-card type="outlined" disabled><input type="text" value="outlined" disabled/></alwatr-card> | ||
<alwatr-card type="outlined"><input type="text" value="outlined"/></alwatr-card> | ||
<alwatr-card type="elevated"><input type="text" value="elevated"/></alwatr-card> | ||
<alwatr-card type="filled"><input type="text" value="filled"/></alwatr-card> | ||
`; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,127 +1,127 @@ | ||
:root { | ||
--elevation-0: | ||
0px 0px 0px 0px rgba(0, 0, 0, 0.2), | ||
0px 0px 0px 0px rgba(0, 0, 0, 0.14), | ||
0px 0px 0px 0px rgba(0, 0, 0, 0.12) | ||
0px 0px 0px 0px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 0px 0px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 0px 0px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-1: | ||
0px 2px 1px -1px rgba(0, 0, 0, 0.2), | ||
0px 1px 1px 0px rgba(0, 0, 0, 0.14), | ||
0px 1px 3px 0px rgba(0, 0, 0, 0.12) | ||
0px 2px 1px -1px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 1px 1px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 1px 3px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-2: | ||
0px 3px 1px -2px rgba(0, 0, 0, 0.2), | ||
0px 2px 2px 0px rgba(0, 0, 0, 0.14), | ||
0px 1px 5px 0px rgba(0, 0, 0, 0.12) | ||
0px 3px 1px -2px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 2px 2px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 1px 5px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-3: | ||
0px 3px 3px -2px rgba(0, 0, 0, 0.2), | ||
0px 3px 4px 0px rgba(0, 0, 0, 0.14), | ||
0px 1px 8px 0px rgba(0, 0, 0, 0.12) | ||
0px 3px 3px -2px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 3px 4px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 1px 8px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-4: | ||
0px 2px 4px -1px rgba(0, 0, 0, 0.2), | ||
0px 4px 5px 0px rgba(0, 0, 0, 0.14), | ||
0px 1px 10px 0px rgba(0, 0, 0, 0.12) | ||
0px 2px 4px -1px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 4px 5px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 1px 10px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-5: | ||
0px 3px 5px -1px rgba(0, 0, 0, 0.2), | ||
0px 5px 8px 0px rgba(0, 0, 0, 0.14), | ||
0px 1px 14px 0px rgba(0, 0, 0, 0.12) | ||
0px 3px 5px -1px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 5px 8px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 1px 14px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-6: | ||
0px 3px 5px -1px rgba(0, 0, 0, 0.2), | ||
0px 6px 10px 0px rgba(0, 0, 0, 0.14), | ||
0px 1px 18px 0px rgba(0, 0, 0, 0.12) | ||
0px 3px 5px -1px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 6px 10px 0px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 1px 18px 0px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-7: | ||
0px 4px 5px -2px rgba(0, 0, 0, 0.2), | ||
0px 7px 10px 1px rgba(0, 0, 0, 0.14), | ||
0px 2px 16px 1px rgba(0, 0, 0, 0.12) | ||
0px 4px 5px -2px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 7px 10px 1px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 2px 16px 1px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-8: | ||
0px 5px 5px -3px rgba(0, 0, 0, 0.2), | ||
0px 8px 10px 1px rgba(0, 0, 0, 0.14), | ||
0px 3px 14px 2px rgba(0, 0, 0, 0.12) | ||
0px 5px 5px -3px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 8px 10px 1px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 3px 14px 2px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-9: | ||
0px 5px 6px -3px rgba(0, 0, 0, 0.2), | ||
0px 9px 12px 1px rgba(0, 0, 0, 0.14), | ||
0px 3px 16px 2px rgba(0, 0, 0, 0.12) | ||
0px 5px 6px -3px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 9px 12px 1px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 3px 16px 2px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-10: | ||
0px 6px 6px -3px rgba(0, 0, 0, 0.2), | ||
0px 10px 14px 1px rgba(0, 0, 0, 0.14), | ||
0px 4px 18px 3px rgba(0, 0, 0, 0.12) | ||
0px 6px 6px -3px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 10px 14px 1px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 4px 18px 3px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-11: | ||
0px 6px 7px -4px rgba(0, 0, 0, 0.2), | ||
0px 11px 15px 1px rgba(0, 0, 0, 0.14), | ||
0px 4px 20px 3px rgba(0, 0, 0, 0.12) | ||
0px 6px 7px -4px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 11px 15px 1px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 4px 20px 3px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-12: | ||
0px 7px 8px -4px rgba(0, 0, 0, 0.2), | ||
0px 12px 17px 2px rgba(0, 0, 0, 0.14), | ||
0px 5px 22px 4px rgba(0, 0, 0, 0.12) | ||
0px 7px 8px -4px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 12px 17px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 5px 22px 4px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-13: | ||
0px 7px 8px -4px rgba(0, 0, 0, 0.2), | ||
0px 13px 19px 2px rgba(0, 0, 0, 0.14), | ||
0px 5px 24px 4px rgba(0, 0, 0, 0.12) | ||
0px 7px 8px -4px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 13px 19px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 5px 24px 4px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-14: | ||
0px 7px 9px -4px rgba(0, 0, 0, 0.2), | ||
0px 14px 21px 2px rgba(0, 0, 0, 0.14), | ||
0px 5px 26px 4px rgba(0, 0, 0, 0.12) | ||
0px 7px 9px -4px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 14px 21px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 5px 26px 4px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-15: | ||
0px 8px 9px -5px rgba(0, 0, 0, 0.2), | ||
0px 15px 22px 2px rgba(0, 0, 0, 0.14), | ||
0px 6px 28px 5px rgba(0, 0, 0, 0.12) | ||
0px 8px 9px -5px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 15px 22px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 6px 28px 5px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-16: | ||
0px 8px 10px -5px rgba(0, 0, 0, 0.2), | ||
0px 16px 24px 2px rgba(0, 0, 0, 0.14), | ||
0px 6px 30px 5px rgba(0, 0, 0, 0.12) | ||
0px 8px 10px -5px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 16px 24px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 6px 30px 5px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-17: | ||
0px 8px 11px -5px rgba(0, 0, 0, 0.2), | ||
0px 17px 26px 2px rgba(0, 0, 0, 0.14), | ||
0px 6px 32px 5px rgba(0, 0, 0, 0.12) | ||
0px 8px 11px -5px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 17px 26px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 6px 32px 5px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-18: | ||
0px 9px 11px -5px rgba(0, 0, 0, 0.2), | ||
0px 18px 28px 2px rgba(0, 0, 0, 0.14), | ||
0px 7px 34px 6px rgba(0, 0, 0, 0.12) | ||
0px 9px 11px -5px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 18px 28px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 7px 34px 6px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-19: | ||
0px 9px 12px -6px rgba(0, 0, 0, 0.2), | ||
0px 19px 29px 2px rgba(0, 0, 0, 0.14), | ||
0px 7px 36px 6px rgba(0, 0, 0, 0.12) | ||
0px 9px 12px -6px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 19px 29px 2px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 7px 36px 6px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-20: | ||
0px 10px 13px -6px rgba(0, 0, 0, 0.2), | ||
0px 20px 31px 3px rgba(0, 0, 0, 0.14), | ||
0px 8px 38px 7px rgba(0, 0, 0, 0.12) | ||
0px 10px 13px -6px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 20px 31px 3px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 8px 38px 7px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-21: | ||
0px 10px 13px -6px rgba(0, 0, 0, 0.2), | ||
0px 21px 33px 3px rgba(0, 0, 0, 0.14), | ||
0px 8px 40px 7px rgba(0, 0, 0, 0.12) | ||
0px 10px 13px -6px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 21px 33px 3px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 8px 40px 7px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-22: | ||
0px 10px 14px -6px rgba(0, 0, 0, 0.2), | ||
0px 22px 35px 3px rgba(0, 0, 0, 0.14), | ||
0px 8px 42px 7px rgba(0, 0, 0, 0.12) | ||
0px 10px 14px -6px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 22px 35px 3px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 8px 42px 7px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-23: | ||
0px 11px 14px -7px rgba(0, 0, 0, 0.2), | ||
0px 23px 36px 3px rgba(0, 0, 0, 0.14), | ||
0px 9px 44px 8px rgba(0, 0, 0, 0.12) | ||
0px 11px 14px -7px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 23px 36px 3px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 9px 44px 8px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
--elevation-24: | ||
0px 11px 15px -7px rgba(0, 0, 0, 0.2), | ||
0px 24px 38px 3px rgba(0, 0, 0, 0.14), | ||
0px 9px 46px 8px rgba(0, 0, 0, 0.12) | ||
0px 11px 15px -7px hsla(var(--sys-color-shadow-hsl), 0.2), | ||
0px 24px 38px 3px hsla(var(--sys-color-shadow-hsl), 0.14), | ||
0px 9px 46px 8px hsla(var(--sys-color-shadow-hsl), 0.12) | ||
; | ||
} |
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
Oops, something went wrong.