@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
375 lines (311 loc) • 8.3 kB
CSS
/* mixins & extensions */
@keyframes in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes in-down {
0% {
opacity: 0;
transform: translate3D(0, -5px, 0);
}
100% {
opacity: 1;
transform: translate3D(0, 0, 0);
}
}
@keyframes in-up {
0% {
opacity: 0;
transform: translate3D(0, 5px, 0);
}
100% {
opacity: 1;
transform: translate3D(0, 0, 0);
}
}
@keyframes in-scale {
0% {
opacity: 0;
transform: scale3D(0.95, 0.95, 1);
}
100% {
opacity: 1;
transform: scale3D(1, 1, 1);
}
}
/**
* Currently only used in Checkbox.
*/
:root {
--calcite-popper-transition: 150ms ease-in-out;
}
:host([hidden]) {
display: none;
}
:host([scale=s]) {
--calcite-stepper-item-spacing-unit-s: 0.1875rem;
--calcite-stepper-item-spacing-unit-m: 0.375rem;
--calcite-stepper-item-spacing-unit-l: 0.75rem;
font-size: 0.875rem;
line-height: 1.5;
}
:host([scale=m]) {
--calcite-stepper-item-spacing-unit-s: 0.25rem;
--calcite-stepper-item-spacing-unit-m: 0.5rem;
--calcite-stepper-item-spacing-unit-l: 1rem;
font-size: 0.9375rem;
line-height: 1.5;
}
:host([scale=l]) {
--calcite-stepper-item-spacing-unit-s: 0.375rem;
--calcite-stepper-item-spacing-unit-m: 0.75rem;
--calcite-stepper-item-spacing-unit-l: 1.5rem;
font-size: 1rem;
line-height: 1.5;
}
:host-context([theme=dark]) {
--calcite-ui-blue-1: #00A0FF;
--calcite-ui-blue-2: #0087D7;
--calcite-ui-blue-3: #47BBFF;
--calcite-ui-green-1: #36DA43;
--calcite-ui-green-2: #11AD1D;
--calcite-ui-green-3: #44ED51;
--calcite-ui-yellow-1: #FFC900;
--calcite-ui-yellow-2: #F4B000;
--calcite-ui-yellow-3: #FFE24D;
--calcite-ui-red-1: #FE583E;
--calcite-ui-red-2: #F3381B;
--calcite-ui-red-3: #FF7465;
--calcite-ui-background: #202020;
--calcite-ui-foreground-1: #2b2b2b;
--calcite-ui-foreground-2: #353535;
--calcite-ui-foreground-3: #404040;
--calcite-ui-text-1: #ffffff;
--calcite-ui-text-2: #bfbfbf;
--calcite-ui-text-3: #9f9f9f;
--calcite-ui-border-1: #4a4a4a;
--calcite-ui-border-2: #404040;
--calcite-ui-border-3: #353535;
--calcite-ui-border-4: #757575;
--calcite-ui-border-5: #9f9f9f;
}
:host {
display: flex;
flex: 1;
flex-direction: column;
color: var(--calcite-ui-text-3);
transition: 150ms ease-in-out;
text-decoration: none;
outline: none;
position: relative;
border-top: 3px solid var(--calcite-ui-border-3);
cursor: pointer;
margin-right: var(--calcite-stepper-item-spacing-unit-l);
}
:host([dir=rtl]) {
margin-left: var(--calcite-stepper-item-spacing-unit-l);
margin-right: 0;
}
:host {
outline-offset: 0;
outline-color: transparent;
transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
}
:host(:focus) {
outline: 2px solid var(--calcite-ui-blue-1);
outline-offset: 2px;
}
:host .stepper-item-header {
display: flex;
flex-direction: var(--calcite-stepper-item-flex-direction);
align-items: flex-start;
cursor: pointer;
}
:host .stepper-item-content,
:host .stepper-item-header {
padding: var(--calcite-stepper-item-spacing-unit-l) var(--calcite-stepper-item-spacing-unit-m);
padding-left: 0;
transition: 150ms ease-in-out;
text-align: left;
}
:host([dir=rtl]) .stepper-item-content,
:host([dir=rtl]) .stepper-item-header {
padding-left: initial;
padding-right: 0;
text-align: right;
}
:host .stepper-item-header * {
display: inline-flex;
align-items: center;
transition: 150ms ease-in-out;
}
:host .stepper-item-content {
flex-direction: column;
width: 100%;
display: none;
}
:host .stepper-item-icon {
margin-right: var(--calcite-stepper-item-spacing-unit-l);
margin-top: var(--calcite-stepper-item-spacing-unit-s);
color: var(--calcite-ui-text-3);
opacity: var(--calcite-ui-opacity-disabled);
height: 12px;
display: inline-flex;
flex-shrink: 0;
align-self: flex-start;
transition: 150ms ease-in-out;
}
:host([dir=rtl]) .stepper-item-icon {
margin-left: var(--calcite-stepper-item-spacing-unit-l);
margin-right: 0;
}
:host .stepper-item-header-text {
margin-right: auto;
flex-direction: column;
text-align: initial;
}
:host([dir=rtl]) .stepper-item-header-text {
margin-left: auto;
margin-right: 0;
}
:host .stepper-item-title,
:host .stepper-item-subtitle {
display: flex;
width: 100%;
}
:host .stepper-item-title {
color: var(--calcite-ui-text-2);
font-weight: 500;
}
:host .stepper-item-subtitle {
color: var(--calcite-ui-text-3);
}
:host([dir=rtl]) .stepper-item-title {
margin-right: 0;
margin-left: auto;
}
:host .stepper-item-number {
font-weight: bold;
color: var(--calcite-ui-text-3);
margin-right: var(--calcite-stepper-item-spacing-unit-l);
transition: 150ms ease-in-out;
}
:host([dir=rtl]) .stepper-item-number {
margin-left: var(--calcite-stepper-item-spacing-unit-l);
margin-right: initial;
}
:host([disabled]) {
opacity: var(--calcite-ui-opacity-disabled);
}
:host([disabled]),
:host([disabled]) * {
cursor: not-allowed;
pointer-events: none;
}
:host([complete]) {
border-top-color: rgba(0, 122, 194, 0.5);
}
:host([complete]) .stepper-item-icon {
color: var(--calcite-ui-blue-1);
}
:host([error]) {
border-top-color: var(--calcite-ui-red-1);
}
:host([error]) .stepper-item-number {
color: var(--calcite-ui-red-1);
}
:host([error]) .stepper-item-icon {
color: var(--calcite-ui-red-1);
opacity: 1;
}
:host(:hover:not([disabled]):not([active])),
:host(:focus:not([disabled]):not([active])) {
border-top-color: rgba(0, 122, 194, 0.75);
}
:host(:hover:not([disabled]):not([active])) .stepper-item-title,
:host(:focus:not([disabled]):not([active])) .stepper-item-title {
color: var(--calcite-ui-text-1);
}
:host(:hover:not([disabled]):not([active])) .stepper-item-subtitle,
:host(:focus:not([disabled]):not([active])) .stepper-item-subtitle {
color: var(--calcite-ui-text-2);
}
:host([error]:hover:not([disabled]):not([active])),
:host([error]:focus:not([disabled]):not([active])) {
border-top-color: rgba(216, 48, 32, 0.75);
}
:host([active]) {
border-top-color: var(--calcite-ui-blue-1);
}
:host([active]) .stepper-item-title {
color: var(--calcite-ui-text-1);
}
:host([active]) .stepper-item-subtitle {
color: var(--calcite-ui-text-2);
}
:host([active]) .stepper-item-number {
color: var(--calcite-ui-blue-1);
}
:host([active]) .stepper-item-icon {
color: var(--calcite-ui-blue-1);
opacity: 1;
}
:host([layout=vertical]) {
flex: 1 1 auto;
border-top: 0;
border-left: 3px solid var(--calcite-ui-border-3);
padding: 0 0 0 var(--calcite-stepper-item-spacing-unit-l);
margin: 0 0 var(--calcite-stepper-item-spacing-unit-m) 0;
}
:host([layout=vertical]) .stepper-item-icon {
margin: var(--calcite-stepper-item-spacing-unit-m) 0 0 auto;
padding-left: var(--calcite-stepper-item-spacing-unit-l);
order: 3;
}
:host([layout=vertical]) .stepper-item-header {
padding-right: 0;
}
:host([layout=vertical]) .stepper-item-content {
padding: 0;
}
:host([layout=vertical][active]) .stepper-item-content {
display: flex;
}
:host([layout=vertical][active]) .stepper-item-content ::slotted(:last-child) {
margin-bottom: var(--calcite-stepper-item-spacing-unit-l);
}
:host([layout=vertical][dir=rtl]) {
border-left: 0;
border-right: 3px solid var(--calcite-ui-border-3);
padding: 0 var(--calcite-stepper-item-spacing-unit-l) 0 0;
}
:host([layout=vertical][dir=rtl]) .stepper-item-icon {
margin: var(--calcite-stepper-item-spacing-unit-m) auto 0 0;
padding-left: 0;
padding-right: var(--calcite-stepper-item-spacing-unit-l);
}
:host([layout=vertical][dir=rtl]) .stepper-item-header {
padding-left: 0;
padding-right: intial;
}
:host([layout=vertical][complete]) {
border-color: rgba(0, 122, 194, 0.5);
}
:host([layout=vertical][error]) {
border-color: var(--calcite-ui-red-1);
}
:host([layout=vertical][active]) {
border-color: var(--calcite-ui-blue-1);
}
:host([layout=vertical]:hover:not([disabled]):not([active])),
:host([layout=vertical]:focus:not([disabled]):not([active])) {
border-color: rgba(0, 122, 194, 0.75);
}
:host([layout=vertical][error]:hover:not([disabled]):not([active])),
:host([layout=vertical][error]:focus:not([disabled]):not([active])) {
border-color: rgba(216, 48, 32, 0.75);
}