UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

5 lines (4 loc) 2.89 kB
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details. v3.2.1 */ import{a as l}from"./YXZ62PQO.js";import{v as d}from"./3ADX47DD.js";import{a as h}from"./JOSABGK6.js";import"./NNVH7JUI.js";import{E as s,F as a,R as c,c as n,d as o}from"./BJZTU5BQ.js";var p={actionBarContainer:"action-bar-container",content:"content"},m={actionBar:"action-bar"},f=n`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{z-index:var(--calcite-z-index);display:flex;flex:1 1 auto;overflow:hidden;background-color:transparent}.content{margin:0;display:flex;block-size:100%;inline-size:100%;overflow:hidden;flex:1 0 0}.action-bar-container{display:flex}:host([detached]){margin-inline:.5rem;margin-block:.5rem 1.5rem}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}:host([detached]){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:.25rem;border-width:0px;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([position=end]){align-self:flex-end}:host([position=start]){align-self:flex-start}:host([height-scale=s]){block-size:33.333333%}:host([height-scale=m]){block-size:70%}:host([height-scale=l]){block-size:100%}:host([height-scale=l][detached]){block-size:calc(100% - 2rem)}::slotted(calcite-panel){block-size:100%;inline-size:100%}::slotted(calcite-action-bar),::slotted(calcite-action-bar[position=end]){border-inline-end:1px solid;border-color:var(--calcite-color-border-3)}:host([hidden]){display:none}[hidden]{display:none}`,i=class extends s{constructor(){super(...arguments),this.detached=!1,this.heightScale="s",this.position="end"}static{this.properties={actionBar:[16,{},{state:!0}],detached:[7,{},{reflect:!0,type:Boolean}],heightScale:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}]}}static{this.styles=f}load(){h.deprecated("component",{name:"shell-center-row",removalVersion:4,suggested:"shell-panel"})}loaded(){this.actionBar?.position==="end"&&this.requestUpdate()}handleActionBarSlotChange(t){this.actionBar=d(t).filter(e=>e.matches("calcite-action-bar"))[0]}render(){let{actionBar:t}=this,e=o`<div class=${a(p.content)}><slot></slot></div>`,r=[l("action-bar",o`<div class=${a(p.actionBarContainer)} .hidden=${!this.actionBar}><slot name=${m.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),e];return t?.position==="end"&&r.reverse(),r}};c("calcite-shell-center-row",i);export{i as ShellCenterRow};