Skip to content

Commit 161502a

Browse files
anveshmekalaalisonailea
authored andcommitted
fix(shell-panel): adds border at the start when slotted in panel-end (#8314)
**Related Issue:** #7929 ## Summary Adds border to the `calcite-shell-panel` when slotted in `panel-end` of `calcite-shell`.
1 parent 5953ada commit 161502a

File tree

2 files changed

+40
-8
lines changed

2 files changed

+40
-8
lines changed

packages/calcite-components/src/components/shell-panel/shell-panel.scss

+14-8
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,22 @@ slot[name="action-bar"]::slotted(calcite-action-bar),
288288
@apply border-color-3 border border-solid;
289289
}
290290

291-
:host([position="start"]) slot[name="action-bar"]::slotted(calcite-action-bar),
292-
:host([position="start"]) .content ::slotted(calcite-flow),
293-
:host([position="start"]) .content ::slotted(calcite-panel) {
294-
border-inline-start: none;
291+
:host([position="start"]:not([slot="panel-end"])),
292+
:host([position="end"][slot="panel-start"]) {
293+
slot[name="action-bar"]::slotted(calcite-action-bar),
294+
.content ::slotted(calcite-flow),
295+
.content ::slotted(calcite-panel) {
296+
border-inline-start: none;
297+
}
295298
}
296299

297-
:host([position="end"]) slot[name="action-bar"]::slotted(calcite-action-bar),
298-
:host([position="end"]) .content ::slotted(calcite-flow),
299-
:host([position="end"]) .content ::slotted(calcite-panel) {
300-
border-inline-end: none;
300+
:host([position="end"]:not([slot="panel-start"])),
301+
:host([position="start"][slot="panel-end"]) {
302+
slot[name="action-bar"]::slotted(calcite-action-bar),
303+
.content ::slotted(calcite-flow),
304+
.content ::slotted(calcite-panel) {
305+
border-inline-end: none;
306+
}
301307
}
302308

303309
:host([layout="horizontal"]) slot[name="action-bar"]::slotted(calcite-action-bar) {

packages/calcite-components/src/components/shell/shell.stories.ts

+26
Original file line numberDiff line numberDiff line change
@@ -1323,3 +1323,29 @@ position:relative;
13231323
overlayDisplayMode_TestOnly.parameters = {
13241324
chromatic: { delay: 500 },
13251325
};
1326+
1327+
export const panelEndWithPositionStart_TestOnly = (): string => html`<calcite-shell>
1328+
<calcite-shell-panel slot="panel-end" width-scale="l" position="start" display-mode="block" resizable>
1329+
<calcite-action-bar slot="action-bar">
1330+
<calcite-action text="Save" icon="save" indicator></calcite-action>
1331+
<calcite-action active icon="map" text="Map"></calcite-action>
1332+
<calcite-action icon="layer" text="Layer"></calcite-action>
1333+
</calcite-action-bar>
1334+
<calcite-panel heading="Map Options">
1335+
<calcite-button width="half" slot="footer"> Next </calcite-button>
1336+
<calcite-block collapsible heading="Layer effects" description="Adjust blur, highlight, and more">
1337+
<calcite-icon scale="s" slot="icon" icon="effects"></calcite-icon>
1338+
<calcite-notice open>
1339+
<div slot="message">Use layer effects sparingly, for emphasis</div>
1340+
</calcite-notice>
1341+
</calcite-block>
1342+
<calcite-block collapsible heading="Symbology" description="Select type, color, and transparency">
1343+
<calcite-icon scale="s" slot="icon" icon="map-pin"></calcite-icon>
1344+
<calcite-notice open>
1345+
<div slot="message">The viewers are going to love this</div>
1346+
</calcite-notice>
1347+
</calcite-block>
1348+
<calcite-fab slot="fab"></calcite-fab>
1349+
</calcite-panel>
1350+
</calcite-shell-panel>
1351+
</calcite-shell>`;

0 commit comments

Comments
 (0)