diff --git a/packages/calcite-components/src/components/stepper-item/resources.ts b/packages/calcite-components/src/components/stepper-item/resources.ts index d2527cbc940..aec3d1a2ae5 100644 --- a/packages/calcite-components/src/components/stepper-item/resources.ts +++ b/packages/calcite-components/src/components/stepper-item/resources.ts @@ -1,5 +1,6 @@ export const CSS = { container: "container", + hasSlottedContent: "has-slotted-content", stepperItemContent: "stepper-item-content", stepperItemDescription: "stepper-item-description", stepperItemHeader: "stepper-item-header", diff --git a/packages/calcite-components/src/components/stepper-item/stepper-item.scss b/packages/calcite-components/src/components/stepper-item/stepper-item.scss index db5ffcc98a3..5f5c435e6d7 100644 --- a/packages/calcite-components/src/components/stepper-item/stepper-item.scss +++ b/packages/calcite-components/src/components/stepper-item/stepper-item.scss @@ -263,8 +263,7 @@ } :host([layout="vertical"][selected]) .container { border-color: var(--calcite-stepper-bar-selected-fill-color, var(--calcite-color-brand)); - - & .stepper-item-content:not(:empty) { + & .stepper-item-content.has-slotted-content { margin-block-end: var(--calcite-internal-stepper-item-spacing-unit-l); } } diff --git a/packages/calcite-components/src/components/stepper-item/stepper-item.tsx b/packages/calcite-components/src/components/stepper-item/stepper-item.tsx index 92a7f3cbeec..aa97f60e8bf 100644 --- a/packages/calcite-components/src/components/stepper-item/stepper-item.tsx +++ b/packages/calcite-components/src/components/stepper-item/stepper-item.tsx @@ -9,6 +9,7 @@ import { method, JsxNode, setAttribute, + state, } from "@arcgis/lumina"; import { Scale } from "../interfaces"; import { @@ -28,6 +29,7 @@ import { IconNameOrString } from "../icon/interfaces"; import { useT9n } from "../../controllers/useT9n"; import type { Stepper } from "../stepper/stepper"; import { isHidden } from "../../utils/component"; +import { slotChangeHasContent } from "../../utils/dom"; import { CSS } from "./resources"; import T9nStrings from "./assets/t9n/messages.en.json"; import { styles } from "./stepper-item.scss"; @@ -68,6 +70,12 @@ export class StepperItem extends LitElement implements InteractiveComponent { //#endregion + //#region State Properties + + @state() stepperItemHasContent: boolean; + + //#endregion + //#region Public Properties /** When `true`, the step has been completed. */ @@ -346,8 +354,15 @@ export class StepperItem extends LitElement implements InteractiveComponent { {this.description} -