@carbon/ibm-products-web-components 0.49.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/guide-banner/guide-banner.d.ts.map +1 -1
- package/es/components/guide-banner/guide-banner.js +2 -3
- package/es/components/guide-banner/guide-banner.js.map +1 -1
- package/es/components/page-header/page-header-scroller.d.ts.map +1 -1
- package/es/components/page-header/page-header-scroller.js +2 -2
- package/es/components/page-header/page-header-scroller.js.map +1 -1
- package/es/components/tearsheet/tearsheet.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet-header-content.d.ts +8 -0
- package/es/components/tearsheet-preview/tearsheet-header-content.d.ts.map +1 -1
- package/es/components/tearsheet-preview/tearsheet-header-content.js +72 -15
- package/es/components/tearsheet-preview/tearsheet-header-content.js.map +1 -1
- package/es/components/tearsheet-preview/tearsheet-header-content.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet-header-content.scss.js.map +1 -1
- package/es/components/tearsheet-preview/tearsheet-header.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet-navigation-bar.scss.js +1 -1
- package/es/components/tearsheet-preview/tearsheet.scss.js +1 -1
- package/es/ibm-products-web-components/package.js +1 -1
- package/es-custom/components/guide-banner/guide-banner.js +2 -3
- package/es-custom/components/guide-banner/guide-banner.js.map +1 -1
- package/es-custom/components/page-header/page-header-scroller.js +2 -2
- package/es-custom/components/page-header/page-header-scroller.js.map +1 -1
- package/es-custom/components/tearsheet/tearsheet.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-header-content.js +72 -15
- package/es-custom/components/tearsheet-preview/tearsheet-header-content.js.map +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-header-content.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-header-content.scss.js.map +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-header.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet-navigation-bar.scss.js +1 -1
- package/es-custom/components/tearsheet-preview/tearsheet.scss.js +1 -1
- package/es-custom/ibm-products-web-components/package.js +1 -1
- package/lib/components/guide-banner/guide-banner.d.ts.map +1 -1
- package/lib/components/page-header/page-header-scroller.d.ts.map +1 -1
- package/lib/components/tearsheet-preview/tearsheet-header-content.d.ts +8 -0
- package/lib/components/tearsheet-preview/tearsheet-header-content.d.ts.map +1 -1
- package/package.json +4 -4
- package/scss/components/tearsheet-preview/tearsheet-header-content.scss +9 -0
|
@@ -12,6 +12,7 @@ import { tearsheetSignal } from "./tearsheet-signal.js";
|
|
|
12
12
|
import { registerFocusableContainers } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
|
|
13
13
|
import "../truncated-text/index.js";
|
|
14
14
|
import tearsheet_header_content_default$1 from "./tearsheet-header-content.scss.js";
|
|
15
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
15
16
|
import { LitElement, html } from "lit";
|
|
16
17
|
import { property, query, state } from "lit/decorators.js";
|
|
17
18
|
import HostListenerMixin from "@carbon/web-components/es/globals/mixins/host-listener.js";
|
|
@@ -52,6 +53,10 @@ let CDSTearsheetHeaderContent = class CDSTearsheetHeaderContent extends SignalWa
|
|
|
52
53
|
this._hasTitleEnd = false;
|
|
53
54
|
this._hasDecorator = false;
|
|
54
55
|
this._hasAILabel = false;
|
|
56
|
+
this._hasLabel = false;
|
|
57
|
+
this._hasDescription = false;
|
|
58
|
+
this._hasHeaderActions = false;
|
|
59
|
+
this._hasExtraContent = false;
|
|
55
60
|
this._isMobileOrNarrow = false;
|
|
56
61
|
this.mdMediaQuery = `(max-width: ${breakpoints.md.width})`;
|
|
57
62
|
this.isMobileDevice = new MatchMediaController(this, this.mdMediaQuery, false);
|
|
@@ -128,6 +133,22 @@ let CDSTearsheetHeaderContent = class CDSTearsheetHeaderContent extends SignalWa
|
|
|
128
133
|
const assignedNodes = this._titleEndSlot.assignedElements();
|
|
129
134
|
this._hasTitleEnd = assignedNodes.length > 0;
|
|
130
135
|
}
|
|
136
|
+
if (this._labelSlot) {
|
|
137
|
+
const assignedNodes = this._labelSlot.assignedElements();
|
|
138
|
+
this._hasLabel = assignedNodes.length > 0;
|
|
139
|
+
}
|
|
140
|
+
if (this._descriptionSlot) {
|
|
141
|
+
const assignedNodes = this._descriptionSlot.assignedElements();
|
|
142
|
+
this._hasDescription = assignedNodes.length > 0;
|
|
143
|
+
}
|
|
144
|
+
if (this._headerActionsSlot) {
|
|
145
|
+
const assignedNodes = this._headerActionsSlot.assignedElements();
|
|
146
|
+
this._hasHeaderActions = assignedNodes.length > 0;
|
|
147
|
+
}
|
|
148
|
+
if (this._defaultSlot) {
|
|
149
|
+
const assignedNodes = this._defaultSlot.assignedElements();
|
|
150
|
+
this._hasExtraContent = assignedNodes.length > 0;
|
|
151
|
+
}
|
|
131
152
|
}
|
|
132
153
|
_handleSlotChange() {
|
|
133
154
|
this._checkSlots();
|
|
@@ -210,20 +231,38 @@ let CDSTearsheetHeaderContent = class CDSTearsheetHeaderContent extends SignalWa
|
|
|
210
231
|
</cds-custom-icon-button>
|
|
211
232
|
</div>
|
|
212
233
|
` : html``;
|
|
213
|
-
const headerActionsTemplate = html`
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
234
|
+
const headerActionsTemplate = this._hasHeaderActions ? html`
|
|
235
|
+
<div class="${blockClass}__header-actions">
|
|
236
|
+
<slot
|
|
237
|
+
name="header-actions"
|
|
238
|
+
@slotchange="${this._handleSlotChange}"
|
|
239
|
+
></slot>
|
|
240
|
+
</div>
|
|
241
|
+
` : html`<slot
|
|
242
|
+
name="header-actions"
|
|
243
|
+
@slotchange="${this._handleSlotChange}"
|
|
244
|
+
></slot>`;
|
|
245
|
+
const titleClasses = classMap({
|
|
246
|
+
[`${blockClass}__header-title`]: true,
|
|
247
|
+
[`${blockClass}__header-title--no-content-below`]: !this._hasDescription && !this._hasExtraContent
|
|
248
|
+
});
|
|
218
249
|
const headerContentTemplate = html`
|
|
219
250
|
<div class="${blockClass}__header-content">
|
|
220
251
|
<!-- Label -->
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
252
|
+
${this._hasLabel ? html`
|
|
253
|
+
<div class="${blockClass}__header-label">
|
|
254
|
+
<slot
|
|
255
|
+
name="label"
|
|
256
|
+
@slotchange="${this._handleSlotChange}"
|
|
257
|
+
></slot>
|
|
258
|
+
</div>
|
|
259
|
+
` : html`<slot
|
|
260
|
+
name="label"
|
|
261
|
+
@slotchange="${this._handleSlotChange}"
|
|
262
|
+
></slot>`}
|
|
224
263
|
|
|
225
264
|
<div class="${blockClass}__content__title-wrapper">
|
|
226
|
-
<h2 class="${
|
|
265
|
+
<h2 class="${titleClasses}" id="${this._titleId}">
|
|
227
266
|
<!-- Title Start -->
|
|
228
267
|
${this._hasTitleStart ? html`
|
|
229
268
|
<span class="${blockClass}__title-start">
|
|
@@ -262,14 +301,24 @@ let CDSTearsheetHeaderContent = class CDSTearsheetHeaderContent extends SignalWa
|
|
|
262
301
|
</div>
|
|
263
302
|
|
|
264
303
|
<!-- Description -->
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
304
|
+
${this._hasDescription ? html`
|
|
305
|
+
<div class="${blockClass}__header-description">
|
|
306
|
+
<slot
|
|
307
|
+
name="description"
|
|
308
|
+
@slotchange="${this._handleSlotChange}"
|
|
309
|
+
></slot>
|
|
310
|
+
</div>
|
|
311
|
+
` : html`<slot
|
|
312
|
+
name="description"
|
|
313
|
+
@slotchange="${this._handleSlotChange}"
|
|
314
|
+
></slot>`}
|
|
268
315
|
|
|
269
316
|
<!-- Extra children -->
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
317
|
+
${this._hasExtraContent ? html`
|
|
318
|
+
<div class="${blockClass}__header-content--extra">
|
|
319
|
+
<slot @slotchange="${this._handleSlotChange}"></slot>
|
|
320
|
+
</div>
|
|
321
|
+
` : html`<slot @slotchange="${this._handleSlotChange}"></slot>`}
|
|
273
322
|
</div>
|
|
274
323
|
`;
|
|
275
324
|
return this._isMobileOrNarrow ? html`${decoratorTemplate} ${closeButtonTemplate}
|
|
@@ -285,10 +334,18 @@ __decorate([property({ reflect: true })], CDSTearsheetHeaderContent.prototype, "
|
|
|
285
334
|
__decorate([query("slot[name=\"title-start\"]")], CDSTearsheetHeaderContent.prototype, "_titleStartSlot", void 0);
|
|
286
335
|
__decorate([query("slot[name=\"title-end\"]")], CDSTearsheetHeaderContent.prototype, "_titleEndSlot", void 0);
|
|
287
336
|
__decorate([query("slot[name=\"decorator\"]")], CDSTearsheetHeaderContent.prototype, "_decoratorSlot", void 0);
|
|
337
|
+
__decorate([query("slot[name=\"label\"]")], CDSTearsheetHeaderContent.prototype, "_labelSlot", void 0);
|
|
338
|
+
__decorate([query("slot[name=\"description\"]")], CDSTearsheetHeaderContent.prototype, "_descriptionSlot", void 0);
|
|
339
|
+
__decorate([query("slot[name=\"header-actions\"]")], CDSTearsheetHeaderContent.prototype, "_headerActionsSlot", void 0);
|
|
340
|
+
__decorate([query("slot:not([name])")], CDSTearsheetHeaderContent.prototype, "_defaultSlot", void 0);
|
|
288
341
|
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasTitleStart", void 0);
|
|
289
342
|
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasTitleEnd", void 0);
|
|
290
343
|
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasDecorator", void 0);
|
|
291
344
|
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasAILabel", void 0);
|
|
345
|
+
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasLabel", void 0);
|
|
346
|
+
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasDescription", void 0);
|
|
347
|
+
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasHeaderActions", void 0);
|
|
348
|
+
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_hasExtraContent", void 0);
|
|
292
349
|
__decorate([state()], CDSTearsheetHeaderContent.prototype, "_isMobileOrNarrow", void 0);
|
|
293
350
|
CDSTearsheetHeaderContent = __decorate([carbonElement(`c4p-tearsheet-header-content`)], CDSTearsheetHeaderContent);
|
|
294
351
|
var tearsheet_header_content_default = CDSTearsheetHeaderContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tearsheet-header-content.js","names":["styles","customElement"],"sources":["../../../src/components/tearsheet-preview/tearsheet-header-content.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, LitElement, PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport '@carbon/web-components/es-custom/components/modal/index.js';\nimport '@carbon/web-components/es-custom/components/icon-button/index.js';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport '../truncated-text';\nimport styles from './tearsheet-header-content.scss?lit';\nimport { MatchMediaController } from '../../globals/js/utils/match-media-controller';\nimport { breakpoints } from '@carbon/layout';\nimport { registerFocusableContainers } from '../../utilities/manageFocusTrap/manageFocusTrap';\nimport { tearsheetSignal } from './tearsheet-signal';\nimport { SignalWatcher } from '@lit-labs/signals';\nimport Close20 from '@carbon/icons/es/close/20.js';\nimport { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';\nimport { carbonPrefix } from '../../globals/settings';\n\nconst blockClass = `${prefix}--tearsheet__next`;\n\n/**\n * Tearsheet Header Content component - Contains the title, description, and decorative elements.\n *\n * @element c4p-tearsheet-header-content\n * @slot label - Optional label text above the title\n * @slot title-start - Content before the title (e.g., icons)\n * @slot title-end - Content after the title (e.g., badges, tags)\n * @slot description - Custom description content below the title\n * @slot decorator - AI label or other decorative elements\n */\n@customElement(`${prefix}-tearsheet-header-content`)\nclass CDSTearsheetHeaderContent extends SignalWatcher(\n HostListenerMixin(LitElement)\n) {\n @property({ reflect: true })\n slot = 'header-content';\n\n /**\n * The main title of the tearsheet.\n */\n @property({ reflect: true })\n title: string = '';\n\n /**\n * Internal ID for the title element (auto-generated, used for aria-labelledby on the modal)\n */\n private _titleId: string = `${blockClass}__title-${Math.random().toString(36).substr(2, 9)}`;\n\n /**\n * Public getter for the title ID (used by parent tearsheet for aria-labelledby)\n */\n get titleId(): string {\n return this._titleId;\n }\n\n @query('slot[name=\"title-start\"]')\n private _titleStartSlot?: HTMLSlotElement;\n\n @query('slot[name=\"title-end\"]')\n private _titleEndSlot?: HTMLSlotElement;\n\n @query('slot[name=\"decorator\"]')\n private _decoratorSlot?: HTMLSlotElement;\n\n @state()\n private _hasTitleStart = false;\n\n @state()\n private _hasTitleEnd = false;\n\n @state()\n private _hasDecorator = false;\n\n @state()\n private _hasAILabel = false;\n\n @state()\n private _isMobileOrNarrow = false;\n\n private mdMediaQuery = `(max-width: ${breakpoints.md.width})`;\n private isMobileDevice = new MatchMediaController(\n this,\n this.mdMediaQuery,\n false\n );\n\n private get isNarrowVariant(): boolean {\n const tearsheet = this.closest(`${prefix}-preview-tearsheet`);\n return tearsheet?.getAttribute('variant') === 'narrow';\n }\n\n /**\n * Returns the first focusable element in the header for the focus trap.\n \n * Priority by screen size:\n * Large (desktop): header-actions button → close button → AI label\n * Small (mobile): AI label → close button → header-actions button\n */\n getFirstFocusable(): HTMLElement | null {\n // header-actions: consumer may slot a button directly OR wrap buttons in a div.\n // <cds-custom-button slot=\"header-actions\"> → slotted element IS the button\n // <div slot=\"header-actions\"><cds-custom-button> → button is a child of the slotted div\n const headerActionSlot = this.querySelector<HTMLElement>(\n '[slot=\"header-actions\"]'\n );\n const headerActionBtn = headerActionSlot\n ? headerActionSlot.matches(\n `${carbonPrefix}-button:not([disabled]), button:not([disabled])`\n )\n ? headerActionSlot\n : headerActionSlot.querySelector<HTMLElement>(\n `${carbonPrefix}-button:not([disabled]), button:not([disabled])`\n )\n : null;\n\n // close button: inside this component's own shadow DOM\n const closeBtn = this.shadowRoot?.querySelector<HTMLElement>(\n `.${blockClass}__close-button ${carbonPrefix}-icon-button:not([disabled])`\n );\n\n // AI label: consumer may slot cds-custom-ai-label directly OR wrap it in a div.\n // <cds-custom-ai-label slot=\"decorator\"> → slotted element IS the ai-label\n // <div slot=\"decorator\"><cds-custom-ai-label> → ai-label is a child of the slotted div\n const decoratorSlot = this.querySelector<HTMLElement>('[slot=\"decorator\"]');\n const aiLabel = decoratorSlot\n ? decoratorSlot.matches(`${carbonPrefix}-ai-label`)\n ? decoratorSlot\n : decoratorSlot.querySelector<HTMLElement>(`${carbonPrefix}-ai-label`)\n : null;\n\n return this._isMobileOrNarrow\n ? (aiLabel ?? closeBtn ?? headerActionBtn ?? null)\n : (headerActionBtn ?? closeBtn ?? aiLabel ?? null);\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this._checkSlots();\n this._isMobileOrNarrow =\n this.isMobileDevice?.matches || this.isNarrowVariant;\n\n // Register containers in intentional order:\n // 1. `this` (light DOM) — finds header-action buttons and AI label (slot=\"decorator\")\n // 2. `this.shadowRoot` — finds close button (cds-custom-icon-button) and decorator slot host\n const uniqueId = tearsheetSignal.get().uniqueId;\n if (uniqueId) {\n registerFocusableContainers(this, uniqueId);\n registerFocusableContainers(this.shadowRoot, uniqueId);\n }\n }\n\n protected updated(_changedProperties: PropertyValues): void {\n const previousIsMobileOrNarrow = this._isMobileOrNarrow;\n this._isMobileOrNarrow =\n this.isMobileDevice?.matches || this.isNarrowVariant;\n\n if (this._isMobileOrNarrow !== previousIsMobileOrNarrow) {\n this.requestUpdate();\n }\n\n this._updateDecoratorSize();\n this._updateHeaderOffset();\n this._updateInertState();\n }\n\n /**\n * Applies `inert` to collapsed header regions so they are removed from\n * the tab order and AT tree. CSS alone (opacity:0 / max-block-size:0)\n * does not prevent keyboard focus on hidden elements.\n *\n * Collapsed regions:\n * - Everything in header-content except the title wrapper\n * (description, label, extra slot content, \"Read more\" button)\n * - Header-actions on small/narrow screens\n */\n private _updateInertState(): void {\n const { fullyCollapsed } = tearsheetSignal.get();\n\n // Header-content children except title wrapper\n const headerContent = this.shadowRoot?.querySelector(\n `.${blockClass}__header-content`\n );\n if (headerContent) {\n headerContent\n .querySelectorAll<HTMLElement>(\n `:scope > *:not(.${blockClass}__content__title-wrapper)`\n )\n .forEach((el) => {\n el.toggleAttribute('inert', fullyCollapsed);\n });\n }\n\n // Header-actions: inert on small/narrow when collapsed\n const headerActions = this.shadowRoot?.querySelector<HTMLElement>(\n `.${blockClass}__header-actions`\n );\n if (headerActions) {\n const shouldInert = fullyCollapsed && this._isMobileOrNarrow;\n headerActions.toggleAttribute('inert', shouldInert);\n }\n }\n\n private _checkSlots() {\n if (this._titleStartSlot) {\n const assignedNodes = this._titleStartSlot.assignedElements();\n this._hasTitleStart = assignedNodes.length > 0;\n }\n if (this._titleEndSlot) {\n const assignedNodes = this._titleEndSlot.assignedElements();\n this._hasTitleEnd = assignedNodes.length > 0;\n }\n }\n\n private _handleSlotChange() {\n this._checkSlots();\n }\n\n private _handleDecoratorChange(e: Event) {\n this._hasAILabel = false;\n const childItems = (e.target as HTMLSlotElement).assignedElements();\n this._hasDecorator = childItems.length > 0;\n if (this._hasDecorator) {\n for (const item of childItems) {\n if (item.tagName.toLowerCase() === `${carbonPrefix}-ai-label`) {\n this._hasAILabel = true;\n break;\n }\n }\n // Set decorator size based on collapse state\n const { fullyCollapsed } = tearsheetSignal.get();\n childItems[0].setAttribute('size', fullyCollapsed ? 'xs' : 'sm');\n\n // Update host attributes for CSS targeting\n const host = this.closest(\n `${prefix}-tearsheet-header`\n ) as HTMLElement | null;\n if (host) {\n host.setAttribute(this._hasAILabel ? 'ai-label' : 'decorator', '');\n host.removeAttribute(this._hasAILabel ? 'decorator' : 'ai-label');\n }\n } else {\n const host = this.closest(\n `${prefix}-tearsheet-header`\n ) as HTMLElement | null;\n if (host) {\n host.removeAttribute('decorator');\n host.removeAttribute('ai-label');\n }\n }\n // Update header offset CSS variable\n this._updateHeaderOffset();\n }\n\n private _updateDecoratorSize() {\n const { fullyCollapsed } = tearsheetSignal.get();\n const assigned = this._decoratorSlot?.assignedElements({ flatten: true });\n if (assigned?.length) {\n assigned[0].setAttribute('size', fullyCollapsed ? 'xs' : 'sm');\n }\n }\n\n private _updateHeaderOffset() {\n const { open, isSm } = tearsheetSignal.get();\n if (!open) {\n return;\n }\n // Mirror React: querySelector `.cds-custom--ai-label` and read clientWidth.\n // clientWidth is available synchronously after render (no rAF needed).\n // React: `AILabelWidth + 24 + (isSm ? 8 : 0)`\n const AILabelWidth =\n this.querySelector('[slot=\"decorator\"]')?.clientWidth ?? 0;\n const offset = AILabelWidth + 24 + (isSm ? 8 : 0);\n document.documentElement.style.setProperty(\n '--tearsheet-header-action-offset',\n `${offset}px`\n );\n }\n\n render() {\n const { fullyCollapsed, hideCloseButton, closeIconDescription, onClose } =\n tearsheetSignal.get();\n\n const decoratorTemplate = html`\n <div\n class=\"${blockClass}__decorator\"\n role=\"${this._hasDecorator ? 'complementary' : undefined}\"\n aria-label=\"${this._hasDecorator ? 'Decorator' : undefined}\"\n >\n <slot\n name=\"decorator\"\n @slotchange=${this._handleDecoratorChange}\n ></slot>\n </div>\n `;\n\n const closeButtonTemplate = !hideCloseButton\n ? html`\n <div\n class=\"${blockClass}__close-button ${carbonPrefix}--modal-close-button\"\n >\n <cds-custom-icon-button\n class=\"${carbonPrefix}--modal-close\"\n kind=\"ghost\"\n size=\"${fullyCollapsed ? 'md' : 'lg'}\"\n align=\"left\"\n aria-label=\"${closeIconDescription || 'Close'}\"\n @click=\"${() => {\n onClose?.();\n this.dispatchEvent(\n new CustomEvent(\n `${prefix}-tearsheet-header-close-button-clicked`,\n { bubbles: true, composed: true }\n )\n );\n }}\"\n >\n ${iconLoader(Close20, {\n slot: 'icon',\n class: `${carbonPrefix}--modal-close__icon`,\n })}\n <span slot=\"tooltip-content\"\n >${closeIconDescription || 'Close'}</span\n >\n </cds-custom-icon-button>\n </div>\n `\n : html``;\n\n const headerActionsTemplate = html`\n <div class=\"${blockClass}__header-actions\">\n <slot name=\"header-actions\"></slot>\n </div>\n `;\n\n const headerContentTemplate = html`\n <div class=\"${blockClass}__header-content\">\n <!-- Label -->\n <div class=\"${blockClass}__header-label\">\n <slot name=\"label\"></slot>\n </div>\n\n <div class=\"${blockClass}__content__title-wrapper\">\n <h2 class=\"${blockClass}__header-title\" id=\"${this._titleId}\">\n <!-- Title Start -->\n ${this._hasTitleStart\n ? html`\n <span class=\"${blockClass}__title-start\">\n <slot\n name=\"title-start\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </span>\n `\n : html`<slot\n name=\"title-start\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`}\n\n <!-- Title (main text) — limit to 1 line when collapsed so it fits\n in the reduced-height collapsed bar -->\n <c4p-truncated-text\n class=\"${blockClass}__content__title\"\n id=\"${blockClass}__header-title__truncatedText\"\n value=\"${this.title}\"\n lines=\"${tearsheetSignal.get().fullyCollapsed ? 1 : 2}\"\n ></c4p-truncated-text>\n\n <!-- Title End -->\n ${this._hasTitleEnd\n ? html`\n <span class=\"${blockClass}__title-end\">\n <slot\n name=\"title-end\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </span>\n `\n : html`<slot\n name=\"title-end\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`}\n </h2>\n </div>\n\n <!-- Description -->\n <div class=\"${blockClass}__header-description\">\n <slot name=\"description\"></slot>\n </div>\n\n <!-- Extra children -->\n <div class=\"${blockClass}__header-content--extra\">\n <slot></slot>\n </div>\n </div>\n `;\n\n // DOM order drives tab order:\n // Desktop/Wide: header-actions → decorator → close-button → header-content\n // Mobile/Narrow: decorator → close-button → header-content → header-actions\n //\n // On mobile the decorator and close button are position:absolute (top-right corner),\n // so they are visually first. Placing them first in DOM order aligns tab order with\n // visual order: AI label → close button → content → header-actions.\n return this._isMobileOrNarrow\n ? html`${decoratorTemplate} ${closeButtonTemplate}\n ${headerContentTemplate} ${headerActionsTemplate}`\n : html`${headerActionsTemplate} ${decoratorTemplate}\n ${closeButtonTemplate} ${headerContentTemplate}`;\n }\n\n static styles = styles;\n}\nexport default CDSTearsheetHeaderContent;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAM,aAAa;;;;;;;;;;;AAYnB,IAAA,4BAAA,MACM,kCAAkC,cACtC,kBAAkB,WAAW,CAC9B,CAAC;;;cAEO;eAMS;kBAKW,GAAG,WAAW,UAAU,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,OAAO,GAAG,EAAE;wBAmBjE;sBAGF;uBAGC;qBAGF;2BAGM;sBAEL,eAAe,YAAY,GAAG,MAAM;wBAClC,IAAI,qBAC3B,MACA,KAAK,cACL,MACD;;;;;CAjCD,IAAI,UAAkB;AACpB,SAAO,KAAK;;CAkCd,IAAY,kBAA2B;AAErC,SADkB,KAAK,QAAQ,wBACf,EAAE,aAAa,UAAU,KAAK;;;;;;;;;CAUhD,oBAAwC;EAItC,MAAM,mBAAmB,KAAK,cAC5B,4BACD;EACD,MAAM,kBAAkB,mBACpB,iBAAiB,QACf,qDACD,GACC,mBACA,iBAAiB,cACf,qDACD,GACH;EAGJ,MAAM,WAAW,KAAK,YAAY,cAChC,IAAI,WAAW,gDAChB;EAKD,MAAM,gBAAgB,KAAK,cAA2B,uBAAqB;EAC3E,MAAM,UAAU,gBACZ,cAAc,QAAQ,eAA2B,GAC/C,gBACA,cAAc,cAA2B,eAA2B,GACtE;AAEJ,SAAO,KAAK,oBACP,WAAW,YAAY,mBAAmB,OAC1C,mBAAmB,YAAY,WAAW;;CAGjD,aAAuB,oBAA0C;AAC/D,OAAK,aAAa;AAClB,OAAK,oBACH,KAAK,gBAAgB,WAAW,KAAK;EAKvC,MAAM,WAAW,gBAAgB,KAAK,CAAC;AACvC,MAAI,UAAU;AACZ,+BAA4B,MAAM,SAAS;AAC3C,+BAA4B,KAAK,YAAY,SAAS;;;CAI1D,Q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AA,WAAA,qBAAA,KAAA,EAAA;wCA9CTC,cAAc,+BAAqC,CAAA,EAAA,0BAAA;AA6XpD,IAAA,mCAAe"}
|
|
1
|
+
{"version":3,"file":"tearsheet-header-content.js","names":["styles","customElement"],"sources":["../../../src/components/tearsheet-preview/tearsheet-header-content.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, LitElement, PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { prefix } from '../../globals/settings';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport '@carbon/web-components/es-custom/components/modal/index.js';\nimport '@carbon/web-components/es-custom/components/icon-button/index.js';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport '../truncated-text';\nimport styles from './tearsheet-header-content.scss?lit';\nimport { MatchMediaController } from '../../globals/js/utils/match-media-controller';\nimport { breakpoints } from '@carbon/layout';\nimport { registerFocusableContainers } from '../../utilities/manageFocusTrap/manageFocusTrap';\nimport { tearsheetSignal } from './tearsheet-signal';\nimport { SignalWatcher } from '@lit-labs/signals';\nimport Close20 from '@carbon/icons/es/close/20.js';\nimport { iconLoader } from '@carbon/web-components/es/globals/internal/icon-loader.js';\nimport { carbonPrefix } from '../../globals/settings';\n\nconst blockClass = `${prefix}--tearsheet__next`;\n\n/**\n * Tearsheet Header Content component - Contains the title, description, and decorative elements.\n *\n * @element c4p-tearsheet-header-content\n * @slot label - Optional label text above the title\n * @slot title-start - Content before the title (e.g., icons)\n * @slot title-end - Content after the title (e.g., badges, tags)\n * @slot description - Custom description content below the title\n * @slot decorator - AI label or other decorative elements\n */\n@customElement(`${prefix}-tearsheet-header-content`)\nclass CDSTearsheetHeaderContent extends SignalWatcher(\n HostListenerMixin(LitElement)\n) {\n @property({ reflect: true })\n slot = 'header-content';\n\n /**\n * The main title of the tearsheet.\n */\n @property({ reflect: true })\n title: string = '';\n\n /**\n * Internal ID for the title element (auto-generated, used for aria-labelledby on the modal)\n */\n private _titleId: string = `${blockClass}__title-${Math.random().toString(36).substr(2, 9)}`;\n\n /**\n * Public getter for the title ID (used by parent tearsheet for aria-labelledby)\n */\n get titleId(): string {\n return this._titleId;\n }\n\n @query('slot[name=\"title-start\"]')\n private _titleStartSlot?: HTMLSlotElement;\n\n @query('slot[name=\"title-end\"]')\n private _titleEndSlot?: HTMLSlotElement;\n\n @query('slot[name=\"decorator\"]')\n private _decoratorSlot?: HTMLSlotElement;\n\n @query('slot[name=\"label\"]')\n private _labelSlot?: HTMLSlotElement;\n\n @query('slot[name=\"description\"]')\n private _descriptionSlot?: HTMLSlotElement;\n\n @query('slot[name=\"header-actions\"]')\n private _headerActionsSlot?: HTMLSlotElement;\n\n @query('slot:not([name])')\n private _defaultSlot?: HTMLSlotElement;\n\n @state()\n private _hasTitleStart = false;\n\n @state()\n private _hasTitleEnd = false;\n\n @state()\n private _hasDecorator = false;\n\n @state()\n private _hasAILabel = false;\n\n @state()\n private _hasLabel = false;\n\n @state()\n private _hasDescription = false;\n\n @state()\n private _hasHeaderActions = false;\n\n @state()\n private _hasExtraContent = false;\n\n @state()\n private _isMobileOrNarrow = false;\n\n private mdMediaQuery = `(max-width: ${breakpoints.md.width})`;\n private isMobileDevice = new MatchMediaController(\n this,\n this.mdMediaQuery,\n false\n );\n\n private get isNarrowVariant(): boolean {\n const tearsheet = this.closest(`${prefix}-preview-tearsheet`);\n return tearsheet?.getAttribute('variant') === 'narrow';\n }\n\n /**\n * Returns the first focusable element in the header for the focus trap.\n \n * Priority by screen size:\n * Large (desktop): header-actions button → close button → AI label\n * Small (mobile): AI label → close button → header-actions button\n */\n getFirstFocusable(): HTMLElement | null {\n // header-actions: consumer may slot a button directly OR wrap buttons in a div.\n // <cds-custom-button slot=\"header-actions\"> → slotted element IS the button\n // <div slot=\"header-actions\"><cds-custom-button> → button is a child of the slotted div\n const headerActionSlot = this.querySelector<HTMLElement>(\n '[slot=\"header-actions\"]'\n );\n const headerActionBtn = headerActionSlot\n ? headerActionSlot.matches(\n `${carbonPrefix}-button:not([disabled]), button:not([disabled])`\n )\n ? headerActionSlot\n : headerActionSlot.querySelector<HTMLElement>(\n `${carbonPrefix}-button:not([disabled]), button:not([disabled])`\n )\n : null;\n\n // close button: inside this component's own shadow DOM\n const closeBtn = this.shadowRoot?.querySelector<HTMLElement>(\n `.${blockClass}__close-button ${carbonPrefix}-icon-button:not([disabled])`\n );\n\n // AI label: consumer may slot cds-custom-ai-label directly OR wrap it in a div.\n // <cds-custom-ai-label slot=\"decorator\"> → slotted element IS the ai-label\n // <div slot=\"decorator\"><cds-custom-ai-label> → ai-label is a child of the slotted div\n const decoratorSlot = this.querySelector<HTMLElement>('[slot=\"decorator\"]');\n const aiLabel = decoratorSlot\n ? decoratorSlot.matches(`${carbonPrefix}-ai-label`)\n ? decoratorSlot\n : decoratorSlot.querySelector<HTMLElement>(`${carbonPrefix}-ai-label`)\n : null;\n\n return this._isMobileOrNarrow\n ? (aiLabel ?? closeBtn ?? headerActionBtn ?? null)\n : (headerActionBtn ?? closeBtn ?? aiLabel ?? null);\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this._checkSlots();\n this._isMobileOrNarrow =\n this.isMobileDevice?.matches || this.isNarrowVariant;\n\n // Register containers in intentional order:\n // 1. `this` (light DOM) — finds header-action buttons and AI label (slot=\"decorator\")\n // 2. `this.shadowRoot` — finds close button (cds-custom-icon-button) and decorator slot host\n const uniqueId = tearsheetSignal.get().uniqueId;\n if (uniqueId) {\n registerFocusableContainers(this, uniqueId);\n registerFocusableContainers(this.shadowRoot, uniqueId);\n }\n }\n\n protected updated(_changedProperties: PropertyValues): void {\n const previousIsMobileOrNarrow = this._isMobileOrNarrow;\n this._isMobileOrNarrow =\n this.isMobileDevice?.matches || this.isNarrowVariant;\n\n if (this._isMobileOrNarrow !== previousIsMobileOrNarrow) {\n this.requestUpdate();\n }\n\n this._updateDecoratorSize();\n this._updateHeaderOffset();\n this._updateInertState();\n }\n\n /**\n * Applies `inert` to collapsed header regions so they are removed from\n * the tab order and AT tree. CSS alone (opacity:0 / max-block-size:0)\n * does not prevent keyboard focus on hidden elements.\n *\n * Collapsed regions:\n * - Everything in header-content except the title wrapper\n * (description, label, extra slot content, \"Read more\" button)\n * - Header-actions on small/narrow screens\n */\n private _updateInertState(): void {\n const { fullyCollapsed } = tearsheetSignal.get();\n\n // Header-content children except title wrapper\n const headerContent = this.shadowRoot?.querySelector(\n `.${blockClass}__header-content`\n );\n if (headerContent) {\n headerContent\n .querySelectorAll<HTMLElement>(\n `:scope > *:not(.${blockClass}__content__title-wrapper)`\n )\n .forEach((el) => {\n el.toggleAttribute('inert', fullyCollapsed);\n });\n }\n\n // Header-actions: inert on small/narrow when collapsed\n const headerActions = this.shadowRoot?.querySelector<HTMLElement>(\n `.${blockClass}__header-actions`\n );\n if (headerActions) {\n const shouldInert = fullyCollapsed && this._isMobileOrNarrow;\n headerActions.toggleAttribute('inert', shouldInert);\n }\n }\n\n private _checkSlots() {\n if (this._titleStartSlot) {\n const assignedNodes = this._titleStartSlot.assignedElements();\n this._hasTitleStart = assignedNodes.length > 0;\n }\n if (this._titleEndSlot) {\n const assignedNodes = this._titleEndSlot.assignedElements();\n this._hasTitleEnd = assignedNodes.length > 0;\n }\n if (this._labelSlot) {\n const assignedNodes = this._labelSlot.assignedElements();\n this._hasLabel = assignedNodes.length > 0;\n }\n if (this._descriptionSlot) {\n const assignedNodes = this._descriptionSlot.assignedElements();\n this._hasDescription = assignedNodes.length > 0;\n }\n if (this._headerActionsSlot) {\n const assignedNodes = this._headerActionsSlot.assignedElements();\n this._hasHeaderActions = assignedNodes.length > 0;\n }\n if (this._defaultSlot) {\n const assignedNodes = this._defaultSlot.assignedElements();\n this._hasExtraContent = assignedNodes.length > 0;\n }\n }\n\n private _handleSlotChange() {\n this._checkSlots();\n }\n\n private _handleDecoratorChange(e: Event) {\n this._hasAILabel = false;\n const childItems = (e.target as HTMLSlotElement).assignedElements();\n this._hasDecorator = childItems.length > 0;\n if (this._hasDecorator) {\n for (const item of childItems) {\n if (item.tagName.toLowerCase() === `${carbonPrefix}-ai-label`) {\n this._hasAILabel = true;\n break;\n }\n }\n // Set decorator size based on collapse state\n const { fullyCollapsed } = tearsheetSignal.get();\n childItems[0].setAttribute('size', fullyCollapsed ? 'xs' : 'sm');\n\n // Update host attributes for CSS targeting\n const host = this.closest(\n `${prefix}-tearsheet-header`\n ) as HTMLElement | null;\n if (host) {\n host.setAttribute(this._hasAILabel ? 'ai-label' : 'decorator', '');\n host.removeAttribute(this._hasAILabel ? 'decorator' : 'ai-label');\n }\n } else {\n const host = this.closest(\n `${prefix}-tearsheet-header`\n ) as HTMLElement | null;\n if (host) {\n host.removeAttribute('decorator');\n host.removeAttribute('ai-label');\n }\n }\n // Update header offset CSS variable\n this._updateHeaderOffset();\n }\n\n private _updateDecoratorSize() {\n const { fullyCollapsed } = tearsheetSignal.get();\n const assigned = this._decoratorSlot?.assignedElements({ flatten: true });\n if (assigned?.length) {\n assigned[0].setAttribute('size', fullyCollapsed ? 'xs' : 'sm');\n }\n }\n\n private _updateHeaderOffset() {\n const { open, isSm } = tearsheetSignal.get();\n if (!open) {\n return;\n }\n // Mirror React: querySelector `.cds-custom--ai-label` and read clientWidth.\n // clientWidth is available synchronously after render (no rAF needed).\n // React: `AILabelWidth + 24 + (isSm ? 8 : 0)`\n const AILabelWidth =\n this.querySelector('[slot=\"decorator\"]')?.clientWidth ?? 0;\n const offset = AILabelWidth + 24 + (isSm ? 8 : 0);\n document.documentElement.style.setProperty(\n '--tearsheet-header-action-offset',\n `${offset}px`\n );\n }\n\n render() {\n const { fullyCollapsed, hideCloseButton, closeIconDescription, onClose } =\n tearsheetSignal.get();\n\n const decoratorTemplate = html`\n <div\n class=\"${blockClass}__decorator\"\n role=\"${this._hasDecorator ? 'complementary' : undefined}\"\n aria-label=\"${this._hasDecorator ? 'Decorator' : undefined}\"\n >\n <slot\n name=\"decorator\"\n @slotchange=${this._handleDecoratorChange}\n ></slot>\n </div>\n `;\n\n const closeButtonTemplate = !hideCloseButton\n ? html`\n <div\n class=\"${blockClass}__close-button ${carbonPrefix}--modal-close-button\"\n >\n <cds-custom-icon-button\n class=\"${carbonPrefix}--modal-close\"\n kind=\"ghost\"\n size=\"${fullyCollapsed ? 'md' : 'lg'}\"\n align=\"left\"\n aria-label=\"${closeIconDescription || 'Close'}\"\n @click=\"${() => {\n onClose?.();\n this.dispatchEvent(\n new CustomEvent(\n `${prefix}-tearsheet-header-close-button-clicked`,\n { bubbles: true, composed: true }\n )\n );\n }}\"\n >\n ${iconLoader(Close20, {\n slot: 'icon',\n class: `${carbonPrefix}--modal-close__icon`,\n })}\n <span slot=\"tooltip-content\"\n >${closeIconDescription || 'Close'}</span\n >\n </cds-custom-icon-button>\n </div>\n `\n : html``;\n\n const headerActionsTemplate = this._hasHeaderActions\n ? html`\n <div class=\"${blockClass}__header-actions\">\n <slot\n name=\"header-actions\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </div>\n `\n : html`<slot\n name=\"header-actions\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`;\n\n const titleClasses = classMap({\n [`${blockClass}__header-title`]: true,\n [`${blockClass}__header-title--no-content-below`]:\n !this._hasDescription && !this._hasExtraContent,\n });\n\n const headerContentTemplate = html`\n <div class=\"${blockClass}__header-content\">\n <!-- Label -->\n ${this._hasLabel\n ? html`\n <div class=\"${blockClass}__header-label\">\n <slot\n name=\"label\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </div>\n `\n : html`<slot\n name=\"label\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`}\n\n <div class=\"${blockClass}__content__title-wrapper\">\n <h2 class=\"${titleClasses}\" id=\"${this._titleId}\">\n <!-- Title Start -->\n ${this._hasTitleStart\n ? html`\n <span class=\"${blockClass}__title-start\">\n <slot\n name=\"title-start\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </span>\n `\n : html`<slot\n name=\"title-start\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`}\n\n <!-- Title (main text) — limit to 1 line when collapsed so it fits\n in the reduced-height collapsed bar -->\n <c4p-truncated-text\n class=\"${blockClass}__content__title\"\n id=\"${blockClass}__header-title__truncatedText\"\n value=\"${this.title}\"\n lines=\"${tearsheetSignal.get().fullyCollapsed ? 1 : 2}\"\n ></c4p-truncated-text>\n\n <!-- Title End -->\n ${this._hasTitleEnd\n ? html`\n <span class=\"${blockClass}__title-end\">\n <slot\n name=\"title-end\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </span>\n `\n : html`<slot\n name=\"title-end\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`}\n </h2>\n </div>\n\n <!-- Description -->\n ${this._hasDescription\n ? html`\n <div class=\"${blockClass}__header-description\">\n <slot\n name=\"description\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>\n </div>\n `\n : html`<slot\n name=\"description\"\n @slotchange=\"${this._handleSlotChange}\"\n ></slot>`}\n\n <!-- Extra children -->\n ${this._hasExtraContent\n ? html`\n <div class=\"${blockClass}__header-content--extra\">\n <slot @slotchange=\"${this._handleSlotChange}\"></slot>\n </div>\n `\n : html`<slot @slotchange=\"${this._handleSlotChange}\"></slot>`}\n </div>\n `;\n\n // DOM order drives tab order:\n // Desktop/Wide: header-actions → decorator → close-button → header-content\n // Mobile/Narrow: decorator → close-button → header-content → header-actions\n //\n // On mobile the decorator and close button are position:absolute (top-right corner),\n // so they are visually first. Placing them first in DOM order aligns tab order with\n // visual order: AI label → close button → content → header-actions.\n return this._isMobileOrNarrow\n ? html`${decoratorTemplate} ${closeButtonTemplate}\n ${headerContentTemplate} ${headerActionsTemplate}`\n : html`${headerActionsTemplate} ${decoratorTemplate}\n ${closeButtonTemplate} ${headerContentTemplate}`;\n }\n\n static styles = styles;\n}\n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,oBAAA,KAAA,EAAA;YAGP,OAAO,CAAA,EAAA,0BAAA,WAAA,qBAAA,KAAA,EAAA;wCAtETC,cAAc,+BAAqC,CAAA,EAAA,0BAAA;AA2cpD,IAAA,mCAAe"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from "lit";
|
|
9
9
|
//#region src/components/tearsheet-preview/tearsheet-header-content.scss?lit
|
|
10
|
-
var tearsheet_header_content_default = css(["@keyframes cds-custom--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds-custom--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds-custom--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}.cds-custom--assistive-text,.cds-custom--visually-hidden{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted){animation:c4p--tearsheet__next--presence-tearsheet__enter .24s cubic-bezier(0,0,.3,1);opacity:1}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted){animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__enter .24s cubic-bezier(0,0,.3,1);transform:translateZ(0)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next--stacked.is-visible .c4p--tearsheet__next__container{transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting]{animation:c4p--tearsheet__next--presence-tearsheet__exit .24s cubic-bezier(.4,.14,1,1) forwards}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting]{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__exit .24s cubic-bezier(0,0,.3,1) forwards}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next--keep-mounted:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}@keyframes c4p--tearsheet__next--presence-tearsheet__enter{0%{opacity:0;transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet__exit{to{opacity:0}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__enter{0%{transform:translate3d(0,min(95vh,500px),0);transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__exit{to{transform:translate3d(0,min(95vh,500px),0)}}.c4p--tearsheet__next .c4p--tearsheet__next__container{align-self:flex-end;block-size:100%;border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem)));max-inline-size:var(--tearsheet-max-inline-size,1312px)}@media (max-width:41.98rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--stack-activated.is-visible) .c4p--tearsheet__next__container{max-block-size:none}}.c4p--tearsheet__next:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__container{background:linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,#78a9ff),var(--cds-custom-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) border-box;border:1px solid transparent;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-custom-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__main-content{background:linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)) 0,var(--cds-custom-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-custom-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,rgba(166,200,255,.64)),var(--cds-custom-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-custom-ai-inner-shadow,rgba(69,137,255,.1));position:relative}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header{align-content:space-between;border-block-end:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);display:flex;flex-wrap:wrap;margin-block:0;max-block-size:50vh;padding-block-end:0;padding-block-start:1.5rem;padding-inline:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header>*{flex-basis:100%}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button){margin-block-end:1.5rem}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header{padding-inline:1rem}}.c4p--tearsheet__next .cds-custom--modal-container--sm .cds-custom--modal-header{padding-inline-end:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:grid;flex-basis:unset;gap:1rem;grid-template-columns:minmax(auto,40rem) minmax(var(--tearsheet-header-title-grid-width,0),1fr);inline-size:calc(100% - var(--tearsheet-header-action-offset))}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}}@media (min-width:42rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-actions{order:2}.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content{order:1}}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse){max-block-size:50vh;opacity:1;overflow:hidden;transition:max-block-size .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse){transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){opacity:1;transition:all .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){transition:none}}.c4p--tearsheet__next .cds-custom--modal-close{transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .cds-custom--modal-close{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{padding-block-start:0;transition:padding .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse) *{margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1);visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse) *{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{align-items:center;font-size:var(--cds-custom-label-02-font-size,.875rem);font-weight:var(--cds-custom-label-02-font-weight,400);gap:.5rem;letter-spacing:var(--cds-custom-label-02-letter-spacing,.16px);line-height:var(--cds-custom-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title>span{align-items:center;block-size:1.5rem;display:flex}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end svg,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-start svg{inline-size:1rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:center;margin-block-end:0}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:stretch}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .cds-custom--modal-close{block-size:2.5rem;inline-size:2.5rem;transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .cds-custom--modal-close{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__decorator{inset-block-start:.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{block-size:2.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{block-size:1.5rem;margin-block-start:.5rem;transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{transition:none}}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{margin-block:0;transition:margin-block .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper{min-block-size:2.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__navigation-bar:before{background:var(--cds-custom-border-subtle-01,#c6c6c6);block-size:1px;content:\"\";inline-size:calc(100% + 5rem);inset-block-start:0;inset-inline-start:-2rem;pointer-events:none;position:absolute;z-index:1}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible{--overlay-color:var(--cds-custom-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5;background-color:initial;z-index:calc(9000 - var(--stack-depth, 0))}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);position:absolute;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1)}@media (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{transition:none}}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible.is-visible .c4p--tearsheet__next__container{max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next__header-label{color:var(--cds-custom-text-secondary,#525252);font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333);margin-block-end:.25rem}.c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-04-font-size,1.75rem);font-weight:var(--cds-custom-heading-04-font-weight,400);letter-spacing:var(--cds-custom-heading-04-letter-spacing,0);line-height:var(--cds-custom-heading-04-line-height,1.28572)}@media (max-width:41.98rem){.c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}}.c4p--tearsheet__next__header-title{align-items:flex-start;display:flex;gap:1rem;margin-block-end:.5rem}.c4p--tearsheet__next__header-title--no-content-below{margin-block-end:0}.c4p--tearsheet__next__header-title svg{flex-shrink:0}.c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end{margin-inline-start:1rem}.c4p--tearsheet__next__header-description{font-size:var(--cds-custom-body-compact-01-font-size,.875rem);font-weight:var(--cds-custom-body-compact-01-font-weight,400);letter-spacing:var(--cds-custom-body-compact-01-letter-spacing,.16px);line-height:var(--cds-custom-body-compact-01-line-height,1.28572)}.c4p--tearsheet__next__header--no-close-icon{display:none}.c4p--tearsheet__next__navigation-bar{align-items:center;display:flex;gap:.125rem;justify-content:space-between;max-inline-size:calc(100% - .75rem);min-block-size:2.5rem;position:relative}.c4p--tearsheet__next__navigation-bar .cds-custom--tabs{margin-inline-start:-1rem}.c4p--tearsheet__next__scroller-container{inset-block-end:0;inset-inline-end:-2.5rem;position:absolute}@media (max-width:41.98rem){.c4p--tearsheet__next__scroller-container{inset-inline-end:-1.5rem}}.c4p--tearsheet__next__scroller-container .c4p--tearsheet__next__scroller-button-icon-collapsed{transform:rotate(-180deg)}.c4p--tearsheet__next__content__header-actions{align-items:center;block-size:2rem;display:flex;flex:0 0 auto;inline-size:100%;justify-content:flex-end;margin-block-start:-14px;overflow:hidden}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]){margin-inline-end:.5rem}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]):nth-last-child(2){margin-inline-end:0}.c4p--tearsheet__next__content__header-actions>*{flex-shrink:0}@media (max-width:41.98rem){.c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}}.c4p--tearsheet__next__header-actions,.c4p--tearsheet__next__header-content{margin-block-end:1.5rem}@media (min-width:42rem){.c4p--tearsheet__next--wide .c4p--tearsheet__next__container{inline-size:calc(100% - 8rem)}}.c4p--tearsheet__next__body-layout{display:grid;grid-template-areas:\"influencer body\" \"influencer footer\";grid-template-columns:var(--tearsheet-influencer-width,16rem) 1fr;grid-template-rows:1fr auto;padding-block:0;padding-inline-end:0}.c4p--tearsheet__next__body-layout:not(.c4p--tearsheet__next__body-layout--has-influencer){grid-template-areas:\"body\" \"footer\";grid-template-columns:1fr}.c4p--tearsheet__next__influencer,:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){border-inline-end:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);grid-area:influencer}.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){display:grid;grid-area:body;grid-template-columns:1fr var(--tearsheet-summary-content-width,16rem);overflow:hidden;position:relative}@media (max-width:41.98rem){.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}}.c4p--tearsheet__next__body>:only-child,:host(c4p-preview-tearsheet) ::slotted([slot=body])>:only-child{grid-column:1/-1}.c4p--tearsheet__next__body .cds-custom--tab-content,:host(c4p-preview-tearsheet) ::slotted([slot=body]) .cds-custom--tab-content{padding:0}.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){border-block-start:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);grid-area:footer;overflow:hidden}@media (max-width:19.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}@media (max-width:41.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}.c4p--tearsheet__next__influencer,.c4p--tearsheet__next__main-content,.c4p--tearsheet__next__summary-content,:host ::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){overflow:auto}.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:2rem}@media (max-width:41.98rem){.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}}.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline:2px solid var(--cds-custom-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline-style:dotted}}.c4p--tearsheet__next__main-content{background-color:var(--cds-custom-background,#fff)}.c4p--tearsheet__next__side-panel,:host c4p-side-panel::part(dialog){block-size:100%;inline-size:100%!important;inset-block-start:0;max-inline-size:none;position:absolute;z-index:9999}.c4p--tearsheet__next__side-panel .c4p--side-panel__header,:host c4p-side-panel::part(dialog) .c4p--side-panel__header{min-block-size:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__container{inline-size:480px;max-inline-size:480px}@media (width <= 480px){.c4p--tearsheet__next--narrow .c4p--tearsheet__next__container{inline-size:100%;max-inline-size:100%}}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header{padding-inline:1rem}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:flex-start}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=body]){grid-template-columns:1fr 0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}.c4p--tearsheet__next--has-ai-label::part(dialog){background:linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,#78a9ff),var(--cds-custom-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) border-box;border:1px solid transparent!important;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-custom-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next__main-content{position:relative}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__flush{padding-inline:0}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--no-summary{grid-column:1/-1}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--has-ai-label{background:linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)) 0,var(--cds-custom-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-custom-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,rgba(166,200,255,.64)),var(--cds-custom-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-custom-ai-inner-shadow,rgba(69,137,255,.1))}:host ::slotted([slot=summary-content]:focus){outline:2px solid var(--cds-custom-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){:host ::slotted([slot=summary-content]:focus){outline-style:dotted}}:host ::slotted([slot=summary-content][is-flush]){padding-inline:0}@media screen and (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:none}}:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}:host(c4p-preview-tearsheet) ::slotted([slot=influencer][is-flush]){padding-inline:0}:host(c4p-preview-tearsheet[open]) ::part(dialog){transform:translateZ(0);transition:transform .24s cubic-bezier(0,0,.3,1)}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet[open]) ::part(dialog){transition:none}}@media screen and (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet:not([open])) cds-custom-modal{transition:none}}@media (max-width:41.98rem){:host(:not(.c4p--tearsheet__next--stack-activated.is-visible)) ::part(dialog){max-block-size:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible){--overlay-color:var(--cds-custom-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);pointer-events:none;position:fixed;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1);z-index:calc(9000 - var(--stack-depth, 0))}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{transition:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) cds-custom-modal{background-color:transparent}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) ::part(dialog){max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}:host(c4p-preview-tearsheet[variant=narrow]) ::part(dialog){inline-size:480px;max-inline-size:480px}@media (width <= 480px){:host(c4p-preview-tearsheet[variant=narrow]) ::part(dialog){inline-size:100%;max-inline-size:100%}}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header{padding-inline:1rem}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet[variant=narrow]):host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0!important}@media (max-width:41.98rem){:host(c4p-preview-tearsheet) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet) ::slotted([slot=summary-content]){padding:0!important}}:host-context(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0}:host ::slotted([slot=footer]){padding-block:0}:host-context(c4p-preview-tearsheet[variant=narrow]){display:flex;flex-direction:column}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-actions{justify-content:flex-start;margin-inline-end:0}:host-context(c4p-preview-tearsheet[variant=narrow]):host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{display:none}:host-context(c4p-preview-tearsheet[variant=narrow]):host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content{align-self:flex-start}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__title-start{align-items:center}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__title-start ::slotted(*){block-size:1.5rem;inline-size:1.5rem}:host{display:grid;flex-basis:unset;gap:1rem;grid-template-columns:minmax(auto,40rem) minmax(var(--tearsheet-header-title-grid-width,0),1fr);inline-size:100%}@media (max-width:41.98rem){:host{display:flex;flex-direction:column}:host .c4p--tearsheet__next__header-actions{justify-content:flex-start;margin-inline-end:0}}.c4p--tearsheet__next__decorator{inset-block-start:.625rem;inset-inline-end:3rem;position:absolute;transition:inset-block-start .24s cubic-bezier(0,0,.3,1);z-index:1}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next__decorator{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__decorator{inset-block-start:.5rem}.c4p--tearsheet__next__close-button{inset-block-start:0;inset-inline-end:0;position:absolute;z-index:1}.c4p--tearsheet__next__close-button .cds-custom--modal-close{transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next__close-button .cds-custom--modal-close{transition:none}}.c4p--tearsheet__next__header-actions{display:flex;justify-content:flex-end;margin-block-start:-14px;order:2}@media (max-width:41.98rem){.c4p--tearsheet__next__header-actions{order:0}}.c4p--tearsheet__next__header-content{order:1}@media (max-width:41.98rem){.c4p--tearsheet__next__header-content{order:0}}:host .c4p--tearsheet__next__header-actions,:host .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){opacity:1;transition:all .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host .c4p--tearsheet__next__header-actions,:host .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions){margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions){transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper){margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper){transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *{margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{align-items:center;block-size:2.5rem;font-size:var(--cds-custom-label-02-font-size,.875rem);font-weight:var(--cds-custom-label-02-font-weight,400);gap:.5rem;letter-spacing:var(--cds-custom-label-02-letter-spacing,.16px);line-height:var(--cds-custom-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title>span{align-items:center;block-size:1.5rem;display:flex}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content{align-self:center;margin-block-end:0}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__content__title-wrapper,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{margin-block:0;transition:margin-block .24s ease}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__content__title-wrapper,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{transition:none}}@media (max-width:41.98rem){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{display:none}}@media (min-width:42rem){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{align-items:center;display:flex;margin-block:0;transition:margin-block .24s ease}}@media screen and (min-width:42rem) and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__title-start{align-items:center;display:inline-flex}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__title-start ::slotted(*){block-size:1rem;inline-size:1rem}.c4p--tearsheet__next__title-start ::slotted(*){transition:all .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next__title-start ::slotted(*){transition:none}}:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-actions,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content *{opacity:0;transition:opacity .1s ease-out}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-actions,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content *{transition:none}}"]);
|
|
10
|
+
var tearsheet_header_content_default = css(["@keyframes cds-custom--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds-custom--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds-custom--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}.cds-custom--assistive-text,.cds-custom--visually-hidden{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted){animation:c4p--tearsheet__next--presence-tearsheet__enter .24s cubic-bezier(0,0,.3,1);opacity:1}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted){animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__enter .24s cubic-bezier(0,0,.3,1);transform:translateZ(0)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted).c4p--tearsheet__next--stacked.is-visible .c4p--tearsheet__next__container{transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting]{animation:c4p--tearsheet__next--presence-tearsheet__exit .24s cubic-bezier(.4,.14,1,1) forwards}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting]{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:c4p--tearsheet__next--presence-tearsheet--container__exit .24s cubic-bezier(0,0,.3,1) forwards}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next:not(.c4p--tearsheet__next--keep-mounted)[data-tearsheet-exiting].c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{animation:none}}.c4p--tearsheet__next.c4p--tearsheet__next--keep-mounted:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}@keyframes c4p--tearsheet__next--presence-tearsheet__enter{0%{opacity:0;transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet__exit{to{opacity:0}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__enter{0%{transform:translate3d(0,min(95vh,500px),0);transition:none}}@keyframes c4p--tearsheet__next--presence-tearsheet--container__exit{to{transform:translate3d(0,min(95vh,500px),0)}}.c4p--tearsheet__next .c4p--tearsheet__next__container{align-self:flex-end;block-size:100%;border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem)));max-inline-size:var(--tearsheet-max-inline-size,1312px)}@media (max-width:41.98rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--stack-activated.is-visible) .c4p--tearsheet__next__container{max-block-size:none}}.c4p--tearsheet__next:not(.is-visible).c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transform:translate3d(0,min(95vh,500px),0)}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__container{background:linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,#78a9ff),var(--cds-custom-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) border-box;border:1px solid transparent;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-custom-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next--has-ai-label .c4p--tearsheet__next__main-content{background:linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)) 0,var(--cds-custom-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-custom-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,rgba(166,200,255,.64)),var(--cds-custom-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-custom-ai-inner-shadow,rgba(69,137,255,.1));position:relative}.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next.c4p--tearsheet__next .c4p--tearsheet__next__container{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header{align-content:space-between;border-block-end:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);display:flex;flex-wrap:wrap;margin-block:0;max-block-size:50vh;padding-block-end:0;padding-block-start:1.5rem;padding-inline:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header>*{flex-basis:100%}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button){margin-block-end:1.5rem}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header{padding-inline:1rem}}.c4p--tearsheet__next .cds-custom--modal-container--sm .cds-custom--modal-header{padding-inline-end:2rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:grid;flex-basis:unset;gap:1rem;grid-template-columns:minmax(auto,40rem) minmax(var(--tearsheet-header-title-grid-width,0),1fr);inline-size:calc(100% - var(--tearsheet-header-action-offset))}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}}@media (min-width:42rem){.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-actions{order:2}.c4p--tearsheet__next:not(.c4p--tearsheet__next--narrow) .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content{order:1}}.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse){max-block-size:50vh;opacity:1;overflow:hidden;transition:max-block-size .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse){transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){opacity:1;transition:all .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){transition:none}}.c4p--tearsheet__next .cds-custom--modal-close{transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .cds-custom--modal-close{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{padding-block-start:0;transition:padding .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse) *{margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1);visibility:hidden}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse),.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed>:not(.c4p--tearsheet__next__navigation-bar,.c4p--tearsheet__next__header-content-wrapper,.cds-custom--modal-close-button,.c4p--tearsheet__next__close-button,.c4p--tearsheet__next__decorator,.excludeFromCollapse) *{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{align-items:center;font-size:var(--cds-custom-label-02-font-size,.875rem);font-weight:var(--cds-custom-label-02-font-weight,400);gap:.5rem;letter-spacing:var(--cds-custom-label-02-letter-spacing,.16px);line-height:var(--cds-custom-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title>span{align-items:center;block-size:1.5rem;display:flex}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end svg,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-start svg{inline-size:1rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:center;margin-block-end:0}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:stretch}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .cds-custom--modal-close{block-size:2.5rem;inline-size:2.5rem;transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .cds-custom--modal-close{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__decorator{inset-block-start:.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{block-size:2.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{block-size:1.5rem;margin-block-start:.5rem;transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{transition:none}}@media (max-width:41.98rem){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{margin-block:0;transition:margin-block .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper,.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{transition:none}}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper{min-block-size:2.5rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__navigation-bar:before{background:var(--cds-custom-border-subtle-01,#c6c6c6);block-size:1px;content:\"\";inline-size:calc(100% + 5rem);inset-block-start:0;inset-inline-start:-2rem;pointer-events:none;position:absolute;z-index:1}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible{--overlay-color:var(--cds-custom-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5;background-color:initial;z-index:calc(9000 - var(--stack-depth, 0))}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);position:absolute;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1)}@media (prefers-reduced-motion:reduce){.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible:before{transition:none}}.c4p--tearsheet__next.c4p--tearsheet__next--stack-activated.is-visible.is-visible .c4p--tearsheet__next__container{max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next__header-label{color:var(--cds-custom-text-secondary,#525252);font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333);margin-block:0 .25rem}.c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-04-font-size,1.75rem);font-weight:var(--cds-custom-heading-04-font-weight,400);letter-spacing:var(--cds-custom-heading-04-letter-spacing,0);line-height:var(--cds-custom-heading-04-line-height,1.28572)}@media (max-width:41.98rem){.c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}}.c4p--tearsheet__next__header-title{align-items:flex-start;display:flex;gap:1rem;margin-block-end:.5rem}.c4p--tearsheet__next__header-title--no-content-below{margin-block-end:0}.c4p--tearsheet__next__header-title svg{flex-shrink:0}.c4p--tearsheet__next__header-title .c4p--tearsheet__next__title-end{margin-inline-start:1rem}.c4p--tearsheet__next__header-description{font-size:var(--cds-custom-body-compact-01-font-size,.875rem);font-weight:var(--cds-custom-body-compact-01-font-weight,400);letter-spacing:var(--cds-custom-body-compact-01-letter-spacing,.16px);line-height:var(--cds-custom-body-compact-01-line-height,1.28572)}.c4p--tearsheet__next__header--no-close-icon{display:none}.c4p--tearsheet__next__navigation-bar{align-items:center;display:flex;gap:.125rem;justify-content:space-between;max-inline-size:calc(100% - .75rem);min-block-size:2.5rem;position:relative}.c4p--tearsheet__next__navigation-bar .cds-custom--tabs{margin-inline-start:-1rem}.c4p--tearsheet__next__scroller-container{inset-block-end:0;inset-inline-end:-2.5rem;position:absolute}@media (max-width:41.98rem){.c4p--tearsheet__next__scroller-container{inset-inline-end:-1.5rem}}.c4p--tearsheet__next__scroller-container .c4p--tearsheet__next__scroller-button-icon-collapsed{transform:rotate(-180deg)}.c4p--tearsheet__next__content__header-actions{align-items:center;block-size:2rem;display:flex;flex:0 0 auto;inline-size:100%;justify-content:flex-end;margin-block-start:-14px;overflow:hidden}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]){margin-inline-end:.5rem}.c4p--tearsheet__next__content__header-actions>.c4p--tearsheet__next__header-action-item:not([data-hidden=true]):nth-last-child(2){margin-inline-end:0}.c4p--tearsheet__next__content__header-actions>*{flex-shrink:0}@media (max-width:41.98rem){.c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}}.c4p--tearsheet__next__header-actions,.c4p--tearsheet__next__header-content{margin-block-end:1.5rem}@media (min-width:42rem){.c4p--tearsheet__next--wide .c4p--tearsheet__next__container{inline-size:calc(100% - 8rem)}}.c4p--tearsheet__next__body-layout{display:grid;grid-template-areas:\"influencer body\" \"influencer footer\";grid-template-columns:var(--tearsheet-influencer-width,16rem) 1fr;grid-template-rows:1fr auto;padding-block:0;padding-inline-end:0}.c4p--tearsheet__next__body-layout:not(.c4p--tearsheet__next__body-layout--has-influencer){grid-template-areas:\"body\" \"footer\";grid-template-columns:1fr}.c4p--tearsheet__next__influencer,:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){border-inline-end:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);grid-area:influencer}.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){display:grid;grid-area:body;grid-template-columns:1fr var(--tearsheet-summary-content-width,16rem);overflow:hidden;position:relative}@media (max-width:41.98rem){.c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}}.c4p--tearsheet__next__body>:only-child,:host(c4p-preview-tearsheet) ::slotted([slot=body])>:only-child{grid-column:1/-1}.c4p--tearsheet__next__body .cds-custom--tab-content,:host(c4p-preview-tearsheet) ::slotted([slot=body]) .cds-custom--tab-content{padding:0}.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){border-block-start:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);grid-area:footer;overflow:hidden}@media (max-width:19.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--three-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--three-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}@media (max-width:41.98rem){.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]){overflow-x:auto;overflow-y:hidden}.c4p--tearsheet__next__footer.c4p--tearsheet__next__footer--many-actions .c4p--action-set,:host(c4p-preview-tearsheet) .c4p--tearsheet__next__footer--many-actions::slotted([slot=footer]) .c4p--action-set{display:inline-flex;flex-shrink:0;min-inline-size:-moz-max-content;min-inline-size:max-content}}.c4p--tearsheet__next__influencer,.c4p--tearsheet__next__main-content,.c4p--tearsheet__next__summary-content,:host ::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) ::slotted([slot=influencer]){overflow:auto}.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:2rem}@media (max-width:41.98rem){.c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}}.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline:2px solid var(--cds-custom-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){.c4p--tearsheet__next__influencer:focus,.c4p--tearsheet__next__main-content:focus,.c4p--tearsheet__next__summary-content:focus,:host :focus::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) :focus::slotted([slot=influencer]){outline-style:dotted}}.c4p--tearsheet__next__main-content{background-color:var(--cds-custom-background,#fff)}.c4p--tearsheet__next__side-panel,:host c4p-side-panel::part(dialog){block-size:100%;inline-size:100%!important;inset-block-start:0;max-inline-size:none;position:absolute;z-index:9999}.c4p--tearsheet__next__side-panel .c4p--side-panel__header,:host c4p-side-panel::part(dialog) .c4p--side-panel__header{min-block-size:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__container{inline-size:480px;max-inline-size:480px}@media (width <= 480px){.c4p--tearsheet__next--narrow .c4p--tearsheet__next__container{inline-size:100%;max-inline-size:100%}}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header{padding-inline:1rem}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content{align-self:flex-start}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=body]){grid-template-columns:1fr 0}.c4p--tearsheet__next--narrow .c4p--tearsheet__next__influencer:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__main-content:not(.c4p--tearsheet__next__flush),.c4p--tearsheet__next--narrow .c4p--tearsheet__next__summary-content:not(.c4p--tearsheet__next__flush),:host .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=summary-content]),:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow :not(.c4p--tearsheet__next__flush)::slotted([slot=influencer]){padding-inline:1rem}.c4p--tearsheet__next--has-ai-label::part(dialog){background:linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,#78a9ff),var(--cds-custom-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-custom-layer),var(--cds-custom-layer)) border-box;border:1px solid transparent!important;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-custom-ai-drop-shadow,rgba(15,98,254,.1))}.c4p--tearsheet__next__main-content{position:relative}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__flush{padding-inline:0}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--no-summary{grid-column:1/-1}.c4p--tearsheet__next__main-content.c4p--tearsheet__next__main-content--has-ai-label{background:linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)) 0,var(--cds-custom-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-custom-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-custom-ai-border-start,rgba(166,200,255,.64)),var(--cds-custom-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff)),var(--cds-custom-background,var(--cds-custom-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-custom-ai-inner-shadow,rgba(69,137,255,.1))}:host ::slotted([slot=summary-content]:focus){outline:2px solid var(--cds-custom-focus,#0f62fe);outline-offset:-2px}@media screen and (prefers-contrast){:host ::slotted([slot=summary-content]:focus){outline-style:dotted}}:host ::slotted([slot=summary-content][is-flush]){padding-inline:0}@media screen and (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:none}}:host(c4p-preview-tearsheet) ::part(dialog){align-self:flex-end;block-size:100%;border:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)));transform:translate3d(0,min(95vh,500px),0);transition:transform .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1)}:host(c4p-preview-tearsheet) ::slotted([slot=influencer][is-flush]){padding-inline:0}:host(c4p-preview-tearsheet[open]) ::part(dialog){transform:translateZ(0);transition:transform .24s cubic-bezier(0,0,.3,1)}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet[open]) ::part(dialog){transition:none}}@media screen and (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet:not([open])) cds-custom-modal{transition:none}}@media (max-width:41.98rem){:host(:not(.c4p--tearsheet__next--stack-activated.is-visible)) ::part(dialog){max-block-size:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible){--overlay-color:var(--cds-custom-overlay,rgba(0,0,0,.6));--overlay-alpha:0.5}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{background:var(--overlay-color);content:\"\";display:block;inset:0;opacity:calc(var(--overlay-alpha) - var(--stack-depth)*.1);pointer-events:none;position:fixed;transition:background-color .24s cubic-bezier(.4,.14,1,1),opacity .24s cubic-bezier(.4,.14,1,1);z-index:calc(9000 - var(--stack-depth, 0))}@media (prefers-reduced-motion:reduce){:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible):before{transition:none}}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) cds-custom-modal{background-color:transparent}:host(c4p-preview-tearsheet.c4p--tearsheet__next--stack-activated.is-visible) ::part(dialog){max-block-size:calc(100% - var(--tearsheet-vertical-gap, calc(5rem + .5rem + .125rem)) + var(--block-size-change));transform:scaleX(var(--scale-factor))}:host(c4p-preview-tearsheet[variant=narrow]) ::part(dialog){inline-size:480px;max-inline-size:480px}@media (width <= 480px){:host(c4p-preview-tearsheet[variant=narrow]) ::part(dialog){inline-size:100%;max-inline-size:100%}}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header{padding-inline:1rem}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header.c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-actions{display:none}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-content-wrapper{display:flex;flex-direction:column}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__content__header-actions{justify-content:flex-start;margin-inline-end:0}:host(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__body,:host(c4p-preview-tearsheet[variant=narrow]):host(c4p-preview-tearsheet) ::slotted([slot=body]){grid-template-columns:1fr 0}:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0!important}@media (max-width:41.98rem){:host(c4p-preview-tearsheet) ::slotted([slot=influencer]),:host(c4p-preview-tearsheet) ::slotted([slot=summary-content]){padding:0!important}}:host-context(c4p-preview-tearsheet[variant=narrow]) ::slotted([slot=summary-content]){padding:0}:host ::slotted([slot=footer]){padding-block:0}.c4p--tearsheet__next__header-title{margin-block-start:0}:host-context(c4p-preview-tearsheet[variant=narrow]){display:flex;flex-direction:column}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-title{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__header-actions{justify-content:flex-start;margin-inline-end:0}:host-context(c4p-preview-tearsheet[variant=narrow]):host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{display:none}:host-context(c4p-preview-tearsheet[variant=narrow]):host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content{align-self:flex-start}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__title-start{align-items:center}:host-context(c4p-preview-tearsheet[variant=narrow]) .c4p--tearsheet__next__title-start ::slotted(*){block-size:1.5rem;inline-size:1.5rem}:host{display:grid;flex-basis:unset;gap:1rem;grid-template-columns:minmax(auto,40rem) minmax(var(--tearsheet-header-title-grid-width,0),1fr);inline-size:100%}@media (max-width:41.98rem){:host{display:flex;flex-direction:column}:host .c4p--tearsheet__next__header-actions{justify-content:flex-start;margin-inline-end:0}}.c4p--tearsheet__next__decorator{inset-block-start:.625rem;inset-inline-end:3rem;position:absolute;transition:inset-block-start .24s cubic-bezier(0,0,.3,1);z-index:1}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next__decorator{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__decorator{inset-block-start:.5rem}.c4p--tearsheet__next__close-button{inset-block-start:0;inset-inline-end:0;position:absolute;z-index:1}.c4p--tearsheet__next__close-button .cds-custom--modal-close{transition:all .24s ease}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next__close-button .cds-custom--modal-close{transition:none}}.c4p--tearsheet__next__header-actions{display:flex;justify-content:flex-end;margin-block-start:-14px;order:2}@media (max-width:41.98rem){.c4p--tearsheet__next__header-actions{order:0}}.c4p--tearsheet__next__header-content{order:1}@media (max-width:41.98rem){.c4p--tearsheet__next__header-content{order:0}}:host .c4p--tearsheet__next__header-actions,:host .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){opacity:1;transition:all .24s cubic-bezier(0,0,.3,1),opacity .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host .c4p--tearsheet__next__header-actions,:host .c4p--tearsheet__next__header-content :not(.c4p--tearsheet__next__content__title-wrapper,.c4p--tearsheet__next__header-label){transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions){margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions>:not(.c4p--tearsheet__next__content__header-actions){transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper){margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper){transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *{margin:0;max-block-size:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;transition:opacity .24s cubic-bezier(0,0,.3,1),max-block-size .24s cubic-bezier(0,0,.3,1),padding .24s cubic-bezier(0,0,.3,1),margin .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content>:not(.c4p--tearsheet__next__content__title-wrapper) *{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{align-items:center;block-size:2.5rem;font-size:var(--cds-custom-label-02-font-size,.875rem);font-weight:var(--cds-custom-label-02-font-weight,400);gap:.5rem;letter-spacing:var(--cds-custom-label-02-letter-spacing,.16px);line-height:var(--cds-custom-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title>span{align-items:center;block-size:1.5rem;display:flex}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content{align-self:center;margin-block-end:0}@media (max-width:41.98rem){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content{align-self:stretch}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__content__title-wrapper,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{margin-block:0;transition:margin-block .24s ease}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__content__title-wrapper,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-content,:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-title{transition:none}}@media (max-width:41.98rem){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{display:none}}@media (min-width:42rem){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{align-items:center;display:flex;margin-block:0;transition:margin-block .24s ease}}@media screen and (min-width:42rem) and (prefers-reduced-motion:reduce){:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__header-actions{transition:none}}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__title-start{align-items:center;display:inline-flex}:host-context(c4p-tearsheet-header[collapsed]) .c4p--tearsheet__next__title-start ::slotted(*){block-size:1rem;inline-size:1rem}.c4p--tearsheet__next__title-start ::slotted(*){transition:all .24s cubic-bezier(0,0,.3,1)}@media screen and (prefers-reduced-motion:reduce){.c4p--tearsheet__next__title-start ::slotted(*){transition:none}}:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-actions,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content *{opacity:0;transition:opacity .1s ease-out}@media screen and (prefers-reduced-motion:reduce){:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-actions,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content,:host-context(c4p-preview-tearsheet:not([open])) .c4p--tearsheet__next__header-content *{transition:none}}"]);
|
|
11
11
|
//#endregion
|
|
12
12
|
export { tearsheet_header_content_default as default };
|
|
13
13
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tearsheet-header-content.scss.js","names":[],"sources":["../../../src/components/tearsheet-preview/tearsheet-header-content.scss?lit"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n@use '@carbon/styles/scss/breakpoint' as *;\n@use '@carbon/ibm-products-styles/scss/config';\n@use '@carbon/styles/scss/motion' as *;\n@use '@carbon/styles/scss/spacing' as *;\n@use '@carbon/styles/scss/type';\n@use '@carbon/layout/scss/convert';\n@use './tearsheet.scss' as *;\n\n$prefix: config.$pkg-prefix;\n$carbon-prefix: config.$carbon-prefix;\n$block-class__next: #{$prefix}--tearsheet__next;\n$motion-duration: $duration-moderate-02;\n// Narrow variant styles\n:host-context(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n display: flex;\n flex-direction: column;\n\n .#{$block-class__next}__header-title {\n @include type.type-style('heading-03');\n }\n\n .#{$block-class__next}__header-actions {\n justify-content: flex-start;\n margin-inline-end: 0;\n }\n}\n\n// Hide header actions when collapsed in narrow variant\n:host-context(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n &:host-context(#{$c4p-prefix}-tearsheet-header[collapsed]) {\n .#{$block-class__next}__header-actions {\n display: none;\n }\n .#{$block-class__next}__header-content {\n align-self: flex-start;\n }\n }\n .#{$block-class__next}__title-start {\n align-items: center;\n\n ::slotted(*) {\n block-size: $spacing-06;\n inline-size: $spacing-06;\n }\n }\n}\n\n:host {\n // Grid hosts header-content (col 1) and header-actions (col 2).\n // Decorator and close button are absolutely positioned top-right,\n // placed early in DOM order for correct keyboard tab sequence.\n display: grid;\n flex-basis: unset;\n gap: $spacing-05;\n grid-template-columns: minmax(auto, 40rem) minmax(\n var(--tearsheet-header-title-grid-width, 0),\n 1fr\n );\n\n inline-size: 100%; // full width — close/decorator are abs-positioned, no offset needed\n\n @include breakpoint-down(md) {\n display: flex;\n flex-direction: column;\n\n .#{$block-class__next}__header-actions {\n justify-content: flex-start;\n margin-inline-end: 0;\n }\n }\n}\n\n// ── Decorator (AI label) ─────────────────────────────────────────\n// DOM position: 2nd (after header-actions, before close, before header-content)\n// Visual position: absolute top-right (matches React TearsheetNext)\n.#{$block-class__next}__decorator {\n position: absolute;\n z-index: 1;\n inset-block-start: convert.to-rem(10px);\n inset-inline-end: $spacing-09;\n // Transition on base state so it animates in both directions (expand + collapse)\n transition: inset-block-start $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n // When header is collapsed, shift slightly down — matches React\n :host-context(#{$c4p-prefix}-tearsheet-header[collapsed]) & {\n inset-block-start: $spacing-03;\n }\n}\n\n// ── Close button ─────────────────────────────────────────────────\n// DOM position: 3rd (after decorator, before header-content)\n// Visual position: absolute top-right corner — stays absolute on ALL screen sizes\n.#{$block-class__next}__close-button {\n position: absolute;\n z-index: 1;\n inset-block-start: 0;\n inset-inline-end: 0;\n\n // Animate size change (lg → md on collapse) — matches React\n .#{$carbon-prefix}--modal-close {\n transition: all $motion-duration ease;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n.#{$block-class__next}__header-actions {\n display: flex;\n justify-content: flex-end;\n order: 2; /* Visual order: appears on the right on desktop */\n margin-block-start: -14px;\n\n @include breakpoint-down(md) {\n order: 0; /* Reset to DOM order on mobile (header-actions first) */\n }\n}\n\n.#{$block-class__next}__header-content {\n order: 1; /* Visual order: appears on the left on desktop */\n\n @include breakpoint-down(md) {\n order: 0; /* Reset to DOM order on mobile (header-content second) */\n }\n}\n\n:host {\n .#{$block-class__next}__header-actions,\n .#{$block-class__next}__header-content\n *:not(\n .#{$block-class__next}__content__title-wrapper,\n .#{$block-class__next}__header-label\n ) {\n opacity: 1;\n transition:\n all $motion-duration motion(entrance, expressive),\n opacity $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n// ──────────────────────────────────────────────────────────────\n// Collapsed Header State\n// ──────────────────────────────────────────────────────────────\n:host-context(#{$c4p-prefix}-tearsheet-header[collapsed]) {\n // Collapse header actions except the main action button\n .#{$block-class__next}__header-actions\n > *:not(.#{$block-class__next}__content__header-actions) {\n @include collapsed-element;\n }\n\n // Collapse all header content except title wrapper\n .#{$block-class__next}__header-content\n > *:not(.#{$block-class__next}__content__title-wrapper) {\n @include collapsed-element;\n }\n\n // Collapse nested elements within non-title elements\n .#{$block-class__next}__header-content\n > *:not(.#{$block-class__next}__content__title-wrapper)\n * {\n @include collapsed-element;\n }\n\n // Header title styling when collapsed\n .#{$block-class__next}__header-title {\n @include type.type-style('label-02');\n\n align-items: center;\n // Fixed block-size keeps the title row at the same height as the close button\n block-size: $spacing-08;\n // Gap between title-start icon and title text when collapsed\n gap: $spacing-03;\n margin-block-start: $spacing-02;\n transition: all $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n > span {\n display: flex;\n align-items: center;\n block-size: $spacing-06;\n }\n }\n\n // Header content alignment\n .#{$block-class__next}__header-content {\n align-self: center;\n margin-block-end: 0;\n }\n\n // Hide header actions on small screens when collapsed\n // Normalize visible elements\n .#{$block-class__next}__header-content,\n .#{$block-class__next}__content__title-wrapper,\n .#{$block-class__next}__header-title {\n margin-block: 0;\n transition: margin-block $motion-duration ease;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n @include breakpoint-down(md) {\n .#{$block-class__next}__header-actions {\n display: none;\n }\n }\n\n @include breakpoint(md) {\n .#{$block-class__next}__header-actions {\n display: flex;\n align-items: center;\n margin-block: 0;\n transition: margin-block $motion-duration ease;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n }\n // Header actions adjustment — removed negative offset that caused misalignment\n // Style for title-start slot content (like icons)\n .#{$block-class__next}__title-start {\n display: inline-flex;\n align-items: center;\n\n ::slotted(*) {\n block-size: $spacing-05;\n inline-size: $spacing-05;\n }\n }\n}\n.#{$block-class__next}__title-start {\n ::slotted(*) {\n transition: all $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n// Hide header content elements immediately when tearsheet is closing\n:host-context(#{$c4p-prefix}-preview-tearsheet:not([open])) {\n .#{$block-class__next}__header-actions,\n .#{$block-class__next}__header-content,\n .#{$block-class__next}__header-content * {\n opacity: 0;\n transition: opacity 0.1s ease-out;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"tearsheet-header-content.scss.js","names":[],"sources":["../../../src/components/tearsheet-preview/tearsheet-header-content.scss?lit"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n@use '@carbon/styles/scss/breakpoint' as *;\n@use '@carbon/ibm-products-styles/scss/config';\n@use '@carbon/styles/scss/motion' as *;\n@use '@carbon/styles/scss/spacing' as *;\n@use '@carbon/styles/scss/type';\n@use '@carbon/layout/scss/convert';\n@use './tearsheet.scss' as *;\n\n$prefix: config.$pkg-prefix;\n$carbon-prefix: config.$carbon-prefix;\n$block-class__next: #{$prefix}--tearsheet__next;\n$motion-duration: $duration-moderate-02;\n\n.#{$block-class__next}__header-title {\n margin-block-start: 0;\n}\n\n// Narrow variant styles\n:host-context(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n display: flex;\n flex-direction: column;\n\n .#{$block-class__next}__header-title {\n @include type.type-style('heading-03');\n }\n\n .#{$block-class__next}__header-actions {\n justify-content: flex-start;\n margin-inline-end: 0;\n }\n}\n\n// Hide header actions when collapsed in narrow variant\n:host-context(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n &:host-context(#{$c4p-prefix}-tearsheet-header[collapsed]) {\n .#{$block-class__next}__header-actions {\n display: none;\n }\n .#{$block-class__next}__header-content {\n align-self: flex-start;\n }\n }\n .#{$block-class__next}__title-start {\n align-items: center;\n\n ::slotted(*) {\n block-size: $spacing-06;\n inline-size: $spacing-06;\n }\n }\n}\n\n:host {\n // Grid hosts header-content (col 1) and header-actions (col 2).\n // Decorator and close button are absolutely positioned top-right,\n // placed early in DOM order for correct keyboard tab sequence.\n display: grid;\n flex-basis: unset;\n gap: $spacing-05;\n grid-template-columns: minmax(auto, 40rem) minmax(\n var(--tearsheet-header-title-grid-width, 0),\n 1fr\n );\n\n inline-size: 100%; // full width — close/decorator are abs-positioned, no offset needed\n\n @include breakpoint-down(md) {\n display: flex;\n flex-direction: column;\n\n .#{$block-class__next}__header-actions {\n justify-content: flex-start;\n margin-inline-end: 0;\n }\n }\n}\n\n// ── Decorator (AI label) ─────────────────────────────────────────\n// DOM position: 2nd (after header-actions, before close, before header-content)\n// Visual position: absolute top-right (matches React TearsheetNext)\n.#{$block-class__next}__decorator {\n position: absolute;\n z-index: 1;\n inset-block-start: convert.to-rem(10px);\n inset-inline-end: $spacing-09;\n // Transition on base state so it animates in both directions (expand + collapse)\n transition: inset-block-start $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n // When header is collapsed, shift slightly down — matches React\n :host-context(#{$c4p-prefix}-tearsheet-header[collapsed]) & {\n inset-block-start: $spacing-03;\n }\n}\n\n// ── Close button ─────────────────────────────────────────────────\n// DOM position: 3rd (after decorator, before header-content)\n// Visual position: absolute top-right corner — stays absolute on ALL screen sizes\n.#{$block-class__next}__close-button {\n position: absolute;\n z-index: 1;\n inset-block-start: 0;\n inset-inline-end: 0;\n\n // Animate size change (lg → md on collapse) — matches React\n .#{$carbon-prefix}--modal-close {\n transition: all $motion-duration ease;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n.#{$block-class__next}__header-actions {\n display: flex;\n justify-content: flex-end;\n order: 2; /* Visual order: appears on the right on desktop */\n margin-block-start: -14px;\n\n @include breakpoint-down(md) {\n order: 0; /* Reset to DOM order on mobile (header-actions first) */\n }\n}\n\n.#{$block-class__next}__header-content {\n order: 1; /* Visual order: appears on the left on desktop */\n\n @include breakpoint-down(md) {\n order: 0; /* Reset to DOM order on mobile (header-content second) */\n }\n}\n\n:host {\n .#{$block-class__next}__header-actions,\n .#{$block-class__next}__header-content\n *:not(\n .#{$block-class__next}__content__title-wrapper,\n .#{$block-class__next}__header-label\n ) {\n opacity: 1;\n transition:\n all $motion-duration motion(entrance, expressive),\n opacity $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n// ──────────────────────────────────────────────────────────────\n// Collapsed Header State\n// ──────────────────────────────────────────────────────────────\n:host-context(#{$c4p-prefix}-tearsheet-header[collapsed]) {\n // Collapse header actions except the main action button\n .#{$block-class__next}__header-actions\n > *:not(.#{$block-class__next}__content__header-actions) {\n @include collapsed-element;\n }\n\n // Collapse all header content except title wrapper\n .#{$block-class__next}__header-content\n > *:not(.#{$block-class__next}__content__title-wrapper) {\n @include collapsed-element;\n }\n\n // Collapse nested elements within non-title elements\n .#{$block-class__next}__header-content\n > *:not(.#{$block-class__next}__content__title-wrapper)\n * {\n @include collapsed-element;\n }\n\n // Header title styling when collapsed\n .#{$block-class__next}__header-title {\n @include type.type-style('label-02');\n\n align-items: center;\n // Fixed block-size keeps the title row at the same height as the close button\n block-size: $spacing-08;\n // Gap between title-start icon and title text when collapsed\n gap: $spacing-03;\n margin-block-start: $spacing-02;\n transition: all $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n\n > span {\n display: flex;\n align-items: center;\n block-size: $spacing-06;\n }\n }\n\n // Header content alignment\n .#{$block-class__next}__header-content {\n align-self: center;\n margin-block-end: 0;\n\n @include breakpoint-down(md) {\n align-self: stretch;\n }\n }\n\n // Hide header actions on small screens when collapsed\n // Normalize visible elements\n .#{$block-class__next}__header-content,\n .#{$block-class__next}__content__title-wrapper,\n .#{$block-class__next}__header-title {\n margin-block: 0;\n transition: margin-block $motion-duration ease;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n @include breakpoint-down(md) {\n .#{$block-class__next}__header-actions {\n display: none;\n }\n }\n\n @include breakpoint(md) {\n .#{$block-class__next}__header-actions {\n display: flex;\n align-items: center;\n margin-block: 0;\n transition: margin-block $motion-duration ease;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n }\n // Header actions adjustment — removed negative offset that caused misalignment\n // Style for title-start slot content (like icons)\n .#{$block-class__next}__title-start {\n display: inline-flex;\n align-items: center;\n\n ::slotted(*) {\n block-size: $spacing-05;\n inline-size: $spacing-05;\n }\n }\n}\n.#{$block-class__next}__title-start {\n ::slotted(*) {\n transition: all $motion-duration motion(entrance, expressive);\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n// Hide header content elements immediately when tearsheet is closing\n:host-context(#{$c4p-prefix}-preview-tearsheet:not([open])) {\n .#{$block-class__next}__header-actions,\n .#{$block-class__next}__header-content,\n .#{$block-class__next}__header-content * {\n opacity: 0;\n transition: opacity 0.1s ease-out;\n\n @media screen and (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n"],"mappings":""}
|