Change styles in(dropdown, grid, inputs, modal, radio, sidebar) Add new components(alerts, master search, pagination, tooltip)
parent
98ff5d5dd8
commit
e4b246a8bc
@ -0,0 +1,126 @@
|
||||
@use "../util" as *;
|
||||
@use "../globals" as *;
|
||||
|
||||
.alert {
|
||||
position: relative;
|
||||
// background-color: var(--bg-core-primary-light);
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
margin-bottom: 0.75rem;
|
||||
padding: 0.75rem;
|
||||
border-radius: $border-radius-lg;
|
||||
&:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: $border-radius-lg;
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.alert.danger:after {
|
||||
background-color: $danger;
|
||||
}
|
||||
.alert.danger .alert-leading-icon {
|
||||
color: $danger;
|
||||
}
|
||||
|
||||
.alert.warning:after {
|
||||
background-color: $warning;
|
||||
}
|
||||
.alert.warning .alert-leading-icon {
|
||||
color: $warning;
|
||||
}
|
||||
|
||||
.alert.success:after {
|
||||
background-color: $success;
|
||||
}
|
||||
.alert.success .alert-leading-icon {
|
||||
color: $success;
|
||||
}
|
||||
|
||||
.alert.info:after {
|
||||
background-color: $info;
|
||||
}
|
||||
.alert.info .alert-leading-icon {
|
||||
color: $info;
|
||||
}
|
||||
|
||||
.alert-content {
|
||||
--height: 2.5rem;
|
||||
|
||||
display: flex;
|
||||
|
||||
.alert-leading-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: $border-radius-pill;
|
||||
background-color: transparent;
|
||||
height: var(--height);
|
||||
aspect-ratio: 1 / 1;
|
||||
font-size: 2.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.alert-message {
|
||||
font-size: $base-font-size;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
.alert-cta-icon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.alert.alert-banner .alert-content .alert-cta-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: $border-radius-pill;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
height: var(--height);
|
||||
aspect-ratio: 1 / 1;
|
||||
transition: all 0.35s cubic-bezier(0.6, -1.25, 0.6, 2.25);
|
||||
position: relative;
|
||||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
/*SM*/
|
||||
.alert.alert-sm {
|
||||
max-width: max-content;
|
||||
margin-bottom: 0.5rem;
|
||||
padding: 0.75rem 1.25rem 0.75rem 0.75rem;
|
||||
&:after {
|
||||
opacity: 0.2;
|
||||
}
|
||||
}
|
||||
|
||||
.alert.alert-sm .alert-content {
|
||||
--height: 1.5rem;
|
||||
|
||||
.alert-leading-icon {
|
||||
height: var(--height);
|
||||
margin-right: 0.35rem;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.alert-message {
|
||||
font-size: $font-size-sm;
|
||||
margin-top: 0.1rem;
|
||||
}
|
||||
.alert-cta-icon {
|
||||
margin-left: 0.35rem;
|
||||
}
|
||||
}
|
||||
|
||||
/*elevation*/
|
||||
.alert.elevation-1 {
|
||||
box-shadow: $base-box-shadow;
|
||||
}
|
@ -0,0 +1,202 @@
|
||||
@use "../util" as *;
|
||||
@use "../globals" as *;
|
||||
|
||||
/*form group-alt*/
|
||||
.form-group-alt {
|
||||
--height: 2.5rem;
|
||||
|
||||
//border: 1px solid var(--bg-core-primary);
|
||||
padding: 0.15rem;
|
||||
height: max-content;
|
||||
//min-width: max-content;
|
||||
color: var(--text-core);
|
||||
border-radius: $border-radius-pill;
|
||||
background-color: var(--bg-core-primary-light);
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
transition: $transition;
|
||||
}
|
||||
|
||||
/*INPUT RESET*/
|
||||
.form-group-alt input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
/* Chrome, Safari, Edge, Opera */
|
||||
.form-group-alt input::-webkit-outer-spin-button,
|
||||
.form-group-alt input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Firefox */
|
||||
.form-group-alt input[type="number"] {
|
||||
-moz-appearance: textfield;
|
||||
}
|
||||
|
||||
/* clears the 'X' in search*/
|
||||
input[type="search"]::-webkit-search-decoration,
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-results-button,
|
||||
input[type="search"]::-webkit-search-results-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/*focus within*/
|
||||
.form-group-alt:focus-within {
|
||||
background-color: var(--bg-core-primary-lighten);
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
//appearance: none;
|
||||
|
||||
&:focus-within ~ #search.search-drop-down {
|
||||
opacity: 1;
|
||||
pointer-events: initial;
|
||||
}
|
||||
|
||||
&:focus-within ~ .backdrop {
|
||||
opacity: 1;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.input-cta-icon {
|
||||
&:focus-within ~ #select.search-drop-down {
|
||||
opacity: 1;
|
||||
pointer-events: initial;
|
||||
}
|
||||
|
||||
&:focus-within ~ .backdrop {
|
||||
opacity: 1;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/*SEARCH CONTENT*/
|
||||
.form-group-alt .input-group-content {
|
||||
height: var(--height);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.form-group-alt .input-leading-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: $border-radius-pill;
|
||||
color: var(--text-core-lc);
|
||||
height: var(--height);
|
||||
aspect-ratio: 1 / 1;
|
||||
overflow: hidden;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.form-group-alt .input-cta-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
border-radius: $border-radius-pill;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
height: var(--height);
|
||||
aspect-ratio: 1 / 1;
|
||||
z-index: 1;
|
||||
transition: all 0.35s cubic-bezier(0.6, -1.25, 0.6, 2.25);
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0.5rem var(--bg-core-primary-lighten);
|
||||
}
|
||||
}
|
||||
|
||||
.input-cta-icon-more {
|
||||
position: absolute;
|
||||
right: -7px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
.form-group-alt .input-area {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.form-group-alt input {
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.form-group-alt .input-cta-icon:hover {
|
||||
background-color: var(--bg-core-primary-lighten);
|
||||
}
|
||||
|
||||
/*DROPDOWN*/
|
||||
.search-drop-down {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 0;
|
||||
padding-top: 1.5rem;
|
||||
min-width: 100%;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: calc(100dvh - 85px);
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
list-style: none;
|
||||
background-color: #fff;
|
||||
box-shadow: $base-box-shadow;
|
||||
border-radius: 0 0 1.5rem 1.5rem;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
height: auto;
|
||||
overflow: auto;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: 0.5rem 1.5rem;
|
||||
margin-bottom: 0;
|
||||
font-size: $font-size-sm;
|
||||
color: var(--text-core-lc);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0.5rem 1.5rem;
|
||||
clear: both;
|
||||
color: inherit;
|
||||
text-align: inherit;
|
||||
white-space: nowrap;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.dropdown-item:focus,
|
||||
.dropdown-item:hover {
|
||||
color: var(--text-core-hc);
|
||||
text-decoration: none;
|
||||
background-color: var(--bg-core-primary-light);
|
||||
}
|
||||
|
||||
.dropdown-divider {
|
||||
height: 0;
|
||||
margin: 0.5rem 0;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid var(--bg-core-primary-light);
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
@use "../util" as *;
|
||||
@use "../globals" as *;
|
||||
|
||||
.pagination {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
|
||||
/*RECTANGULAR*/
|
||||
&.square .pagination-item .btn {
|
||||
border-radius: $base-border-radius;
|
||||
}
|
||||
/*TEXT*/
|
||||
&
|
||||
.pagination-item
|
||||
.btn:not([aria-label="Next page"], [aria-label="Previous page"]) {
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
&:hover {
|
||||
background-color: var(--bg-core-primary) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem var(--bg-core-primary-lighten);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: var(--bg-core-primary-darken) !important;
|
||||
}
|
||||
}
|
||||
/*FILLED*/
|
||||
&.filled
|
||||
.pagination-item
|
||||
.btn:not([aria-label="Next page"], [aria-label="Previous page"]) {
|
||||
background-color: var(--bg-core-primary-lighten);
|
||||
color: set-color var(--bg-core-primary-lighten);
|
||||
&:hover {
|
||||
background-color: var(--bg-core-primary) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem var(--bg-core-primary-lighten);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: var(--bg-core-primary-darken) !important;
|
||||
}
|
||||
}
|
||||
/*OUTLINED*/
|
||||
&.outlined
|
||||
.pagination-item
|
||||
.btn:not([aria-label="Next page"], [aria-label="Previous page"]) {
|
||||
background-color: transparent;
|
||||
color: var(--bg-core-primary-dark);
|
||||
border: 1px solid var(--bg-core-primary-dark);
|
||||
&:hover {
|
||||
color: var(--text-core) !important;
|
||||
border: 1px solid var(--bg-core-primary-dark) !important;
|
||||
}
|
||||
&:focus-visible,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 0.15rem var(--bg-core-primary-lighten);
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: var(--bg-core-primary-darken) !important;
|
||||
color: set-color (var(--bg-core-primary-darken)) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.pagination-item {
|
||||
& > * {
|
||||
height: 2rem;
|
||||
min-width: 2rem;
|
||||
margin: 0 3px;
|
||||
padding: 0 6px;
|
||||
text-align: center;
|
||||
border-radius: 1rem;
|
||||
font-size: $font-size-sm;
|
||||
}
|
||||
|
||||
:not(pagination-item-selected) > * {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.typography[disabled] {
|
||||
color: #ccc !important;
|
||||
}
|
||||
}
|
||||
|
||||
&-small {
|
||||
.pagination-item {
|
||||
& > * {
|
||||
height: 26px;
|
||||
min-width: 26px;
|
||||
margin: 0 1px;
|
||||
padding: 0 4px;
|
||||
border-radius: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-large {
|
||||
.pagination-item {
|
||||
& > * {
|
||||
height: 40px;
|
||||
min-width: 40px;
|
||||
padding: 0 10px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&-disable-elevation .pagination-item .btn {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&-rtl .pagination-item .icon-root {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
}
|
@ -0,0 +1,310 @@
|
||||
@use "../globals/" as *;
|
||||
@use "../util/" as *;
|
||||
|
||||
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&.tabs-reverse {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
&.tabs-vertical {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
&.tabs-vertical-reverse {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
&.tabs-rounded {
|
||||
border-radius: $base-border-radius;
|
||||
|
||||
.tabs-toolbar {
|
||||
border-radius: $base-border-radius;
|
||||
}
|
||||
|
||||
.tabs-panels {
|
||||
border-radius: $base-border-radius;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-toolbar {
|
||||
position: relative;
|
||||
background-color: var(--bg-core-primary-light);
|
||||
|
||||
&.tabs-border-left {
|
||||
border-top-right-radius: 0 !important;
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-right: 1px solid $element-fg-core;
|
||||
}
|
||||
|
||||
&.tabs-border-right {
|
||||
border-top-left-radius: 0 !important;
|
||||
border-bottom-left-radius: 0 !important;
|
||||
border-left: 1px solid $element-fg-core;
|
||||
}
|
||||
|
||||
&.tabs-border-top {
|
||||
border-bottom-left-radius: 0 !important;
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-bottom: 1px solid $element-fg-core;
|
||||
}
|
||||
|
||||
&.tabs-border-bottom {
|
||||
border-top-left-radius: 0 !important;
|
||||
border-top-right-radius: 0 !important;
|
||||
border-top: 1px solid $element-fg-core;
|
||||
}
|
||||
|
||||
&.tabs-rounded {
|
||||
border-radius: $base-border-radius;
|
||||
}
|
||||
|
||||
&.tabs-vertical {
|
||||
.tabs-toolbar-inner {
|
||||
flex-direction: column;
|
||||
|
||||
.tabs-scroll-button {
|
||||
.button-root {
|
||||
width: 100%;
|
||||
border-radius: 0px;
|
||||
height: 32px;
|
||||
|
||||
.icon-button-label {
|
||||
.icon-root{
|
||||
transform:rotate(90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .tabs-toolbar-inner {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.tabs-toolbar-content {
|
||||
width: 100%;
|
||||
flex: 1 1 auto;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
& .tabs-toolbar-wrapper {
|
||||
width: max-content;
|
||||
position: inherit;
|
||||
display: flex;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1);
|
||||
|
||||
&.tabs-centered {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
&.tabs-vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-panels {
|
||||
position: relative;
|
||||
transition: .3s cubic-bezier(.25,.8,.5,1);
|
||||
|
||||
&.tabs-vertical {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
width:100%;
|
||||
min-width: 160px;
|
||||
display: inline-flex;
|
||||
padding: 6px 12px;
|
||||
min-height: 48px;
|
||||
flex-shrink: 0;
|
||||
flex-shrink: 1;
|
||||
font-weight: 500;
|
||||
line-height: 1.75;
|
||||
user-select: none;
|
||||
white-space: normal;
|
||||
letter-spacing: 0.02857em;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
background-color: var(--bg-core-primary-lighten);
|
||||
}
|
||||
|
||||
&.tab-active {
|
||||
color: var(--bg-core-primary-darken);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--bg-core-primary-darken);
|
||||
color: var(--bg-core-primary-light);
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
& .tab-icon-text {
|
||||
margin-right: 8px;
|
||||
margin-inline-end: 8px;
|
||||
margin-inline-start: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-slider {
|
||||
position: absolute;
|
||||
background: var(--bg-core-primary-darken);
|
||||
|
||||
&.tab-slider-horizontal {
|
||||
height: 2px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
transition: left .3s cubic-bezier(.64,.09,.08,1);
|
||||
will-change: left;
|
||||
|
||||
&.tab-slider-horizontal-reverse {
|
||||
top: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
&.tab-slider-vertical {
|
||||
width: 2px;
|
||||
right: 0;
|
||||
transition: top .3s cubic-bezier(.64,.09,.08,1);
|
||||
will-change: top;
|
||||
|
||||
&.tab-slider-vertical-reverse {
|
||||
left: 0;
|
||||
right: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-badge{
|
||||
margin-left:8px;
|
||||
margin-inline-start: 8px;
|
||||
margin-inline-end: unset;
|
||||
}
|
||||
|
||||
@each $key, $val in $theme-colors {
|
||||
.tabs-toolbar-#{$key} {
|
||||
background-color: $val;
|
||||
color: set-color($val);
|
||||
|
||||
.tab-slider {
|
||||
background: lighten($val, 10);
|
||||
}
|
||||
|
||||
.tab {
|
||||
&.tab-active {
|
||||
color: darken($val, 10);
|
||||
|
||||
&:hover {
|
||||
background-color: darken($val, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.tab-transition {
|
||||
&-enter {
|
||||
transform: translate(100%, 0);
|
||||
}
|
||||
|
||||
&-leave, &-leave-active {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
&-leave-to {
|
||||
position: absolute;
|
||||
transform: translate(-100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.tab-reverse-transition {
|
||||
&-enter {
|
||||
transform: translate(-100%, 0);
|
||||
}
|
||||
|
||||
&-leave, &-leave-to {
|
||||
top: 0;
|
||||
position: absolute;
|
||||
transform: translate(100%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.dynamic-tabs {
|
||||
.tabs-toolbar {
|
||||
.tab {
|
||||
padding: 6px 14px;
|
||||
|
||||
.icon-button {
|
||||
padding: 4px;
|
||||
margin-right: -4px;
|
||||
margin-inline-end: -4px;
|
||||
margin-inline-start: unset;
|
||||
}
|
||||
|
||||
.tabs-panel-header-before {
|
||||
padding-right: 8px;
|
||||
padding-inline-end: 8px;
|
||||
padding-inline-start: unset;
|
||||
}
|
||||
|
||||
.tabs-panel-header-after {
|
||||
padding-left: 8px;
|
||||
padding-inline-start: 8px;
|
||||
padding-inline-end: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-header {
|
||||
&.tabs-header-before {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
&.tabs-header-after {
|
||||
display: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-panel-header {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
|
||||
&.tabs-panel-header-before {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
&.tabs-panel-header-after {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,501 @@
|
||||
@use "../globals/" as *;
|
||||
@use "../util/" as *;
|
||||
|
||||
|
||||
/*Define a data-tooltip attribute in your element.*/
|
||||
/*<span data-tooltip="(description here)"></span>*/
|
||||
|
||||
/*Additionally, you can define a data-tooltip-conf attribute to either change position,type or use a feature.*/
|
||||
/*<span data-tooltip="..." data-tooltip-conf="(right, bottom, left), (success, warning, danger, info) small delay no-fading shadow multiline no-arrow square"></span>
|
||||
*/
|
||||
|
||||
|
||||
//Primary-color
|
||||
$tooltip-base-text-color: var(--text-core);
|
||||
$tooltip-base-bg-color:#fff;
|
||||
$tooltip-base-border-color:#fff;
|
||||
|
||||
//Types
|
||||
$tooltip-invert-bg-color: var(--bg-core-primary-lighten);
|
||||
$tooltip-invert-text-color: var(--text-core);
|
||||
$tooltip-success-bg-color: lighten($success, 17);
|
||||
$tooltip-info-bg-color: lighten($info, 17);
|
||||
$tooltip-warning-bg-color: lighten($warning, 17);
|
||||
$tooltip-danger-bg-color: lighten($danger, 17);
|
||||
|
||||
$arrow-size: 8px;
|
||||
$animation-type: cubic-bezier(.73, .01, 0, 1);
|
||||
|
||||
|
||||
|
||||
[data-tooltip] {
|
||||
position: relative;
|
||||
&:before,
|
||||
&:after {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
backface-visibility: hidden
|
||||
}
|
||||
&:before {
|
||||
border-style: solid;
|
||||
border-top-width: $arrow-size;
|
||||
border-right-width: $arrow-size;
|
||||
border-bottom-width: $arrow-size;
|
||||
border-left-width: $arrow-size;
|
||||
border-bottom-width: 0;
|
||||
content: '';
|
||||
top: calc($arrow-size / -2);
|
||||
width: 0;
|
||||
height: 0;
|
||||
transform: translate(-50%, calc(-50% - $arrow-size * 1.5));
|
||||
transition: opacity .1s $animation-type 0s, transform .6s $animation-type 0s, -webkit-transform .6s $animation-type 0s;
|
||||
z-index: $tooltip-zindex;
|
||||
}
|
||||
&:after {
|
||||
content: attr(data-tooltip);
|
||||
text-align: center;
|
||||
padding: 0.6rem 1rem;
|
||||
font-size: $base-font-size;
|
||||
text-transform: initial;
|
||||
border-radius: $base-border-radius;
|
||||
color: $tooltip-base-text-color;
|
||||
transition: opacity .3s $animation-type, transform .3s $animation-type, -webkit-transform .3s $animation-type;
|
||||
pointer-events: none;
|
||||
z-index: $tooltip-zindex;
|
||||
white-space: nowrap;
|
||||
bottom: 100%;
|
||||
transform: translate(-50%, calc($arrow-size * 3));
|
||||
max-width: 320px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
// box-shadow: $base-box-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
[data-tooltip]:after {
|
||||
background: $tooltip-base-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip]:before {
|
||||
border-top-color: $tooltip-base-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-base-border-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-base-border-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-base-border-color;
|
||||
}
|
||||
|
||||
[data-tooltip] {
|
||||
&:focus,
|
||||
&:hover {
|
||||
&:before,
|
||||
&:after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
&:focus,
|
||||
&:hover {
|
||||
&:before {
|
||||
transition: opacity .1s $animation-type .1s, transform .6s $animation-type .1s, -webkit-transform .6s $animation-type .1s;
|
||||
transform: translate(-50%, calc(-50% - $arrow-size / 2));
|
||||
}
|
||||
&:after {
|
||||
transform: translate(-50%, calc($arrow-size * -1.5));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=right]:before {
|
||||
border-style: solid;
|
||||
border-top-width: $arrow-size;
|
||||
border-right-width: $arrow-size;
|
||||
border-bottom-width: $arrow-size;
|
||||
border-left-width: $arrow-size;
|
||||
border-left-width: 0;
|
||||
left: auto;
|
||||
right: calc($arrow-size * -1.5);
|
||||
top: 50%;
|
||||
transform: translate(calc(-50% + $arrow-size * 1.75), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=right]:after {
|
||||
top: 50%;
|
||||
left: 100%;
|
||||
bottom: auto;
|
||||
-webkit-transform: translate(calc($arrow-size * -3), -50%);
|
||||
transform: translate(calc($arrow-size * -3), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=right]:focus:before,
|
||||
[data-tooltip][data-tooltip-conf*=right]:hover:before {
|
||||
-webkit-transform: translate(calc(-50% + $arrow-size * 0.75), -50%);
|
||||
transform: translate(calc(-50% + $arrow-size * 0.75), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=right]:focus:after,
|
||||
[data-tooltip][data-tooltip-conf*=right]:hover:after {
|
||||
-webkit-transform: translate(calc($arrow-size * 1.75), -50%);
|
||||
transform: translate(calc($arrow-size * 1.75), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:before {
|
||||
border-style: solid;
|
||||
border-top-width: $arrow-size;
|
||||
border-right-width: $arrow-size;
|
||||
border-bottom-width: $arrow-size;
|
||||
border-left-width: $arrow-size;
|
||||
border-top-width: 0;
|
||||
top: auto;
|
||||
bottom: calc($arrow-size * -1.5);
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, calc(-50% + $arrow-size * 1.5));
|
||||
transform: translate(-50%, calc(-50% + $arrow-size * 1.5))
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:after {
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
bottom: auto;
|
||||
-webkit-transform: translate(-50%, calc($arrow-size * -3));
|
||||
transform: translate(-50%, calc($arrow-size * -3))
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:focus:before,
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:hover:before {
|
||||
-webkit-transform: translate(-50%, calc(-50% + $arrow-size / 2));
|
||||
transform: translate(-50%, calc(-50% + $arrow-size / 2))
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:focus:after,
|
||||
[data-tooltip][data-tooltip-conf*=bottom]:hover:after {
|
||||
-webkit-transform: translate(-50%, calc($arrow-size * 1.5));
|
||||
transform: translate(-50%, calc($arrow-size * 1.5))
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=left]:before {
|
||||
border-style: solid;
|
||||
border-top-width: $arrow-size;
|
||||
border-right-width: $arrow-size;
|
||||
border-bottom-width: $arrow-size;
|
||||
border-left-width: $arrow-size;
|
||||
border-right-width: 0;
|
||||
left: calc($arrow-size / -2);
|
||||
top: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
-webkit-transform: translate(calc(-50% - $arrow-size * 2), -50%);
|
||||
transform: translate(calc(-50% - $arrow-size * 2), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=left]:after {
|
||||
top: 50%;
|
||||
right: 100%;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
-webkit-transform: translate(calc($arrow-size * 3), -50%);
|
||||
transform: translate(calc($arrow-size * 3), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=left]:focus:after,
|
||||
[data-tooltip][data-tooltip-conf*=left]:hover:after {
|
||||
-webkit-transform: translate(calc($arrow-size * -1.75), -50%);
|
||||
transform: translate(calc($arrow-size * -1.75), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=left]:focus:before,
|
||||
[data-tooltip][data-tooltip-conf*=left]:hover:before {
|
||||
-webkit-transform: translate(calc(-50% - $arrow-size * 0.75), -50%);
|
||||
transform: translate(calc(-50% - $arrow-size * 0.75), -50%)
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=multiline]:after {
|
||||
word-break: break-word;
|
||||
white-space: normal;
|
||||
min-width: 180px;
|
||||
text-overflow: clip
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=delay]:before {
|
||||
-webkit-transition: opacity .2s $animation-type 0s, -webkit-transform .3s $animation-type 0s;
|
||||
transition: opacity .2s $animation-type 0s, -webkit-transform .3s $animation-type 0s;
|
||||
transition: opacity .2s $animation-type 0s, transform .3s $animation-type 0s;
|
||||
transition: opacity .2s $animation-type 0s, transform .3s $animation-type 0s, -webkit-transform .3s $animation-type 0s
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=delay]:after {
|
||||
-webkit-transition: opacity .3s $animation-type 0s, -webkit-transform .3s $animation-type 0s;
|
||||
transition: opacity .3s $animation-type 0s, -webkit-transform .3s $animation-type 0s;
|
||||
transition: opacity .3s $animation-type 0s, transform .3s $animation-type 0s;
|
||||
transition: opacity .3s $animation-type 0s, transform .3s $animation-type 0s, -webkit-transform .3s $animation-type 0s
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=delay]:focus:before,
|
||||
[data-tooltip][data-tooltip-conf*=delay]:hover:before {
|
||||
-webkit-transition: opacity .2s $animation-type .5s, -webkit-transform .6s $animation-type .5s;
|
||||
transition: opacity .2s $animation-type .5s, -webkit-transform .6s $animation-type .5s;
|
||||
transition: opacity .2s $animation-type .5s, transform .6s $animation-type .5s;
|
||||
transition: opacity .2s $animation-type .5s, transform .6s $animation-type .5s, -webkit-transform .6s $animation-type .5s
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=delay]:focus:after,
|
||||
[data-tooltip][data-tooltip-conf*=delay]:hover:after {
|
||||
-webkit-transition: opacity .3s $animation-type .4s, -webkit-transform .3s $animation-type .4s;
|
||||
transition: opacity .3s $animation-type .4s, -webkit-transform .3s $animation-type .4s;
|
||||
transition: opacity .3s $animation-type .4s, transform .3s $animation-type .4s;
|
||||
transition: opacity .3s $animation-type .4s, transform .3s $animation-type .4s, -webkit-transform .3s $animation-type .4s
|
||||
}
|
||||
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=small]:after {
|
||||
font-size: $font-size-sm;
|
||||
padding: .5rem .75rem;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=shadow]:after {
|
||||
//box-shadow: 0 2px 10px 2px rgba(0, 0, 0, .1)
|
||||
box-shadow: $base-box-shadow;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=no-fading]:after,
|
||||
[data-tooltip][data-tooltip-conf*=no-fading]:before {
|
||||
-webkit-transition: none;
|
||||
transition: none
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=no-arrow]:before {
|
||||
display: none
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=square]:after {
|
||||
border-radius: 0
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=invert]:after {
|
||||
color: $tooltip-invert-text-color;
|
||||
background: $tooltip-invert-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=invert]:before {
|
||||
border-top-color: $tooltip-invert-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=invert][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-invert-bg-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=invert][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-invert-bg-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=invert][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-invert-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=success]:after {
|
||||
background: $tooltip-success-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=success]:before {
|
||||
border-top-color: $tooltip-success-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=success][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-success-bg-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=success][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-success-bg-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=success][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-success-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=info]:after {
|
||||
background: $tooltip-info-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=info]:before {
|
||||
border-top-color: $tooltip-info-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=info][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-info-bg-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=info][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-info-bg-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=info][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-info-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=warning]:after {
|
||||
background: $tooltip-warning-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=warning]:before {
|
||||
border-top-color: $tooltip-warning-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=warning][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-warning-bg-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=warning][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-warning-bg-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=warning][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-warning-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=danger]:after {
|
||||
background: $tooltip-danger-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=danger]:before {
|
||||
border-top-color: $tooltip-danger-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=danger][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-danger-bg-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=danger][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-danger-bg-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=danger][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-danger-bg-color;
|
||||
}
|
||||
|
||||
|
||||
/*INHERIT*/
|
||||
|
||||
$tooltip-inherit-bg-color: inherit;
|
||||
$tooltip-border-bg-color: $tooltip-inherit-bg-color;
|
||||
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=inherit]:after {
|
||||
background: $tooltip-inherit-bg-color;
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=inherit]:before {
|
||||
border-top-color: $tooltip-inherit-bg-color;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=inherit][data-tooltip-conf*=right]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: $tooltip-border-bg-color;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=inherit][data-tooltip-conf*=bottom]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: $tooltip-inherit-bg-color;
|
||||
border-left-color: transparent
|
||||
}
|
||||
|
||||
[data-tooltip][data-tooltip-conf*=inherit][data-tooltip-conf*=left]:before {
|
||||
border-top-color: transparent;
|
||||
border-right-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $tooltip-inherit-bg-color;
|
||||
}
|
||||
|
||||
|
||||
[data-tooltip][data-tooltip=''] {
|
||||
&:after,
|
||||
&:before {
|
||||
display: none
|
||||
}
|
||||
}
|
Loading…
Reference in new issue