UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

176 lines (148 loc) 3.68 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-scale { 0% { opacity: 0; transform: scale3D(0.95, 0.95, 1); } 100% { opacity: 1; transform: scale3D(1, 1, 1); } } /** * Currently only used in Checkbox. */ :host { /* Base ":host" styles for the component */ box-sizing: border-box; background-color: var(--calcite-ui-foreground-1); color: var(--calcite-ui-text-2); font-size: var(--calcite-font-size--1); } :host * { box-sizing: border-box; } :host { /* Component spacing variables */ --calcite-icon-size: 1rem; --calcite-spacing-eighth: ; --calcite-spacing-quarter: 0.25rem; --calcite-spacing-half: 0.5rem; --calcite-spacing-three-quarters: 0.75rem; --calcite-spacing: 1rem; --calcite-spacing-plus-quarter: 1.25rem; --calcite-spacing-plus-half: 1.5rem; --calcite-spacing-double: 2rem; --calcite-menu-min-width: 10rem; --calcite-header-min-height: 3rem; --calcite-footer-min-height: 3rem; } :root { --calcite-popper-transition: 150ms ease-in-out; } :host([hidden]) { display: none; } :host { display: flex; align-items: stretch; background-color: transparent; pointer-events: none; --calcite-shell-panel-detached-max-height: unset; } ::slotted(calcite-panel), ::slotted(calcite-flow) { height: 100%; max-height: unset; max-width: unset; width: 100%; } .content { align-items: stretch; align-self: stretch; background-color: var(--calcite-ui-background); flex-flow: column nowrap; display: flex; padding: 0; pointer-events: auto; width: var(--calcite-shell-panel-width); max-width: var(--calcite-shell-panel-max-width); min-width: var(--calcite-shell-panel-min-width); transition: max-height 150ms ease-in-out, max-width 150ms ease-in-out; } :host([width-scale=s]) .content { --calcite-shell-panel-width: 12vw; --calcite-shell-panel-max-width: 300px; --calcite-shell-panel-min-width: 150px; } :host([width-scale=m]) .content { --calcite-shell-panel-width: 20vw; --calcite-shell-panel-max-width: 420px; --calcite-shell-panel-min-width: 240px; } :host([width-scale=l]) .content { --calcite-shell-panel-width: 45vw; --calcite-shell-panel-max-width: 680px; --calcite-shell-panel-min-width: 340px; } :host([detached-height-scale=s]) .content--detached { --calcite-shell-panel-detached-max-height: 40vh; } :host([detached-height-scale=m]) .content--detached { --calcite-shell-panel-detached-max-height: 60vh; } :host([detached-height-scale=l]) .content--detached { --calcite-shell-panel-detached-max-height: 80vh; } .content--detached { border-radius: 0.25rem; box-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04); height: auto; overflow: hidden; margin-top: 0.5rem; margin-bottom: auto; margin-left: 0.5rem; margin-right: 0.5rem; max-height: var(--calcite-shell-panel-detached-max-height); } .content--detached ::slotted(calcite-panel), .content--detached ::slotted(calcite-flow) { max-height: unset; } .content[hidden] { display: none; } :host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar) { border-right: 1px solid var(--calcite-ui-border-3); } :host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar) { border-left: 1px solid var(--calcite-ui-border-3); }