UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

197 lines (176 loc) 3.85 kB
/* 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-right { 0% { opacity: 0; transform: translate3D(-5px, 0, 0); } 100% { opacity: 1; transform: translate3D(0, 0, 0); } } @keyframes in-left { 0% { opacity: 0; transform: translate3D(5px, 0, 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); } } :root { --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor)); --calcite-internal-duration-factor: var(--calcite-duration-factor, 1); --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor)); --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor)); --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor)); } .calcite-animate { opacity: 0; animation-fill-mode: both; animation-duration: var(--calcite-animation-timing); } .calcite-animate__in { animation-name: in; } .calcite-animate__in-down { animation-name: in-down; } .calcite-animate__in-up { animation-name: in-up; } .calcite-animate__in-right { animation-name: in-right; } .calcite-animate__in-left { animation-name: in-left; } .calcite-animate__in-scale { animation-name: in-scale; } @media (prefers-reduced-motion: reduce) { :root { --calcite-internal-duration-factor: 0.01; } } /* helper to properly scale internal durations */ /** * Currently only used in Checkbox. */ :root { --calcite-floating-ui-transition: var(--calcite-animation-timing); --calcite-floating-ui-z-index: var(--calcite-app-z-index-dropdown); } :host([hidden]) { display: none; } :host([disabled]) .content { cursor: default; -webkit-user-select: none; user-select: none; opacity: var(--calcite-ui-opacity-disabled); } :host([disabled]) .content *, :host([disabled]) .content ::slotted(*) { pointer-events: none; } /** * CSS Custom Properties * * These properties can be overridden using the component's tag as selector. * * @prop --calcite-stack-padding-inline: Specifies the inline padding of the component's content. * @prop --calcite-stack-padding-block: Specifies the block padding of the component's content. */ :host { display: flex; flex: 1 1 0%; flex-direction: column; } .container { display: flex; flex: 1 1 auto; align-items: stretch; font-family: var(--calcite-sans-family); font-weight: var(--calcite-font-weight-normal); color: var(--calcite-ui-text-2); } .content { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; font-size: var(--calcite-font-size--2); line-height: 1.375; padding-inline: var(--calcite-stack-padding-inline, 0.75rem); padding-block: var(--calcite-stack-padding-block, 0.5rem); } .content-start { justify-content: flex-start; } .content-end { justify-content: flex-end; } .content-start, .content-end { flex: 0 1 auto; } .actions-start, .actions-end, .content-start, .content-end { display: flex; align-items: center; } .content-start ::slotted(calcite-icon), .content-end ::slotted(calcite-icon) { margin-inline: 0.75rem; align-self: center; } .actions-start ::slotted(calcite-action), .actions-end ::slotted(calcite-action) { align-self: stretch; color: inherit; } [hidden] { display: none; }