diff --git a/packages/calcite-components/src/components/flow-item/flow-item.stories.ts b/packages/calcite-components/src/components/flow-item/flow-item.stories.ts index f80d1efc45d..e0ce6fb4e88 100644 --- a/packages/calcite-components/src/components/flow-item/flow-item.stories.ts +++ b/packages/calcite-components/src/components/flow-item/flow-item.stories.ts @@ -249,7 +249,7 @@ export const footerStartEndAndContentBottom = (): string => `; -export const footerSlotCoexistence = (): string => +export const footerSlot = (): string => html`
Header!
diff --git a/packages/calcite-components/src/components/panel/panel.scss b/packages/calcite-components/src/components/panel/panel.scss index 0b49bf01950..8ef2ffad730 100644 --- a/packages/calcite-components/src/components/panel/panel.scss +++ b/packages/calcite-components/src/components/panel/panel.scss @@ -169,25 +169,30 @@ } .footer { - @apply flex mt-auto flex-row content-between justify-center items-center bg-foreground-1; - + @apply flex mt-auto flex-row content-between justify-center items-center bg-foreground-1 text-n2-wrap; border-block-start: 1px solid var(--calcite-color-border-3); padding: var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-padding)); - column-gap: 0; - row-gap: var(--calcite-spacing-md); } -@include slotted("footer-start", "*") { - @apply flex text-n2-wrap self-center; +.footer-content { + @apply flex flex-row items-center justify-center flex-1; +} - margin-inline-end: auto; - gap: var(--calcite-spacing-md); +.footer-actions { + @apply flex flex-row items-center justify-evenly flex-1; + gap: var(--calcite-internal-panel-default-padding); } -@include slotted("footer-end", "*") { - @apply flex text-n2-wrap self-center; +.footer-start { + @apply flex flex-row items-center justify-start flex-1; + margin-inline-end: auto; + gap: var(--calcite-internal-panel-default-padding); +} - gap: var(--calcite-spacing-md); +.footer-end { + @apply flex flex-row items-center justify-end flex-1; + margin-inline-start: auto; + gap: var(--calcite-internal-panel-default-padding); } .fab-container { diff --git a/packages/calcite-components/src/components/panel/panel.stories.ts b/packages/calcite-components/src/components/panel/panel.stories.ts index 49f721bb0fd..d6a48a5ecc3 100644 --- a/packages/calcite-components/src/components/panel/panel.stories.ts +++ b/packages/calcite-components/src/components/panel/panel.stories.ts @@ -242,10 +242,97 @@ export const footerPadding_TestOnly = (): string =>
Header!

Slotted content!

-
Footer!
+ 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8
`; +export const footerActions = (): string => + html`

footer-actions (Deprecated): Auto width

+
+ +
Header!
+

Slotted content!

+ 1 + 2 +
+
+

footer-actions (Deprecated): Full width

+
+ +
Header!
+

Slotted content!

+ 1 + 2 +
+
`; + +export const footerVariations = (): string => + html`

footer

+
+ +
Header!
+

Slotted content!

+ 1 + 2 +
+
+

footer-start only

+
+ +
Header!
+

Slotted content!

+ 1 + 2 +
+
+

footer-end only

+
+ +
Header!
+

Slotted content!

+ 1 + 2 +
+
+

footer-start and footer-end auto width

+
+ +
Header!
+

Slotted content!

+ 1 + 2 + 3 + 4 +
+
+

footer-start and footer-end full width single

+
+ +
Header!
+

Slotted content!

+ 1 + 2 +
+
+

footer-start and footer-end full width multiple

+
+ +
Header!
+

Slotted content!

+ 1 + 2 + 3 + 4 +
+
`; + export const actionBarBackgroundColor_TestOnly = (): string => html` diff --git a/packages/calcite-components/src/components/panel/panel.tsx b/packages/calcite-components/src/components/panel/panel.tsx index 17d95d36b8e..4459f80cf41 100644 --- a/packages/calcite-components/src/components/panel/panel.tsx +++ b/packages/calcite-components/src/components/panel/panel.tsx @@ -620,14 +620,22 @@ export class Panel return (
- - - - + + + +
); } diff --git a/packages/calcite-components/src/components/panel/resources.ts b/packages/calcite-components/src/components/panel/resources.ts index 6fd7f4d449d..f7704b36582 100644 --- a/packages/calcite-components/src/components/panel/resources.ts +++ b/packages/calcite-components/src/components/panel/resources.ts @@ -17,6 +17,10 @@ export const CSS = { contentWrapper: "content-wrapper", fabContainer: "fab-container", footer: "footer", + footerContent: "footer-content", + footerActions: "footer-actions", + footerStart: "footer-start", + footerEnd: "footer-end", }; export const ICONS = { diff --git a/packages/calcite-components/src/demos/panel.html b/packages/calcite-components/src/demos/panel.html index e0fd9209bdc..2f9330a4a73 100644 --- a/packages/calcite-components/src/demos/panel.html +++ b/packages/calcite-components/src/demos/panel.html @@ -178,10 +178,23 @@ icon-start="check" width="full" > + +
+
+ +