UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

225 lines (192 loc) • 4.25 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. */ :root { --calcite-popper-transition: 150ms ease-in-out; } :host([hidden]) { display: none; } :host-context([theme=dark]) { --calcite-ui-blue-1: #00A0FF; --calcite-ui-blue-2: #0087D7; --calcite-ui-blue-3: #47BBFF; --calcite-ui-green-1: #36DA43; --calcite-ui-green-2: #11AD1D; --calcite-ui-green-3: #44ED51; --calcite-ui-yellow-1: #FFC900; --calcite-ui-yellow-2: #F4B000; --calcite-ui-yellow-3: #FFE24D; --calcite-ui-red-1: #FE583E; --calcite-ui-red-2: #F3381B; --calcite-ui-red-3: #FF7465; --calcite-ui-background: #202020; --calcite-ui-foreground-1: #2b2b2b; --calcite-ui-foreground-2: #353535; --calcite-ui-foreground-3: #404040; --calcite-ui-text-1: #ffffff; --calcite-ui-text-2: #bfbfbf; --calcite-ui-text-3: #9f9f9f; --calcite-ui-border-1: #4a4a4a; --calcite-ui-border-2: #404040; --calcite-ui-border-3: #353535; --calcite-ui-border-4: #757575; --calcite-ui-border-5: #9f9f9f; } :host { max-width: 100%; } :host .calcite-card-container { display: flex; height: 100%; flex-direction: column; justify-content: space-between; background-color: var(--calcite-ui-foreground-1); transition: 150ms ease-in-out; position: relative; border: 1px solid var(--calcite-ui-border-2); color: var(--calcite-ui-text-3); box-shadow: none; } :host .calcite-card-container:hover { box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04); z-index: 1; } :host .calcite-card-container:active { box-shadow: 0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08); transition-duration: 75ms; z-index: 1; } .container { flex: 1 1 auto; display: flex; flex-direction: column; } :host([loading]) .calcite-card-container *:not(calcite-loader):not(.calcite-card-loader-container) { opacity: 0; pointer-events: none; } :host([loading]) .calcite-card-loader-container { display: flex; align-items: center; position: absolute; left: 0; right: 0; top: 0; bottom: 0; } :host .header, :host .footer { padding: 0.75rem; display: flex; } :host .header { flex-direction: column; } :host .footer { padding: 0.75rem; flex-direction: row; align-content: space-between; justify-content: space-between; margin-top: auto; } :host .card-content { padding: 0 0.75rem; color: var(--calcite-ui-text-3); font-size: 0.875rem; line-height: 1.5; } :host([selectable]) .calcite-card-container:active { box-shadow: 0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08); } :host([selected]) .calcite-card-container { border-color: var(--calcite-ui-blue-1); } slot[name=title]::slotted(*), *::slotted([slot=title]) { font-weight: 500; color: var(--calcite-ui-text-1); margin: 0; font-size: 0.9375rem; line-height: 1.5; } slot[name=subtitle]::slotted(*), *::slotted([slot=subtitle]) { font-weight: 400; color: var(--calcite-ui-text-2); margin: 0; margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.5; } slot[name=thumbnail]::slotted(img), img::slotted([slot=thumbnail]) { max-width: 100%; min-width: 100%; } slot[name=footer-leading]::slotted(*), *::slotted([slot=footer-leading]) { margin-inline-end: auto; align-self: center; font-size: 0.875rem; line-height: 1.5; } slot[name=footer-trailing]::slotted(*), *::slotted([slot=footer-trailing]) { align-self: center; font-size: 0.875rem; line-height: 1.5; } :host .thumbnail-wrapper { font-size: 0; } :host .checkbox-wrapper { position: absolute; top: 0.375rem; right: 0.375rem; margin: 0; padding: 0; } :host([dir=rtl]) .checkbox-wrapper { left: 0.375rem; right: auto; }