UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

327 lines (277 loc) • 6.13 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; } :root { --calcite-popper-transition: 150ms ease-in-out; } :host([hidden]) { display: none; } :host { display: flex; flex: 1 1 auto; overflow: hidden; position: relative; width: 100%; --calcite-min-header-height: calc(var(--calcite-icon-size) * 3); --calcite-panel-max-height: unset; --calcite-panel-width: 100%; --calcite-panel-min-width: unset; --calcite-panel-max-width: unset; } /* Shared styles for header elements */ .header { margin: 0; display: flex; align-items: center; justify-content: space-between; color: var(--calcite-ui-text-2); fill: var(--calcite-ui-text-2); } .heading { padding: 0; margin: 0; font-weight: var(--calcite-font-weight-medium); line-height: 1.5; } .header .heading { flex: 1 0 auto; padding: var(--calcite-spacing-half) var(--calcite-spacing-half); } h1.heading { font-size: var(--calcite-font-size-2); } h2.heading { font-size: var(--calcite-font-size-1); } h3.heading { font-size: var(--calcite-font-size-0); } h4.heading, h5.heading { font-size: var(--calcite-font-size--1); } .container { display: flex; flex: 1 1 auto; flex-direction: column; align-items: stretch; background-color: var(--calcite-ui-background); width: 100%; padding: 0; margin: 0; max-height: var(--calcite-panel-max-height); width: var(--calcite-panel-width); max-width: var(--calcite-panel-max-width); min-width: var(--calcite-panel-min-width); transition: max-height 150ms ease-in-out, width 150ms ease-in-out; } :host([height-scale=s]) { --calcite-panel-max-height: 40vh; } :host([height-scale=m]) { --calcite-panel-max-height: 60vh; } :host([height-scale=l]) { --calcite-panel-max-height: 80vh; } :host([width-scale=s]) { --calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 12vw); --calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 300px); --calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 150px); } :host([width-scale=m]) { --calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 20vw); --calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 420px); --calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 240px); } :host([width-scale=l]) { --calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 45vw); --calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 680px); --calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 340px); } .container[hidden] { display: none; } :host([loading]) .container, :host([disabled]) .container { position: relative; z-index: 1; } .header { border-bottom: 1px solid; align-items: stretch; background-color: var(--calcite-ui-foreground-1); justify-content: flex-start; position: sticky; top: 0; border-bottom-color: var(--calcite-ui-border-3); width: 100%; flex: 0 0 auto; min-height: 3rem; z-index: 2; width: 100%; } .header-content { display: block; overflow: hidden; margin-right: auto; padding-top: 1rem; padding-bottom: 1rem; padding-left: 0.75rem; padding-right: 0.75rem; } .header-content .heading, .header-content .summary { padding: 0; display: block; overflow: hidden; white-space: nowrap; width: 100%; text-overflow: ellipsis; } .header-content .heading { font-weight: var(--calcite-font-weight-medium); margin-top: 0; margin-left: 0; margin-right: 0; margin-bottom: 0.25rem; font-size: var(--calcite-font-size-0); line-height: 1.25rem; } .header-content .heading:only-child { margin-bottom: 0; } .header-content .summary { color: var(--calcite-ui-text-2); font-size: var(--calcite-font-size--1); line-height: 1rem; } .back-button { border-color: var(--calcite-ui-border-3); border-style: solid; border-width: 0; border-right-width: 1px; } .calcite--rtl .back-button { border-right-width: 0; border-left-width: 1px; } .header-actions { display: flex; align-items: stretch; flex-direction: row; flex-wrap: nowrap; } .header-actions--end { margin-left: auto; } .menu-container:only-child { margin-left: auto; } .menu-button { align-self: stretch; flex: 0 1 auto; height: 100%; position: relative; } .menu { min-width: 10rem; flex-flow: column nowrap; } .content-container { align-items: stretch; background-color: var(--calcite-ui-background); display: flex; flex: 1 1 auto; overflow: auto; flex-wrap: nowrap; flex-direction: column; } .footer { border-top: 1px solid; background-color: var(--calcite-ui-foreground-1); border-top-color: var(--calcite-ui-border-3); display: flex; justify-content: space-evenly; position: sticky; bottom: 0; width: 100%; flex: 0 0 auto; min-height: 3rem; padding: 0.5rem; } .calcite--rtl .header-content { margin-left: auto; margin-right: unset; } .calcite--rtl .header-actions--end { margin-right: auto; margin-left: unset; } .calcite--rtl .menu-container:only-child { margin-right: auto; margin-left: unset; } .fab-container { display: inline-block; position: sticky; margin-top: 0; margin-bottom: 0; margin-left: auto; margin-right: auto; padding: 0.5rem; bottom: 0; left: 0; right: 0; z-index: 1; }