Skip to content

Commit

Permalink
fix(shell-panel): adds border at the start when slotted in panel-end (
Browse files Browse the repository at this point in the history
#8314)

**Related Issue:** #7929 

## Summary

Adds border to the `calcite-shell-panel` when slotted in `panel-end` of
`calcite-shell`.
  • Loading branch information
anveshmekala authored and alisonailea committed Dec 7, 2023
1 parent 5953ada commit 161502a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,22 @@ slot[name="action-bar"]::slotted(calcite-action-bar),
@apply border-color-3 border border-solid;
}

:host([position="start"]) slot[name="action-bar"]::slotted(calcite-action-bar),
:host([position="start"]) .content ::slotted(calcite-flow),
:host([position="start"]) .content ::slotted(calcite-panel) {
border-inline-start: none;
:host([position="start"]:not([slot="panel-end"])),
:host([position="end"][slot="panel-start"]) {
slot[name="action-bar"]::slotted(calcite-action-bar),
.content ::slotted(calcite-flow),
.content ::slotted(calcite-panel) {
border-inline-start: none;
}
}

:host([position="end"]) slot[name="action-bar"]::slotted(calcite-action-bar),
:host([position="end"]) .content ::slotted(calcite-flow),
:host([position="end"]) .content ::slotted(calcite-panel) {
border-inline-end: none;
:host([position="end"]:not([slot="panel-start"])),
:host([position="start"][slot="panel-end"]) {
slot[name="action-bar"]::slotted(calcite-action-bar),
.content ::slotted(calcite-flow),
.content ::slotted(calcite-panel) {
border-inline-end: none;
}
}

:host([layout="horizontal"]) slot[name="action-bar"]::slotted(calcite-action-bar) {
Expand Down
26 changes: 26 additions & 0 deletions packages/calcite-components/src/components/shell/shell.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1323,3 +1323,29 @@ position:relative;
overlayDisplayMode_TestOnly.parameters = {
chromatic: { delay: 500 },
};

export const panelEndWithPositionStart_TestOnly = (): string => html`<calcite-shell>
<calcite-shell-panel slot="panel-end" width-scale="l" position="start" display-mode="block" resizable>
<calcite-action-bar slot="action-bar">
<calcite-action text="Save" icon="save" indicator></calcite-action>
<calcite-action active icon="map" text="Map"></calcite-action>
<calcite-action icon="layer" text="Layer"></calcite-action>
</calcite-action-bar>
<calcite-panel heading="Map Options">
<calcite-button width="half" slot="footer"> Next </calcite-button>
<calcite-block collapsible heading="Layer effects" description="Adjust blur, highlight, and more">
<calcite-icon scale="s" slot="icon" icon="effects"></calcite-icon>
<calcite-notice open>
<div slot="message">Use layer effects sparingly, for emphasis</div>
</calcite-notice>
</calcite-block>
<calcite-block collapsible heading="Symbology" description="Select type, color, and transparency">
<calcite-icon scale="s" slot="icon" icon="map-pin"></calcite-icon>
<calcite-notice open>
<div slot="message">The viewers are going to love this</div>
</calcite-notice>
</calcite-block>
<calcite-fab slot="fab"></calcite-fab>
</calcite-panel>
</calcite-shell-panel>
</calcite-shell>`;

0 comments on commit 161502a

Please sign in to comment.