UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

146 lines (122 loc) 2.63 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 { animation: in 300ms ease-in-out; border-radius: 0.125rem; } :host([expanded]) { max-width: 20vw; } ::slotted(calcite-action-group) { border-width: 0; border-bottom-width: 1px; border-color: var(--calcite-ui-border-3); border-style: solid; padding-bottom: 0; padding-top: 0; } .container { flex-direction: column; display: inline-flex; overflow-y: auto; border-radius: 0.25rem; background-color: var(--calcite-ui-background); box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08); max-width: 15vw; } .action-group--bottom { flex-grow: 1; justify-content: flex-end; padding-bottom: 0; } :host([layout=horizontal]) .container { flex-direction: row; max-width: unset; } :host([layout=horizontal]) .container .action-group--bottom { padding: 0; } :host([layout=horizontal]) .container ::slotted(calcite-action-group) { border-width: 0; border-right-width: 1px; flex-direction: row; padding: 0; } :host([layout=horizontal]) .container.calcite--rtl ::slotted(calcite-action-group) { border-width: 0; border-left-width: 1px; } ::slotted(calcite-action-group:last-child) { border-bottom-width: 0; }