@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
6 lines • 5.95 kB
JavaScript
/*!
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
* v1.5.0-next.4
*/
import{r as t,c as a,h as i,H as e,a as o}from"./p-8789682d.js";import{b as s}from"./p-68f223ec.js";import{c as n,u as c,d as l}from"./p-0d8324b6.js";import{s as r,a as d,c as m}from"./p-deebcc06.js";import{c as h,d as p}from"./p-743ed09c.js";import{c as f,s as u,d as b,u as g}from"./p-9dd9a26d.js";import{S as v}from"./p-d511a532.js";import"./p-d2aa9245.js";import"./p-9280476e.js";import"./p-7fb6664e.js";import"./p-4929e834.js";import"./p-c8e46b02.js";const y=class{constructor(i){t(this,i),this.calciteFlowItemBack=a(this,"calciteFlowItemBack",6),this.calciteFlowItemScroll=a(this,"calciteFlowItemScroll",6),this.calciteFlowItemClose=a(this,"calciteFlowItemClose",6),this.handlePanelScroll=t=>{t.stopPropagation(),this.calciteFlowItemScroll.emit()},this.handlePanelClose=t=>{t.stopPropagation(),this.calciteFlowItemClose.emit()},this.backButtonClick=()=>{this.calciteFlowItemBack.emit()},this.setBackRef=t=>{this.backButtonEl=t},this.setContainerRef=t=>{this.containerEl=t},this.closable=!1,this.closed=!1,this.beforeBack=void 0,this.description=void 0,this.disabled=!1,this.heading=void 0,this.headingLevel=void 0,this.loading=!1,this.menuOpen=!1,this.messageOverrides=void 0,this.messages=void 0,this.showBackButton=!1,this.backButtonEl=void 0,this.defaultMessages=void 0,this.effectiveLocale=""}onMessagesChange(){}connectedCallback(){n(this),h(this),f(this)}async componentWillLoad(){await u(this),r(this)}componentDidRender(){c(this)}disconnectedCallback(){l(this),p(this),b(this)}componentDidLoad(){d(this)}effectiveLocaleChange(){g(this,this.effectiveLocale)}async setFocus(){await m(this);const{backButtonEl:t,containerEl:a}=this;t?t.setFocus():a?.setFocus()}async scrollContentTo(t){await(this.containerEl?.scrollContentTo(t))}renderBackButton(){const{el:t}=this,a="rtl"===s(t),{showBackButton:e,backButtonClick:o,messages:n}=this,c=n.back;return e?i("calcite-action",{"aria-label":c,class:"back-button",icon:a?"chevron-right":"chevron-left",key:"flow-back-button",onClick:o,scale:"s",slot:"header-actions-start",text:c,ref:this.setBackRef}):null}render(){const{closable:t,closed:a,description:o,disabled:s,heading:n,headingLevel:c,loading:l,menuOpen:r,messages:d,backButtonEl:m}=this,h=d.back;return i(e,null,i("calcite-panel",{closable:t,closed:a,description:o,disabled:s,heading:n,headingLevel:c,loading:l,menuOpen:r,messageOverrides:d,onCalcitePanelClose:this.handlePanelClose,onCalcitePanelScroll:this.handlePanelScroll,ref:this.setContainerRef},this.renderBackButton(),i("slot",{name:"action-bar",slot:v.actionBar}),i("slot",{name:"header-actions-start",slot:v.headerActionsStart}),i("slot",{name:"header-actions-end",slot:v.headerActionsEnd}),i("slot",{name:"header-content",slot:v.headerContent}),i("slot",{name:"header-menu-actions",slot:v.headerMenuActions}),i("slot",{name:"fab",slot:v.fab}),i("slot",{name:"footer-actions",slot:v.footerActions}),i("slot",{name:"footer",slot:v.footer}),i("slot",null)),m?i("calcite-tooltip",{closeOnClick:!0,label:h,overlayPositioning:"fixed",placement:"top",referenceElement:m},h):null)}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};y.style="@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-right{0%{opacity:0;transform:translate3D(-5px, 0, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px, 0, 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)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{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-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:var(--calcite-app-z-index-dropdown)}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-flow-item-footer-padding:0.5rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}calcite-panel{--calcite-panel-footer-padding:var(--calcite-flow-item-footer-padding)}";export{y as calcite_flow_item}