{"version":3,"names":["CSS","main","content","contentBehind","contentBottom","contentNonInteractive","footer","positionedSlotWrapper","container","contentBehindCenterContent","SLOTS","centerRow","panelStart","panelEnd","panelTop","panelBottom","header","alerts","sheets","modals","dialogs","shellCss","CalciteShellStyle0","Shell","this","handleHeaderSlotChange","event","hasHeader","slotChangeHasAssignedElement","handleFooterSlotChange","hasFooter","handleAlertsSlotChange","hasAlerts","slotChangeGetAssignedElements","map","el","tagName","embedded","handleSheetsSlotChange","hasSheets","handleModalsSlotChange","hasModals","handlePanelTopChange","hasPanelTop","handlePanelBottomChange","hasPanelBottom","handleDialogsSlotChange","hasDialogs","handleCalciteInternalShellPanelResizeStart","panelIsResizing","stopPropagation","handleCalciteInternalShellPanelResizeEnd","updateHasOnlyPanelBottom","hasOnlyPanelBottom","connectedCallback","connectConditionalSlotComponent","disconnectedCallback","disconnectConditionalSlotComponent","renderHeader","h","hidden","key","name","onSlotchange","renderFooter","class","renderAlerts","renderSheets","renderModals","renderDialogs","renderContent","defaultSlotNode","defaultSlotContainerNode","deprecatedCenterRowSlotNode","panelBottomSlotNode","panelTopSlotNode","contentContainerKey","renderMain","renderPositionedSlots","render","Fragment","actionBarContainer","actionBar","shellCenterRowCss","CalciteShellCenterRowStyle0","ShellCenterRow","contentNode","getSlotted","actionBarNode","children","position","reverse","contentHeader","contentBody","floatContent","contentOverlay","separator","float","floatAll","shellPanelCss","CalciteShellPanelStyle0","ShellPanel","initialContentWidth","initialContentHeight","initialClientX","initialClientY","contentWidthMax","contentWidthMin","contentHeightMax","contentHeightMin","step","stepMultiplier","actionBars","storeContentEl","contentEl","getKeyAdjustedSize","layout","multipliedStep","MOVEMENT_KEYS","indexOf","preventDefault","dir","getElementDir","horizontalKeys","verticalKeys","directionFactor","includes","increaseKeys","stepValue","shiftKey","decreaseKeys","initialKeydownWidth","setInitialContentWidth","width","setContentWidth","initialKeydownHeight","setInitialContentHeight","height","setContentHeight","separatorKeyDown","separatorPointerMove","offset","clientY","clientX","adjustmentDirection","adjustedOffset","separatorPointerUp","isPrimaryPointerButton","calciteInternalShellPanelResizeEnd","emit","window","removeEventListener","getBoundingClientRect","separatorPointerDown","calciteInternalShellPanelResizeStart","separatorEl","document","activeElement","focus","addEventListener","connectSeparator","disconnectSeparator","setActionBarsLayout","forEach","handleActionBarSlotChange","filter","matches","handleDetached","value","displayMode","handleDisplayMode","detached","handleDetachedHeightScale","heightScale","handleHeightScale","detachedHeightScale","layoutHandler","onMessagesChange","connectLocalized","connectMessages","componentWillLoad","setUpMessages","disconnectLocalized","disconnectMessages","componentDidLoad","updateAriaValues","effectiveLocaleChange","updateMessages","effectiveLocale","collapsed","contentWidth","contentHeight","resizable","allowResizing","style","separatorNode","messages","resize","onKeyDown","ref","role","tabIndex","getAnimationDir","CSS_UTILITY","calciteAnimateInDown","calciteAnimateInUp","isStart","calciteAnimateInLeft","calciteAnimateInRight","rtl","calciteAnimate","mainNodes","roundedWidth","Math","round","clamp","computedStyle","getComputedStyle","updateHeights","updateWidths","forceUpdate","max","parseInt","getPropertyValue","min","valueNow","isNaN"],"sources":["src/components/shell/resources.ts","src/components/shell/shell.scss?tag=calcite-shell&encapsulation=shadow","src/components/shell/shell.tsx","src/components/shell-center-row/resources.ts","src/components/shell-center-row/shell-center-row.scss?tag=calcite-shell-center-row&encapsulation=shadow","src/components/shell-center-row/shell-center-row.tsx","src/components/shell-panel/resources.ts","src/components/shell-panel/shell-panel.scss?tag=calcite-shell-panel&encapsulation=shadow","src/components/shell-panel/shell-panel.tsx"],"sourcesContent":["export const CSS = {\n main: \"main\",\n content: \"content\",\n contentBehind: \"content--behind\",\n contentBottom: \"content-bottom\",\n contentNonInteractive: \"content--non-interactive\",\n footer: \"footer\",\n positionedSlotWrapper: \"positioned-slot-wrapper\",\n container: \"container\",\n contentBehindCenterContent: \"center-content\",\n};\n\nexport const SLOTS = {\n centerRow: \"center-row\",\n panelStart: \"panel-start\",\n panelEnd: \"panel-end\",\n panelTop: \"panel-top\",\n panelBottom: \"panel-bottom\",\n header: \"header\",\n footer: \"footer\",\n alerts: \"alerts\",\n sheets: \"sheets\",\n modals: \"modals\",\n dialogs: \"dialogs\",\n};\n","/**\n * CSS Custom Properties\n *\n * These properties can be overridden using the component's tag as selector.\n *\n * @prop --calcite-shell-tip-spacing: The left and right spacing of the `calcite-tip-manager` when slotted in the component.\n */\n\n:host {\n @extend %component-host;\n @apply absolute\n inset-0\n flex\n h-full\n w-full\n flex-col\n overflow-hidden;\n --calcite-shell-tip-spacing: 26vw;\n}\n\n.main {\n @apply relative\n flex\n h-full\n w-full\n flex-auto\n flex-row\n justify-between\n overflow-hidden;\n}\n\n.content {\n @apply flex\n h-full\n w-full\n flex-col\n flex-nowrap\n overflow-auto;\n justify-content: space-between;\n}\n\n.content ::slotted(calcite-shell-center-row),\n.content ::slotted(calcite-panel),\n.content ::slotted(calcite-flow) {\n @apply flex-auto self-stretch;\n max-block-size: unset;\n}\n\n.content--behind {\n @apply absolute\n inset-0\n border-0;\n z-index: calc(theme(\"zIndex.default\") - 1);\n display: initial;\n}\n\n.content--non-interactive {\n @apply flex\n h-full\n w-full\n flex-col\n flex-nowrap\n pointer-events-none;\n}\n\n::slotted(calcite-shell-center-row) {\n inline-size: unset;\n}\n\n::slotted(.header .heading) {\n @apply text-n2-wrap font-normal;\n}\n\nslot[name=\"panel-start\"]::slotted(calcite-shell-panel),\nslot[name=\"panel-end\"]::slotted(calcite-shell-panel) {\n @apply relative;\n z-index: calc(var(--calcite-z-index) + 1);\n}\n\nslot[name=\"panel-end\"]::slotted(calcite-shell-panel) {\n margin-inline-start: auto;\n}\n\n::slotted(calcite-panel),\n::slotted(calcite-flow) {\n @apply border-color-3\n border\n border-l-0\n border-r-0\n border-solid;\n}\n\nslot[name=\"center-row\"]::slotted(calcite-shell-center-row:not([detached])),\nslot[name=\"panel-top\"]::slotted(calcite-shell-center-row:not([detached])),\nslot[name=\"panel-bottom\"]::slotted(calcite-shell-center-row:not([detached])) {\n @apply border-color-3 border-l border-r;\n}\n\n.center-content {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n block-size: 100%;\n inline-size: 100%;\n min-inline-size: 0;\n}\n\n.content-bottom {\n justify-content: flex-end;\n}\n\n::slotted(calcite-shell-center-row) {\n flex: none;\n align-self: stretch;\n}\n\n::slotted(calcite-tip-manager) {\n @apply shadow-2\n animate-in-up\n absolute\n box-border\n rounded\n z-toast;\n inset-block-end: theme(\"spacing.2\");\n inset-inline: var(--calcite-shell-tip-spacing);\n}\n\nslot[name=\"center-row\"]::slotted(calcite-shell-center-row),\nslot[name=\"panel-bottom\"]::slotted(calcite-shell-center-row) {\n margin-block-start: auto;\n}\n\nslot[name=\"panel-top\"]::slotted(calcite-shell-center-row) {\n margin-block-end: auto;\n}\n\n// positioning logic for expected slotted components\n.position-wrapper {\n position: absolute;\n pointer-events: none;\n inset: 0;\n}\n\n@include base-component();\n","import { Component, Element, Fragment, h, Listen, Prop, State, VNode, Watch } from \"@stencil/core\";\nimport {\n ConditionalSlotComponent,\n connectConditionalSlotComponent,\n disconnectConditionalSlotComponent,\n} from \"../../utils/conditionalSlot\";\nimport { slotChangeGetAssignedElements, slotChangeHasAssignedElement } from \"../../utils/dom\";\nimport { CSS, SLOTS } from \"./resources\";\n\n/**\n * @slot - A slot for adding custom content. This content will appear between any leading and trailing panels added to the component, such as a map.\n * @slot header - A slot for adding header content. This content will be positioned at the top of the component.\n * @slot footer - A slot for adding footer content. This content will be positioned at the bottom of the component.\n * @slot panel-start - A slot for adding the starting `calcite-shell-panel`.\n * @slot panel-end - A slot for adding the ending `calcite-shell-panel`.\n * @slot panel-top - A slot for adding the top `calcite-shell-panel`.\n * @slot panel-bottom - A slot for adding the bottom `calcite-shell-panel`.\n * @slot center-row - [Deprecated] Use the `\"panel-bottom\"` slot instead. A slot for adding the bottom `calcite-shell-center-row`.\n * @slot modals - A slot for adding `calcite-modal` components. When placed in this slot, the modal position will be constrained to the extent of the `calcite-shell`.\n * @slot dialogs - A slot for adding `calcite-dialog` components. When placed in this slot, the dialog position will be constrained to the extent of the `calcite-shell`.\n * @slot alerts - A slot for adding `calcite-alert` components. When placed in this slot, the alert position will be constrained to the extent of the `calcite-shell`.\n * @slot sheets - A slot for adding `calcite-sheet` components. When placed in this slot, the sheet position will be constrained to the extent of the `calcite-shell`.\n */\n\n@Component({\n tag: \"calcite-shell\",\n styleUrl: \"shell.scss\",\n shadow: true,\n})\nexport class Shell implements ConditionalSlotComponent {\n // --------------------------------------------------------------------------\n //\n // Properties\n //\n // --------------------------------------------------------------------------\n\n /**\n * Positions the center content behind any `calcite-shell-panel`s.\n */\n @Prop({ reflect: true }) contentBehind = false;\n\n //--------------------------------------------------------------------------\n //\n // Event Listeners\n //\n //--------------------------------------------------------------------------\n\n @Listen(\"calciteInternalShellPanelResizeStart\")\n handleCalciteInternalShellPanelResizeStart(event: CustomEvent): void {\n this.panelIsResizing = true;\n event.stopPropagation();\n }\n\n @Listen(\"calciteInternalShellPanelResizeEnd\")\n handleCalciteInternalShellPanelResizeEnd(event: CustomEvent): void {\n this.panelIsResizing = false;\n event.stopPropagation();\n }\n\n // --------------------------------------------------------------------------\n //\n // Private Properties\n //\n // --------------------------------------------------------------------------\n\n @Element() el: HTMLCalciteShellElement;\n\n @State() hasHeader = false;\n\n @State() hasFooter = false;\n\n @State() hasAlerts = false;\n\n @State() hasModals = false;\n\n @State() hasDialogs = false;\n\n @State() hasSheets = false;\n\n @State() hasPanelTop = false;\n\n @State() hasPanelBottom = false;\n\n @State() hasOnlyPanelBottom = false;\n\n @State() panelIsResizing = false;\n\n @Watch(\"hasPanelTop\")\n @Watch(\"hasPanelBottom\")\n updateHasOnlyPanelBottom(): void {\n this.hasOnlyPanelBottom = !this.hasPanelTop && this.hasPanelBottom;\n }\n\n // --------------------------------------------------------------------------\n //\n // Lifecycle\n //\n // --------------------------------------------------------------------------\n\n connectedCallback(): void {\n connectConditionalSlotComponent(this);\n }\n\n disconnectedCallback(): void {\n disconnectConditionalSlotComponent(this);\n }\n\n // --------------------------------------------------------------------------\n //\n // Private Methods\n //\n // --------------------------------------------------------------------------\n\n handleHeaderSlotChange = (event: Event): void => {\n this.hasHeader = !!slotChangeHasAssignedElement(event);\n };\n\n handleFooterSlotChange = (event: Event): void => {\n this.hasFooter = !!slotChangeHasAssignedElement(event);\n };\n\n handleAlertsSlotChange = (event: Event): void => {\n this.hasAlerts = !!slotChangeHasAssignedElement(event);\n slotChangeGetAssignedElements(event)?.map((el) => {\n if (el.tagName === \"CALCITE-ALERT\") {\n (el as HTMLCalciteAlertElement).embedded = true;\n }\n });\n };\n\n handleSheetsSlotChange = (event: Event): void => {\n this.hasSheets = !!slotChangeHasAssignedElement(event);\n slotChangeGetAssignedElements(event)?.map((el) => {\n if (el.tagName === \"CALCITE-SHEET\") {\n (el as HTMLCalciteSheetElement).embedded = true;\n }\n });\n };\n\n handleModalsSlotChange = (event: Event): void => {\n this.hasModals = !!slotChangeHasAssignedElement(event);\n slotChangeGetAssignedElements(event)?.map((el) => {\n if (el.tagName === \"CALCITE-MODAL\") {\n (el as HTMLCalciteModalElement).embedded = true;\n }\n });\n };\n\n handlePanelTopChange = (event: Event): void => {\n this.hasPanelTop = slotChangeHasAssignedElement(event);\n };\n\n handlePanelBottomChange = (event: Event): void => {\n this.hasPanelBottom = slotChangeHasAssignedElement(event);\n };\n\n handleDialogsSlotChange = (event: Event): void => {\n this.hasDialogs = !!slotChangeHasAssignedElement(event);\n slotChangeGetAssignedElements(event)?.map((el) => {\n if (el.tagName === \"CALCITE-DIALOG\") {\n (el as HTMLCalciteDialogElement).embedded = true;\n }\n });\n };\n\n // --------------------------------------------------------------------------\n //\n // Render Methods\n //\n // --------------------------------------------------------------------------\n\n renderHeader(): VNode {\n return (\n \n );\n }\n\n renderFooter(): VNode {\n return (\n \n );\n }\n\n renderAlerts(): VNode {\n return (\n \n );\n }\n\n renderSheets(): VNode {\n return (\n \n );\n }\n\n renderModals(): VNode {\n return (\n \n );\n }\n\n renderDialogs(): VNode {\n return (\n \n );\n }\n\n renderContent(): VNode[] {\n const { panelIsResizing } = this;\n const defaultSlotNode: VNode = ;\n const defaultSlotContainerNode = panelIsResizing ? (\n
{defaultSlotNode}
\n ) : (\n defaultSlotNode\n );\n const deprecatedCenterRowSlotNode: VNode = (\n \n );\n const panelBottomSlotNode: VNode = (\n \n );\n const panelTopSlotNode: VNode = (\n \n );\n\n const contentContainerKey = \"content-container\";\n\n const content = this.contentBehind\n ? [\n \n {defaultSlotContainerNode}\n ,\n \n {panelTopSlotNode}\n {panelBottomSlotNode}\n {deprecatedCenterRowSlotNode}\n ,\n ]\n : [\n \n {panelTopSlotNode}\n {defaultSlotContainerNode}\n {panelBottomSlotNode}\n {deprecatedCenterRowSlotNode}\n ,\n ];\n\n return content;\n }\n\n renderMain(): VNode {\n return (\n
\n \n {this.renderContent()}\n \n
\n );\n }\n\n renderPositionedSlots(): VNode {\n return (\n
\n {this.renderAlerts()}\n {this.renderModals()}\n {this.renderDialogs()}\n {this.renderSheets()}\n
\n );\n }\n\n render(): VNode {\n return (\n \n {this.renderHeader()}\n {this.renderMain()}\n {this.renderFooter()}\n {this.renderPositionedSlots()}\n \n );\n }\n}\n","export const CSS = {\n actionBarContainer: \"action-bar-container\",\n content: \"content\",\n};\n\nexport const SLOTS = {\n actionBar: \"action-bar\",\n};\n",":host {\n @extend %component-host;\n @apply flex\n flex-auto\n overflow-hidden\n bg-transparent\n z-default;\n}\n\n.content {\n @apply m-0\n flex\n h-full\n w-full\n overflow-hidden;\n flex: 1 0 0;\n}\n\n.action-bar-container {\n @apply flex;\n}\n\n:host([detached]) {\n @apply shadow-0\n animate-in-up\n mx-2\n mt-2 mb-6 rounded\n border-0;\n}\n\n:host([position=\"end\"]) {\n @apply self-end;\n}\n\n:host([position=\"start\"]) {\n @apply self-start;\n}\n\n:host([height-scale=\"s\"]) {\n block-size: theme(\"width[1/3]\");\n}\n\n:host([height-scale=\"m\"]) {\n block-size: 70%;\n}\n\n:host([height-scale=\"l\"]) {\n @apply h-full;\n}\n\n:host([height-scale=\"l\"][detached]) {\n block-size: calc(theme(\"height.full\") - theme(\"spacing.8\"));\n}\n\n::slotted(calcite-panel) {\n @apply h-full w-full;\n}\n\n::slotted(calcite-action-bar),\n::slotted(calcite-action-bar[position=\"end\"]) {\n border-inline-end: theme(\"borderWidth.DEFAULT\") solid;\n @apply border-color-3;\n}\n\n@include base-component();\n","import { Component, Element, Fragment, h, Prop, VNode } from \"@stencil/core\";\nimport {\n ConditionalSlotComponent,\n connectConditionalSlotComponent,\n disconnectConditionalSlotComponent,\n} from \"../../utils/conditionalSlot\";\nimport { getSlotted } from \"../../utils/dom\";\nimport { Position, Scale } from \"../interfaces\";\nimport { CSS, SLOTS } from \"./resources\";\n\n/**\n * @slot - A slot for adding content to the `calcite-shell-panel`.\n * @slot action-bar - A slot for adding a `calcite-action-bar` to the `calcite-shell-panel`.\n */\n@Component({\n tag: \"calcite-shell-center-row\",\n styleUrl: \"shell-center-row.scss\",\n shadow: true,\n})\nexport class ShellCenterRow implements ConditionalSlotComponent {\n // --------------------------------------------------------------------------\n //\n // Properties\n //\n // --------------------------------------------------------------------------\n\n /**\n * When `true`, the content area displays like a floating panel.\n */\n @Prop({ reflect: true }) detached = false;\n\n /**\n * Specifies the maximum height of the component.\n */\n @Prop({ reflect: true }) heightScale: Scale = \"s\";\n\n /**\n * Specifies the component's position. Will be flipped when the element direction is right-to-left (`\"rtl\"`).\n */\n @Prop({ reflect: true }) position: Extract<\"start\" | \"end\", Position> = \"end\";\n\n // --------------------------------------------------------------------------\n //\n // Private Properties\n //\n // --------------------------------------------------------------------------\n\n @Element() el: HTMLCalciteShellCenterRowElement;\n\n // --------------------------------------------------------------------------\n //\n // Lifecycle\n //\n // --------------------------------------------------------------------------\n\n connectedCallback(): void {\n connectConditionalSlotComponent(this);\n }\n\n disconnectedCallback(): void {\n disconnectConditionalSlotComponent(this);\n }\n\n // --------------------------------------------------------------------------\n //\n // Render Methods\n //\n // --------------------------------------------------------------------------\n\n render(): VNode {\n const { el } = this;\n\n const contentNode = (\n
\n \n
\n );\n\n const actionBar = getSlotted(el, SLOTS.actionBar);\n\n const actionBarNode = actionBar ? (\n
\n \n
\n ) : null;\n\n const children: VNode[] = [actionBarNode, contentNode];\n\n if (actionBar?.position === \"end\") {\n children.reverse();\n }\n\n return {children};\n }\n}\n","export const CSS = {\n container: \"container\",\n content: \"content\",\n contentHeader: \"content__header\",\n contentBody: \"content__body\",\n floatContent: \"float--content\",\n contentOverlay: \"content--overlay\",\n separator: \"separator\",\n float: \"float\",\n floatAll: \"float-all\",\n};\n\nexport const SLOTS = {\n actionBar: \"action-bar\",\n header: \"header\",\n};\n","/**\n * CSS Custom Properties\n *\n * These properties can be overridden using the component's tag as selector.\n *\n * @prop --calcite-shell-panel-width: Specifies the width of the component.\n * @prop --calcite-shell-panel-max-width: Specifies the maximum width of the component.\n * @prop --calcite-shell-panel-min-width: Specifies the minimum width of the component.\n * @prop --calcite-shell-panel-height: When `layout` is `horizontal`, or `layout` is `vertical` and `displayMode` is `float-content` or `float`, specifies the height of the component.\n * @prop --calcite-shell-panel-max-height: When `layout` is `horizontal`, or `layout` is `vertical` and `displayMode` is `float-content` or `float`, specifies the maximum height of the component.\n * @prop --calcite-shell-panel-min-height: When `layout` is `horizontal`, or `layout` is `vertical` and `displayMode` is `float-content` or `float`, specifies the minimum height of the component.\n * @prop --calcite-shell-panel-detached-max-height: [Deprecated] Use the `heightScale` property instead. When `displayMode` is `float-content` or `float`, specifies the maximum height of the component.\n * @prop --calcite-shell-panel-z-index: Specifies the z-index value for the component.\n *\n */\n\n:host {\n @apply relative\n pointer-events-none\n flex\n flex-initial\n items-stretch;\n z-index: var(--calcite-shell-panel-z-index, theme(\"zIndex.default\"));\n --calcite-shell-panel-detached-max-height: unset;\n --calcite-shell-panel-max-height: unset;\n --calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 2px 4px -1px rgba(0, 0, 0, 0.04);\n --calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 -2px 4px -1px rgba(0, 0, 0, 0.04);\n --calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04);\n --calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04);\n}\n\n.calcite--rtl.content--overlay {\n --calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04);\n --calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04);\n}\n\n:host([layout=\"vertical\"]) {\n z-index: var(--calcite-shell-panel-z-index, calc(theme(\"zIndex.default\") + 1));\n}\n\n:host([layout=\"vertical\"][display-mode=\"overlay\"]) {\n z-index: var(--calcite-shell-panel-z-index, calc(theme(\"zIndex.header\") + 1));\n}\n\n:host([layout=\"vertical\"][display-mode=\"float-all\"]) .content {\n flex: 2;\n}\n\n:host([layout=\"vertical\"][width-scale=\"s\"]:not([display-mode=\"float-all\"])) .content {\n --calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);\n --calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);\n --calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px);\n}\n\n:host([layout=\"vertical\"][width-scale=\"s\"][display-mode=\"float-all\"]) .content {\n --calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);\n --calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px);\n}\n\n:host([layout=\"vertical\"][width-scale=\"m\"]:not([display-mode=\"float-all\"])) .content {\n --calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);\n --calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);\n --calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px);\n}\n\n:host([layout=\"vertical\"][width-scale=\"m\"][display-mode=\"float-all\"]) .content {\n --calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);\n --calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px);\n}\n\n:host([layout=\"vertical\"][width-scale=\"l\"]:not([display-mode=\"float-all\"])) .content {\n --calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);\n --calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);\n --calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px);\n}\n\n:host([layout=\"vertical\"][width-scale=\"l\"][display-mode=\"float-all\"]) .content {\n --calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);\n --calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px);\n}\n\n:host([layout=\"horizontal\"][height-scale=\"s\"]) .content {\n --calcite-internal-shell-panel-max-height: var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 20vh)\n );\n}\n\n:host([layout=\"horizontal\"]) .content {\n --calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);\n --calcite-internal-shell-panel-max-height: var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 30vh)\n );\n}\n\n:host([layout=\"horizontal\"][height-scale=\"l\"]) .content {\n --calcite-internal-shell-panel-max-height: var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 40vh)\n );\n}\n\n.container {\n @apply text-color-2\n text-n1\n pointer-events-none\n box-border\n flex\n flex-auto\n items-stretch\n bg-transparent\n h-full;\n\n * {\n @apply box-border;\n }\n\n &.float-all {\n margin-block: 0.5rem;\n margin-inline: 0.5rem;\n }\n}\n\n:host([layout=\"horizontal\"]) .container {\n @apply w-full h-auto;\n flex-direction: column;\n}\n\n:host(:hover),\n:host(:focus-within) {\n .separator:not(:hover):not(:focus) {\n @apply opacity-100;\n background-color: var(--calcite-color-border-3);\n }\n}\n\n.separator {\n @apply transition-default\n pointer-events-auto\n absolute\n flex\n bg-transparent\n opacity-0;\n cursor: col-resize;\n outline: none;\n &:hover {\n @apply opacity-100;\n background-color: var(--calcite-color-border-2);\n }\n &:focus {\n @apply bg-brand opacity-100;\n }\n}\n\n:host([layout=\"vertical\"]) .separator {\n @apply bottom-0\n top-0 h-full\n w-0.5;\n cursor: col-resize;\n}\n\n:host([layout=\"horizontal\"][position=\"start\"]) .separator {\n @apply bottom-0;\n}\n\n:host([layout=\"horizontal\"][position=\"end\"]) .separator {\n @apply top-0;\n}\n\n:host([layout=\"horizontal\"]) .separator {\n @apply end-0 w-full\n h-0.5;\n cursor: row-resize;\n}\n\n:host([layout=\"vertical\"][position=\"start\"]) .separator {\n inset-inline-end: -2px;\n}\n:host([layout=\"horizontal\"][position=\"start\"]) .separator {\n inset-block-end: -2px;\n}\n\n:host([layout=\"vertical\"][position=\"end\"]) .separator {\n inset-inline-start: -2px;\n}\n:host([layout=\"horizontal\"][position=\"end\"]) .separator {\n inset-block-start: -2px;\n}\n\n::slotted(calcite-panel),\n::slotted(calcite-flow) {\n @apply h-full w-full flex-auto;\n max-block-size: unset;\n max-inline-size: unset;\n}\n\n::slotted(.calcite-match-height) {\n @apply flex flex-auto overflow-hidden;\n}\n\n.content {\n @apply bg-background\n pointer-events-auto\n flex\n flex-col\n flex-nowrap\n items-stretch\n self-stretch\n p-0;\n transition:\n max-block-size var(--calcite-animation-timing),\n max-inline-size var(--calcite-animation-timing);\n}\n\n:host([layout=\"vertical\"]:not([display-mode=\"float-all\"])) .content {\n inline-size: var(--calcite-internal-shell-panel-width);\n max-inline-size: var(--calcite-internal-shell-panel-max-width);\n min-inline-size: var(--calcite-internal-shell-panel-min-width);\n}\n\n:host([layout=\"vertical\"][display-mode=\"float-all\"]) .content {\n inline-size: var(--calcite-internal-shell-panel-width);\n min-inline-size: var(--calcite-internal-shell-panel-min-width);\n}\n\n:host([layout=\"horizontal\"]) .content {\n block-size: var(--calcite-internal-shell-panel-height);\n max-block-size: var(--calcite-internal-shell-panel-max-height);\n min-block-size: var(--calcite-internal-shell-panel-min-height);\n}\n\n.content__header {\n @apply flex\n flex-initial\n flex-col\n flex-nowrap\n items-stretch;\n}\n\n.content__body {\n @apply flex\n flex-auto\n flex-col\n overflow-hidden;\n}\n\n.content--overlay {\n @apply absolute\n shadow-0;\n}\n\n:host([layout=\"vertical\"]) .content--overlay {\n @apply top-0 h-full;\n}\n\n:host([layout=\"horizontal\"]) .content--overlay {\n @apply start-0 w-full;\n}\n\n:host([layout=\"vertical\"][position=\"start\"]) .content--overlay {\n inset-inline-start: 100%;\n box-shadow: var(--calcite-internal-shell-panel-shadow-inline-start);\n}\n\n:host([layout=\"vertical\"][position=\"end\"]) .content--overlay {\n inset-inline-end: 100%;\n box-shadow: var(--calcite-internal-shell-panel-shadow-inline-end);\n}\n\n:host([layout=\"horizontal\"][position=\"start\"]) .content--overlay {\n inset-block-start: 100%;\n box-shadow: var(--calcite-internal-shell-panel-shadow-block-start);\n}\n\n:host([layout=\"horizontal\"][position=\"end\"]) .content--overlay {\n inset-block-end: 100%;\n box-shadow: var(--calcite-internal-shell-panel-shadow-block-end);\n}\n\n.float--content {\n @apply shadow-0\n mx-2\n mt-2\n mb-auto\n h-auto\n overflow-hidden\n rounded;\n max-block-size: var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem));\n ::slotted(calcite-panel),\n ::slotted(calcite-flow) {\n max-block-size: unset;\n }\n}\n\n:host([layout=\"horizontal\"]) .float--content {\n @apply my-2;\n}\n\n:host([position=\"start\"]) .float--content,\n:host([position=\"end\"]) .float--content {\n ::slotted(calcite-panel),\n ::slotted(calcite-flow) {\n @apply border-none;\n }\n}\n\n.content[hidden] {\n @apply hidden;\n}\n\nslot[name=\"action-bar\"]::slotted(calcite-action-bar),\n.content ::slotted(calcite-flow),\n.content ::slotted(calcite-panel:not([closed])) {\n @apply border-color-3 border border-solid;\n}\n\n:host([position=\"start\"]:not([slot=\"panel-end\"]):not([display-mode=\"float-all\"])),\n:host([position=\"end\"][slot=\"panel-start\"]) {\n slot[name=\"action-bar\"]::slotted(calcite-action-bar),\n .content ::slotted(calcite-flow),\n .content ::slotted(calcite-panel) {\n border-inline-start: none;\n }\n}\n\n:host([position=\"end\"]:not([slot=\"panel-start\"])),\n:host([position=\"start\"][slot=\"panel-end\"]) {\n slot[name=\"action-bar\"]::slotted(calcite-action-bar),\n .content ::slotted(calcite-flow),\n .content ::slotted(calcite-panel) {\n border-inline-end: none;\n }\n}\n\n:host([layout=\"horizontal\"]:not([display-mode=\"float-all\"])) slot[name=\"action-bar\"]::slotted(calcite-action-bar) {\n border-inline: 0;\n}\n\n:host([layout=\"horizontal\"][position=\"start\"]:not([display-mode=\"float-all\"])) .content ::slotted(calcite-flow),\n:host([layout=\"horizontal\"][position=\"start\"]:not([display-mode=\"float-all\"])) .content ::slotted(calcite-panel) {\n border-inline: 0;\n border-block-start: 0;\n}\n\n:host([layout=\"horizontal\"][position=\"end\"]) .content ::slotted(calcite-flow),\n:host([layout=\"horizontal\"][position=\"end\"]) .content ::slotted(calcite-panel) {\n border-inline: 0;\n border-block-end: 0;\n}\n\n@include base-component();\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n forceUpdate,\n h,\n Prop,\n State,\n VNode,\n Watch,\n} from \"@stencil/core\";\nimport {\n ConditionalSlotComponent,\n connectConditionalSlotComponent,\n disconnectConditionalSlotComponent,\n} from \"../../utils/conditionalSlot\";\nimport {\n getElementDir,\n isPrimaryPointerButton,\n slotChangeGetAssignedElements,\n slotChangeHasAssignedElement,\n} from \"../../utils/dom\";\nimport { connectLocalized, disconnectLocalized, LocalizedComponent } from \"../../utils/locale\";\nimport { clamp } from \"../../utils/math\";\nimport {\n connectMessages,\n disconnectMessages,\n setUpMessages,\n T9nComponent,\n updateMessages,\n} from \"../../utils/t9n\";\nimport { Layout, Position, Scale } from \"../interfaces\";\nimport { CSS_UTILITY } from \"../../utils/resources\";\nimport { ShellPanelMessages } from \"./assets/shell-panel/t9n\";\nimport { CSS, SLOTS } from \"./resources\";\nimport { DisplayMode } from \"./interfaces\";\n\n/**\n * @slot - A slot for adding custom content.\n * @slot action-bar - A slot for adding a `calcite-action-bar` to the component.\n */\n@Component({\n tag: \"calcite-shell-panel\",\n styleUrl: \"shell-panel.scss\",\n shadow: true,\n assetsDirs: [\"assets\"],\n})\nexport class ShellPanel implements ConditionalSlotComponent, LocalizedComponent, T9nComponent {\n // --------------------------------------------------------------------------\n //\n // Properties\n //\n // --------------------------------------------------------------------------\n\n /**\n * When `true`, hides the component's content area.\n */\n @Prop({ reflect: true }) collapsed = false;\n\n /**\n * When `true`, the content area displays like a floating panel.\n *\n * @deprecated Use `displayMode` instead.\n */\n @Prop({ reflect: true }) detached = false;\n\n @Watch(\"detached\")\n handleDetached(value: boolean): void {\n if (value) {\n this.displayMode = \"float-content\";\n } else if (this.displayMode === \"float-content\" || this.displayMode === \"float\") {\n this.displayMode = \"dock\";\n }\n }\n\n /**\n * Specifies the display mode of the component, where:\n *\n * `\"dock\"` displays at full height adjacent to center content,\n *\n * `\"overlay\"` displays at full height on top of center content, and\n *\n * `\"float\"` [Deprecated] does not display at full height with content separately detached from `calcite-action-bar` on top of center content.\n *\n * `\"float-content\"` does not display at full height with content separately detached from `calcite-action-bar` on top of center content.\n *\n * `\"float-all\"` detaches the `calcite-panel` and `calcite-action-bar` on top of center content.\n */\n @Prop({ reflect: true }) displayMode: DisplayMode = \"dock\";\n\n @Watch(\"displayMode\")\n handleDisplayMode(value: DisplayMode): void {\n this.detached = value === \"float-content\" || value === \"float\";\n }\n\n /**\n * When `displayMode` is `float-content` or `float`, specifies the maximum height of the component.\n *\n * @deprecated Use `heightScale` instead.\n */\n @Prop({ reflect: true }) detachedHeightScale: Scale;\n\n @Watch(\"detachedHeightScale\")\n handleDetachedHeightScale(value: Scale): void {\n this.heightScale = value;\n }\n\n /**\n * When `layout` is `horizontal`, specifies the maximum height of the component.\n */\n @Prop({ reflect: true }) heightScale: Scale;\n\n @Watch(\"heightScale\")\n handleHeightScale(value: Scale): void {\n this.detachedHeightScale = value;\n }\n\n /**\n * When `layout` is `vertical`, specifies the width of the component.\n */\n\n @Prop({ reflect: true }) widthScale: Scale = \"m\";\n\n /**\n * The direction of the component.\n */\n @Prop({ reflect: true }) layout: Extract<\"horizontal\" | \"vertical\", Layout> = \"vertical\";\n\n @Watch(\"layout\")\n layoutHandler(): void {\n this.setActionBarsLayout(this.actionBars);\n }\n\n /**\n * Specifies the component's position. Will be flipped when the element direction is right-to-left (`\"rtl\"`).\n */\n @Prop({ reflect: true }) position: Extract<\"start\" | \"end\", Position> = \"start\";\n\n /**\n * When `true` and `displayMode` is not `float-content` or `float`, the component's content area is resizable.\n */\n @Prop({ reflect: true }) resizable = false;\n\n /**\n * Made into a prop for testing purposes only\n *\n * @internal\n */\n // eslint-disable-next-line @stencil-community/strict-mutable -- updated by t9n module\n @Prop({ mutable: true }) messages: ShellPanelMessages;\n\n /**\n * Use this property to override individual strings used by the component.\n */\n // eslint-disable-next-line @stencil-community/strict-mutable -- updated by t9n module\n @Prop({ mutable: true }) messageOverrides: Partial;\n\n @Watch(\"messageOverrides\")\n onMessagesChange(): void {\n /* wired up by t9n util */\n }\n //--------------------------------------------------------------------------\n //\n // Lifecycle\n //\n //--------------------------------------------------------------------------\n\n connectedCallback(): void {\n connectConditionalSlotComponent(this);\n connectLocalized(this);\n connectMessages(this);\n }\n\n async componentWillLoad(): Promise {\n await setUpMessages(this);\n }\n\n disconnectedCallback(): void {\n disconnectConditionalSlotComponent(this);\n this.disconnectSeparator();\n disconnectLocalized(this);\n disconnectMessages(this);\n }\n\n componentDidLoad(): void {\n this.updateAriaValues();\n }\n\n // --------------------------------------------------------------------------\n //\n // Private Properties\n //\n // --------------------------------------------------------------------------\n\n @Element() el: HTMLCalciteShellPanelElement;\n\n @State() contentWidth: number = null;\n\n @State() contentHeight: number = null;\n\n initialContentWidth: number = null;\n\n initialContentHeight: number = null;\n\n initialClientX: number = null;\n\n initialClientY: number = null;\n\n contentEl: HTMLDivElement;\n\n separatorEl: HTMLDivElement;\n\n contentWidthMax: number = null;\n\n contentWidthMin: number = null;\n\n contentHeightMax: number = null;\n\n contentHeightMin: number = null;\n\n step = 1;\n\n stepMultiplier = 10;\n\n actionBars: HTMLCalciteActionBarElement[] = [];\n\n @State() defaultMessages: ShellPanelMessages;\n\n @State() effectiveLocale = \"\";\n\n @Watch(\"effectiveLocale\")\n effectiveLocaleChange(): void {\n updateMessages(this, this.effectiveLocale);\n }\n\n @State() hasHeader = false;\n\n // --------------------------------------------------------------------------\n //\n // Events\n //\n // --------------------------------------------------------------------------\n\n /**\n * @internal\n */\n @Event({ cancelable: false }) calciteInternalShellPanelResizeStart: EventEmitter;\n\n /**\n * @internal\n */\n @Event({ cancelable: false }) calciteInternalShellPanelResizeEnd: EventEmitter;\n\n // --------------------------------------------------------------------------\n //\n // Render Methods\n //\n // --------------------------------------------------------------------------\n renderHeader(): VNode {\n return (\n \n );\n }\n\n render(): VNode {\n const {\n collapsed,\n position,\n initialContentWidth,\n initialContentHeight,\n contentWidth,\n contentWidthMax,\n contentWidthMin,\n contentHeight,\n contentHeightMax,\n contentHeightMin,\n resizable,\n layout,\n displayMode,\n } = this;\n\n const dir = getElementDir(this.el);\n\n const allowResizing = displayMode !== \"float-content\" && displayMode !== \"float\" && resizable;\n\n const style = allowResizing\n ? layout === \"horizontal\"\n ? contentHeight\n ? { height: `${contentHeight}px` }\n : null\n : contentWidth\n ? { width: `${contentWidth}px` }\n : null\n : null;\n\n const separatorNode =\n !collapsed && allowResizing ? (\n \n ) : null;\n\n const getAnimationDir = (): string => {\n if (layout === \"horizontal\") {\n return position === \"start\"\n ? CSS_UTILITY.calciteAnimateInDown\n : CSS_UTILITY.calciteAnimateInUp;\n } else {\n const isStart =\n (dir === \"ltr\" && position === \"end\") || (dir === \"rtl\" && position === \"start\");\n return isStart ? CSS_UTILITY.calciteAnimateInLeft : CSS_UTILITY.calciteAnimateInRight;\n }\n };\n\n const contentNode = (\n