UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

225 lines (199 loc) • 4.53 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; } /** * CSS Custom Properties * * These properties can be overridden using the component's tag as selector. * * @prop --calcite-navigation-width: Specifies the width of the component's content area. * @prop --calcite-navigation-background: Specifies the background color of the component. * @prop --calcite-navigation-border-color: Specifies the border color of the component. */ .container { margin-inline: auto; display: flex; inline-size: 100%; flex-direction: column; margin-block: 0; margin-inline: auto; background-color: var(--calcite-navigation-background, var(--calcite-ui-foreground-1)); } .container.primary, .container.secondary, .container.tertiary { border-block-end: 1px solid; border-block-end-color: var(--calcite-navigation-border-color, var(--calcite-ui-border-3)); } .user, .logo { display: flex; } .hide { display: none; } .primary { block-size: 4rem; } .secondary { block-size: 3rem; } .tertiary { block-size: 3rem; } .container-content { margin-inline: auto; display: flex; block-size: 100%; inline-size: 100%; margin-block: 0; inline-size: var(--calcite-navigation-width, 100%); max-inline-size: 100%; } .container-content.progress-bar { margin-block-start: 0.125rem; } slot[name] { display: flex; flex-direction: row; } slot[name=navigation-secondary]::slotted(calcite-navigation), slot[name=navigation-tertiary]::slotted(calcite-navigation) { inline-size: 100%; } slot[name=content-start]::slotted(*), slot[name=content-center]::slotted(*), slot[name=content-end]::slotted(*) { display: flex; flex-direction: row; align-items: center; } slot[name=progress], slot[name=progress] calcite-progress { inset-block-start: 0; inset-inline: 0; } slot[name=content-end] { margin-inline-start: auto; } slot[name=content-start] { margin-inline-end: auto; } slot[name=content-end], slot[name=logo] ~ slot[name=user], slot[name=user]:only-child { margin-inline-start: auto; } slot[name=content-center] { margin-inline-start: auto; margin-inline-end: auto; } slot[name=content-start] ~ slot[name=content-center] { margin-inline-start: 0px; } slot[name=content-start] ~ slot[name=content-end], slot[name=content-center] ~ slot[name=content-end], slot[name=content-center] ~ slot[name=user], slot[name=content-end] ~ slot[name=user] { margin: 0px; }