hedera-web/js/htk/style/components.scss

705 lines
9.8 KiB
SCSS
Raw Normal View History

2022-05-26 06:08:31 +00:00
@import "./variables";
2022-05-24 10:18:44 +00:00
2022-05-25 18:04:16 +00:00
/* Icon */
.htk-icon {}
/* Button */
.htk-button {
display: flex;
align-items: center;
gap: 8px;
& > .htk-icon {
display: block;
}
}
/* Grid */
2022-05-21 21:31:56 +00:00
.htk-grid {
margin: auto;
border-collapse: collapse;
2022-05-21 21:31:56 +00:00
& > thead > tr,
& > tfoot > tr {
2022-05-25 18:04:16 +00:00
background-color: $color-primary;
2022-05-21 21:31:56 +00:00
vertical-align: middle;
height: 3em;
}
th {
color: white;
cursor: pointer;
font-weight: normal;
padding: 0 0.4em;
}
th:hover {
background-color: rgba(1, 1, 1, 0.2);
}
tr {
height: 3.5em;
}
& > tfoot a,
& > thead a {
color: black;
}
tr.pair-row {
background-color: transparent;
}
& > tbody tr {
border-top: 1px solid #DDD;
}
& > tbody tr:first-child {
border-top: none;
}
& > tbody td {
margin: 0;
padding: 0 0.5em;
}
th,
td {
text-align: left;
}
td:first-child,
th:first-child {
padding-left: 1em;
}
td:last-child,
th:last-child {
padding-right: 1em;
}
.message {
padding: 1.5em;
text-align: center;
}
.message > * {
display: inline-block;
vertical-align: middle;
padding-right: .8em;
}
}
2022-05-21 21:31:56 +00:00
/* Repater */
.htk-repeater {
& > .message {
padding: 1.5em;
text-align: center;
& > * {
vertical-align: middle;
}
& > span,
& > .htk-spinner {
display: inline-block;
padding-right: 10px;
}
}
}
/* Grid cells */
2022-05-21 21:31:56 +00:00
th.cell-spin {
text-align: right;
}
2022-05-21 21:31:56 +00:00
td.cell-spin {
width: 2.5em;
text-align: right;
}
th.cell-check,
2022-05-21 21:31:56 +00:00
th.cell-radio {
text-align: center;
}
2022-05-21 21:31:56 +00:00
td.cell-button {
2022-05-25 18:04:16 +00:00
max-width: 20px;
text-align: center;
}
td.cell-button > button,
2022-05-21 21:31:56 +00:00
td.cell-button > a {
2022-05-25 18:04:16 +00:00
@extend %clickable;
display: block;
height: 44px;
width: 44px;
margin: 0 auto;
2022-05-25 18:04:16 +00:00
border-radius: 50%;
padding: 10px;
border: none;
background-color: transparent;
box-sizing: border-box;
2022-05-25 18:04:16 +00:00
& > .htk-icon {
display: block;
}
}
td.cell-button > button:hover,
2022-05-21 21:31:56 +00:00
td.cell-button > a:hover {
background-color: rgba(1, 1, 1, 0.1);
}
2022-05-21 21:31:56 +00:00
td.cell-button img {
height: 1.5em;
width: 1.5em;
display: block;
margin: auto;
padding: 0;
}
2022-05-21 21:31:56 +00:00
td.cell-image {
text-align: center;
}
2022-05-21 21:31:56 +00:00
td.cell-image .htk-image {
max-width: 2.5em;
max-height: 2.5em;
display: block;
margin: auto;
}
/* Select */
2015-10-14 11:51:43 +00:00
2022-05-25 18:04:16 +00:00
.htk-select,
.htk-date-chooser {
display: flex;
align-items: center;
font-weight: normal;
& > span {
flex: 1;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
& > .htk-icon {
flex: none;
color: #666;
}
}
2022-05-21 21:31:56 +00:00
.htk-select {
width: 100%;
}
2022-05-21 21:31:56 +00:00
.htk-select-menu {
height: 100%;
max-height: 80em;
overflow: auto;
min-width: 14em;
2022-05-24 10:18:44 +00:00
2022-05-25 18:04:16 +00:00
tbody > tr {
border-top: none;
height: 2.5em;
}
td.message {
padding: 1em;
}
tr:hover {
background-color: rgba(1, 1, 1, 0.1);
cursor: pointer;
}
td {
max-width: 11em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
2022-05-24 10:18:44 +00:00
/* List */
.htk-list {
2022-05-25 18:04:16 +00:00
a.item,
.item.clickable {
2022-05-24 10:18:44 +00:00
@extend %clickable;
2022-05-25 18:04:16 +00:00
}
.item {
2022-05-24 10:18:44 +00:00
padding: 20px;
border-bottom: 1px solid #DDD;
display: flex;
align-items: center;
& > .side {
flex: none;
}
& > .content {
flex: 1;
2022-05-26 06:08:31 +00:00
overflow: hidden;
2022-05-24 10:18:44 +00:00
& > .important {
font-weight: bold;
font-size: 1rem;
margin-bottom: .5em;
}
& > p {
margin: .1em 0;
2022-05-26 06:08:31 +00:00
text-overflow: ellipsis;
white-space: nowrap;
2022-05-26 08:00:19 +00:00
overflow: hidden;
2022-05-24 10:18:44 +00:00
}
}
& > .actions {
flex: none;
display: none;
2022-05-25 18:04:16 +00:00
align-items: center;
2022-05-24 10:18:44 +00:00
& > .htk-button {
margin: 0;
}
& > * {
display: inline-block;
vertical-align: middle;
}
& > input {
margin: .6em;
}
}
}
.item:hover > .actions {
2022-05-25 18:04:16 +00:00
display: flex;
2022-05-24 10:18:44 +00:00
}
.item:last-child {
border-bottom: none;
}
2015-10-14 11:51:43 +00:00
}
/* Calendar */
2022-05-21 21:31:56 +00:00
.htk-calendar {
2022-05-24 10:18:44 +00:00
@extend %box;
width: 20em;
2022-05-24 10:18:44 +00:00
table {
border-collapse: collapse;
}
thead tr,
tfoot tr {
font-weight: normal;
vertical-align: middle;
text-align: center;
height: 3em;
}
thead > tr {
&.weekdays > th {
font-weight: normal;
color: #999;
text-transform: lowercase;
}
& > th {
&.previous, &.next {
font-size: .8rem;
button {
border-radius: 50%;
padding: 10px;
display: block;
margin: 0 auto;
& > .htk-icon {
font-size: 1rem;
}
}
}
&.month-year {
font-size: 1.2rem;
text-transform: lowercase;
}
}
}
tfoot tr {
border-top: none;
}
th.button {
display: table-cell;
}
th.button:hover {
cursor: pointer;
background-color: rgba(1, 1, 1, 0.2);
}
col {
width: 14.2%;
}
tr {
height: 2em;
}
tbody td {
text-align: right;
}
tbody td > div {
height: 2em;
width: 2em;
line-height: 2em;
text-align: center;
border-radius: 2em;
padding: 0.3em;
margin: 0 auto;
color: #555;
}
2022-05-25 18:04:16 +00:00
div {
&.disabled {
color: #bbb;
}
&.today {
font-weight: bold;
color: black;
}
&.selected {
color: white;
background-color: $color-primary;
}
&.enabled {
@extend %clickable;
&:hover {
background-color: rgba(140, 198, 63, 0.8);
}
}
2022-05-24 10:18:44 +00:00
}
}
2015-12-10 13:48:43 +00:00
/* Image */
2022-05-21 21:31:56 +00:00
.htk-image {
2016-05-02 13:05:49 +00:00
position: relative;
overflow: hidden;
2022-05-25 18:04:16 +00:00
&.clickable:hover {
cursor: pointer;
opacity: 0.85;
}
& > img {
display: block;
height: 100%;
width: 100%;
}
& > button {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: .15em;
display: none;
}
&:hover > button {
display: block;
}
& > button > img {
display: block;
height: 1.2em;
height: 1.2em;
}
2016-05-02 13:05:49 +00:00
}
2015-12-10 13:48:43 +00:00
/* Full image */
2022-05-25 18:04:16 +00:00
.htk-full-image {
img {
display: block;
cursor: pointer;
}
.htk-spinner {
background-color: #FFF;
margin: .6em;
display: block;
}
2016-05-02 13:05:49 +00:00
}
/* Image editor */
2022-05-21 21:31:56 +00:00
.htk-image-editor {
width: 18em;
2016-05-02 13:05:49 +00:00
margin: 0 auto;
padding: 1.5em;
2022-05-25 18:04:16 +00:00
h2 {
color: white;
background-color: #009688;
text-align: left;
font-size: 1.3em;
line-height: 1.7em;
font-weight: normal;
padding: 0.6em 0.8em;
margin: 0;
}
iframe {
display: none;
}
.footer {
margin-top: 2em;
& > .htk-spinner {
padding-right: 1.2em;
height: 1.3em;
width: 1.3em;
}
& > .htk-spinner,
& > input {
float: right;
}
}
}
/* Toast */
2022-05-21 21:31:56 +00:00
.htk-toast {
z-index: 210;
display: block;
position: fixed;
left: 50%;
top: 4em;
width: 21em;
2016-10-16 14:16:08 +00:00
margin-left: -10.5em;
text-align: center;
overflow: auto;
max-height: 40em;
2016-05-04 14:36:51 +00:00
overflow: visible;
2016-10-30 22:48:18 +00:00
2022-05-25 18:04:16 +00:00
& > div {
margin: .5em 0;
padding: .5em 2%;
border-radius: 0.1em;
box-shadow: 0 0 0.4em rgba(1, 1, 1, 0.6);
width: 96%;
opacity: 0;
transform: translateZ(0) translateY(-1em);
-webkit-transform: translateZ(0) translateY(-1em);
transition-property: opacity, transform;
transition-duration: 200ms;
transition-timing-function: ease-out;
&.show {
opacity: 1;
transform: translateZ(0) translateY(0em);
-webkit-transform: translateZ(0) translateY(0em);
}
}
& > .message {
background-color: #BBFFBB;
color: #363;
}
& > .warning {
background-color: #FFE0B2;
color: #C30;
}
& > .error {
background-color: #FFCDD2;
color: #A00;
}
}
/* Popup */
2022-05-21 21:31:56 +00:00
.htk-background {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 190;
background-color: rgba(1, 1, 1, 0.7);
opacity: 0;
transition: opacity 200ms ease-in-out;
}
2022-05-21 21:31:56 +00:00
.htk-popup {
z-index: 200;
display: block;
position: fixed;
overflow: hidden;
background-color: white;
2022-05-21 21:31:56 +00:00
border-radius: 10px;
box-shadow: 0 0 0.4em rgba(1, 1, 1, 0.6);
box-sizing: content-box;
2022-05-25 18:04:16 +00:00
&.modal {
position: absolute;
font-size: 1.2em;
top: 50%;
left: 50%;
}
& > * {
border-radius: 0.1em;
}
2016-05-04 14:36:51 +00:00
}
/* Dialog */
2022-05-21 21:31:56 +00:00
.htk-dialog {
padding: 1.5em;
max-width: 20em;
font-weight: normal;
color: #555;
2022-05-25 18:04:16 +00:00
p {
margin: 0;
}
img {
float: left;
height: 3em;
margin-top: 0;
margin-right: 1em;
}
p {
padding: 0;
}
.button-bar > button {
float: right;
margin-left: 1em;
margin-top: .5em;
}
}
/* Assistant */
2022-05-21 21:31:56 +00:00
.htk-assistant > div {
display: none;
2022-05-21 21:31:56 +00:00
& > h2 {
text-align: center;
font-weight: normal;
2022-05-24 10:18:44 +00:00
font-size: 1.5rem;
2022-05-21 21:31:56 +00:00
margin: 0;
padding: 0;
margin-bottom: 1em;
font-weight: bold;
}
}
/* Assistant bar */
2022-05-21 21:31:56 +00:00
.htk-assistant-bar {
position: relative;
2018-05-17 08:52:27 +00:00
padding: .8em;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 100%;
2022-05-21 21:31:56 +00:00
& > button {
border-radius: 50%;
padding: .5em;
margin: 0;
text-align: center;
& > img {
display: block;
width: 1.8em;
padding: .5em;
}
}
& > .end {
display: none;
color: #8cc63f;
& > .icon {
font-size: 1.6rem;
}
}
& > .steps {
display: flex;
align-items: center;
& > div {
background-color: #AAA;
width: .5em;
height: .5em;
cursor: pointer;
border-radius: 50%;
margin: .5em;
transition-property: width, height;
transition-duration: 100ms;
transition-timing-function: ease-in-out;
&.selected {
background-color: #666;
width: 1em;
height: 1em;
}
&:hover {
opacity: .7;
}
}
& > img {
width: 1.3em;
margin: 0 .2em;
cursor: pointer;
&:hover {
opacity: .7;
}
}
}
}
2015-11-19 13:57:23 +00:00
/* Search entry */
2022-05-21 21:31:56 +00:00
.htk-search-entry {
2022-05-25 18:04:16 +00:00
display: flex;
align-items: center;
2022-05-26 14:26:20 +00:00
gap: 6px;
2015-11-19 13:57:23 +00:00
background-color: white;
2022-05-25 18:04:16 +00:00
height: 40px;
border-radius: 20px;
2022-05-26 14:26:20 +00:00
padding: 0 12px;
2022-05-25 18:04:16 +00:00
overflow: hidden;
& > * {
display: inline-block;
vertical-align: middle;
}
& > .htk-icon {
display: block;
margin: 0;
color: gray;
}
& > .entry {
margin: 0;
border: none;
2022-05-26 14:26:20 +00:00
width: 80px;
2022-05-25 18:04:16 +00:00
box-shadow: none;
padding-right: 0;
padding-left: 0;
height: inherit;
}
& > .entry:focus {
background-color: initial;
}
2015-11-19 13:57:23 +00:00
}
2018-01-16 16:26:37 +00:00
/* Spinner */
2015-11-19 13:57:23 +00:00
2022-05-21 21:31:56 +00:00
.htk-spinner {
2016-05-02 13:05:49 +00:00
width: 1.8em;
height: 1.8em;
2015-11-19 13:57:23 +00:00
position: relative;
display: inline-block;
2022-05-25 18:04:16 +00:00
& > .spinner {
left: 0;
position: absolute;
width: inherit;
height: inherit;
box-sizing: border-box;
border-radius: 50%;
border: 2px solid transparent;
border-top-color: #666;
border-left-color: #666;
animation: spinner 1s linear infinite;
-webkit-animation: spinner 1s linear infinite;
}
&.dark > .spinner {
border-top-color: white;
border-left-color: white;
}
2015-11-19 13:57:23 +00:00
}
2022-05-21 21:31:56 +00:00
@keyframes spinner {
2015-11-19 13:57:23 +00:00
to {transform: rotate(360deg);}
}
2022-05-21 21:31:56 +00:00
@-webkit-keyframes spinner {
2015-11-19 13:57:23 +00:00
to {-webkit-transform: rotate(360deg);}
}
2018-01-16 16:26:37 +00:00
/* Loader */
2022-05-21 21:31:56 +00:00
.htk-loader > .spinner {
2018-01-16 16:26:37 +00:00
text-align: center;
}