@carbon/ibm-products-web-components 0.41.1 → 0.42.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.
Files changed (160) hide show
  1. package/custom-elements.json +64 -0
  2. package/es/components/coachmark/coachmark-body.d.ts +1 -1
  3. package/es/components/coachmark/coachmark-header.d.ts +1 -1
  4. package/es/components/coachmark/coachmark.d.ts +1 -1
  5. package/es/components/interstitial-screen/interstitial-screen-body-item.js +1 -1
  6. package/es/components/interstitial-screen/interstitial-screen-body.d.ts +1 -1
  7. package/es/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
  8. package/es/components/interstitial-screen/interstitial-screen-footer.js +1 -1
  9. package/es/components/interstitial-screen/interstitial-screen-header.d.ts +1 -1
  10. package/es/components/interstitial-screen/interstitial-screen-header.js +1 -1
  11. package/es/components/interstitial-screen/interstitial-screen.d.ts +1 -1
  12. package/es/components/interstitial-screen/interstitial-screen.d.ts.map +1 -1
  13. package/es/components/interstitial-screen/interstitial-screen.js +2 -1
  14. package/es/components/interstitial-screen/interstitial-screen.js.map +1 -1
  15. package/es/components/page-header/context.d.ts +1 -0
  16. package/es/components/page-header/context.d.ts.map +1 -1
  17. package/es/components/page-header/context.js +2 -1
  18. package/es/components/page-header/context.js.map +1 -1
  19. package/es/components/page-header/page-header-breadcrumb.d.ts +3 -0
  20. package/es/components/page-header/page-header-breadcrumb.d.ts.map +1 -1
  21. package/es/components/page-header/page-header-breadcrumb.js +18 -3
  22. package/es/components/page-header/page-header-breadcrumb.js.map +1 -1
  23. package/es/components/page-header/page-header-tabs.d.ts +7 -0
  24. package/es/components/page-header/page-header-tabs.d.ts.map +1 -1
  25. package/es/components/page-header/page-header-tabs.js +27 -0
  26. package/es/components/page-header/page-header-tabs.js.map +1 -1
  27. package/es/components/page-header/page-header.d.ts +2 -0
  28. package/es/components/page-header/page-header.d.ts.map +1 -1
  29. package/es/components/page-header/page-header.js +5 -0
  30. package/es/components/page-header/page-header.js.map +1 -1
  31. package/es/components/page-header/page-header.scss.js +1 -1
  32. package/es/components/page-header/page-header.scss.js.map +1 -1
  33. package/es/components/side-panel/side-panel.d.ts +31 -0
  34. package/es/components/side-panel/side-panel.d.ts.map +1 -1
  35. package/es/components/side-panel/side-panel.js +89 -0
  36. package/es/components/side-panel/side-panel.js.map +1 -1
  37. package/es/components/side-panel/side-panel.scss.js +1 -1
  38. package/es/components/side-panel/side-panel.scss.js.map +1 -1
  39. package/es/components/tearsheet/tearsheet.scss.js +1 -1
  40. package/es/components/tearsheet-preview/tearsheet-body.d.ts +1 -1
  41. package/es/components/tearsheet-preview/tearsheet-footer.d.ts +6 -2
  42. package/es/components/tearsheet-preview/tearsheet-footer.d.ts.map +1 -1
  43. package/es/components/tearsheet-preview/tearsheet-footer.js +15 -1
  44. package/es/components/tearsheet-preview/tearsheet-footer.js.map +1 -1
  45. package/es/components/tearsheet-preview/tearsheet-header-content.d.ts +8 -0
  46. package/es/components/tearsheet-preview/tearsheet-header-content.d.ts.map +1 -1
  47. package/es/components/tearsheet-preview/tearsheet-header-content.js +12 -1
  48. package/es/components/tearsheet-preview/tearsheet-header-content.js.map +1 -1
  49. package/es/components/tearsheet-preview/tearsheet-header-content.scss.js +1 -1
  50. package/es/components/tearsheet-preview/tearsheet-header.d.ts +1 -1
  51. package/es/components/tearsheet-preview/tearsheet-header.d.ts.map +1 -1
  52. package/es/components/tearsheet-preview/tearsheet-header.js +12 -4
  53. package/es/components/tearsheet-preview/tearsheet-header.js.map +1 -1
  54. package/es/components/tearsheet-preview/tearsheet-header.scss.js +1 -1
  55. package/es/components/tearsheet-preview/tearsheet-influencer.d.ts +5 -1
  56. package/es/components/tearsheet-preview/tearsheet-influencer.d.ts.map +1 -1
  57. package/es/components/tearsheet-preview/tearsheet-influencer.js +4 -0
  58. package/es/components/tearsheet-preview/tearsheet-influencer.js.map +1 -1
  59. package/es/components/tearsheet-preview/tearsheet-navigation-bar.scss.js +1 -1
  60. package/es/components/tearsheet-preview/tearsheet-signal.d.ts +1 -0
  61. package/es/components/tearsheet-preview/tearsheet-signal.d.ts.map +1 -1
  62. package/es/components/tearsheet-preview/tearsheet-signal.js +2 -1
  63. package/es/components/tearsheet-preview/tearsheet-signal.js.map +1 -1
  64. package/es/components/tearsheet-preview/tearsheet-summary-content.d.ts +5 -1
  65. package/es/components/tearsheet-preview/tearsheet-summary-content.d.ts.map +1 -1
  66. package/es/components/tearsheet-preview/tearsheet-summary-content.js +4 -0
  67. package/es/components/tearsheet-preview/tearsheet-summary-content.js.map +1 -1
  68. package/es/components/tearsheet-preview/tearsheet.d.ts +11 -1
  69. package/es/components/tearsheet-preview/tearsheet.d.ts.map +1 -1
  70. package/es/components/tearsheet-preview/tearsheet.js +30 -1
  71. package/es/components/tearsheet-preview/tearsheet.js.map +1 -1
  72. package/es/components/tearsheet-preview/tearsheet.scss.js +1 -1
  73. package/es/components/tearsheet-preview/tearsheet.scss.js.map +1 -1
  74. package/es/ibm-products-web-components/package.js +1 -1
  75. package/es/utilities/manageFocusTrap/manageFocusTrap.d.ts +121 -3
  76. package/es/utilities/manageFocusTrap/manageFocusTrap.d.ts.map +1 -1
  77. package/es/utilities/manageFocusTrap/manageFocusTrap.js +188 -33
  78. package/es/utilities/manageFocusTrap/manageFocusTrap.js.map +1 -1
  79. package/es-custom/components/interstitial-screen/interstitial-screen-body-item.js +1 -1
  80. package/es-custom/components/interstitial-screen/interstitial-screen-footer.js +1 -1
  81. package/es-custom/components/interstitial-screen/interstitial-screen-header.js +1 -1
  82. package/es-custom/components/interstitial-screen/interstitial-screen.js +2 -1
  83. package/es-custom/components/interstitial-screen/interstitial-screen.js.map +1 -1
  84. package/es-custom/components/page-header/context.js +2 -1
  85. package/es-custom/components/page-header/context.js.map +1 -1
  86. package/es-custom/components/page-header/page-header-breadcrumb.js +18 -3
  87. package/es-custom/components/page-header/page-header-breadcrumb.js.map +1 -1
  88. package/es-custom/components/page-header/page-header-tabs.js +27 -0
  89. package/es-custom/components/page-header/page-header-tabs.js.map +1 -1
  90. package/es-custom/components/page-header/page-header.js +5 -0
  91. package/es-custom/components/page-header/page-header.js.map +1 -1
  92. package/es-custom/components/page-header/page-header.scss.js +1 -1
  93. package/es-custom/components/page-header/page-header.scss.js.map +1 -1
  94. package/es-custom/components/side-panel/side-panel.js +89 -0
  95. package/es-custom/components/side-panel/side-panel.js.map +1 -1
  96. package/es-custom/components/side-panel/side-panel.scss.js +1 -1
  97. package/es-custom/components/side-panel/side-panel.scss.js.map +1 -1
  98. package/es-custom/components/tearsheet/tearsheet.scss.js +1 -1
  99. package/es-custom/components/tearsheet-preview/tearsheet-footer.js +15 -1
  100. package/es-custom/components/tearsheet-preview/tearsheet-footer.js.map +1 -1
  101. package/es-custom/components/tearsheet-preview/tearsheet-header-content.js +12 -1
  102. package/es-custom/components/tearsheet-preview/tearsheet-header-content.js.map +1 -1
  103. package/es-custom/components/tearsheet-preview/tearsheet-header-content.scss.js +1 -1
  104. package/es-custom/components/tearsheet-preview/tearsheet-header.js +12 -4
  105. package/es-custom/components/tearsheet-preview/tearsheet-header.js.map +1 -1
  106. package/es-custom/components/tearsheet-preview/tearsheet-header.scss.js +1 -1
  107. package/es-custom/components/tearsheet-preview/tearsheet-influencer.js +4 -0
  108. package/es-custom/components/tearsheet-preview/tearsheet-influencer.js.map +1 -1
  109. package/es-custom/components/tearsheet-preview/tearsheet-navigation-bar.scss.js +1 -1
  110. package/es-custom/components/tearsheet-preview/tearsheet-signal.js +2 -1
  111. package/es-custom/components/tearsheet-preview/tearsheet-signal.js.map +1 -1
  112. package/es-custom/components/tearsheet-preview/tearsheet-summary-content.js +4 -0
  113. package/es-custom/components/tearsheet-preview/tearsheet-summary-content.js.map +1 -1
  114. package/es-custom/components/tearsheet-preview/tearsheet.js +30 -1
  115. package/es-custom/components/tearsheet-preview/tearsheet.js.map +1 -1
  116. package/es-custom/components/tearsheet-preview/tearsheet.scss.js +1 -1
  117. package/es-custom/components/tearsheet-preview/tearsheet.scss.js.map +1 -1
  118. package/es-custom/ibm-products-web-components/package.js +1 -1
  119. package/es-custom/utilities/manageFocusTrap/manageFocusTrap.js +188 -33
  120. package/es-custom/utilities/manageFocusTrap/manageFocusTrap.js.map +1 -1
  121. package/lib/components/coachmark/coachmark-body.d.ts +1 -1
  122. package/lib/components/coachmark/coachmark-header.d.ts +1 -1
  123. package/lib/components/coachmark/coachmark.d.ts +1 -1
  124. package/lib/components/interstitial-screen/interstitial-screen-body.d.ts +1 -1
  125. package/lib/components/interstitial-screen/interstitial-screen-footer.d.ts +1 -1
  126. package/lib/components/interstitial-screen/interstitial-screen-header.d.ts +1 -1
  127. package/lib/components/interstitial-screen/interstitial-screen.d.ts +1 -1
  128. package/lib/components/interstitial-screen/interstitial-screen.d.ts.map +1 -1
  129. package/lib/components/page-header/context.d.ts +1 -0
  130. package/lib/components/page-header/context.d.ts.map +1 -1
  131. package/lib/components/page-header/page-header-breadcrumb.d.ts +3 -0
  132. package/lib/components/page-header/page-header-breadcrumb.d.ts.map +1 -1
  133. package/lib/components/page-header/page-header-tabs.d.ts +7 -0
  134. package/lib/components/page-header/page-header-tabs.d.ts.map +1 -1
  135. package/lib/components/page-header/page-header.d.ts +2 -0
  136. package/lib/components/page-header/page-header.d.ts.map +1 -1
  137. package/lib/components/side-panel/side-panel.d.ts +31 -0
  138. package/lib/components/side-panel/side-panel.d.ts.map +1 -1
  139. package/lib/components/tearsheet-preview/tearsheet-body.d.ts +1 -1
  140. package/lib/components/tearsheet-preview/tearsheet-footer.d.ts +6 -2
  141. package/lib/components/tearsheet-preview/tearsheet-footer.d.ts.map +1 -1
  142. package/lib/components/tearsheet-preview/tearsheet-header-content.d.ts +8 -0
  143. package/lib/components/tearsheet-preview/tearsheet-header-content.d.ts.map +1 -1
  144. package/lib/components/tearsheet-preview/tearsheet-header.d.ts +1 -1
  145. package/lib/components/tearsheet-preview/tearsheet-header.d.ts.map +1 -1
  146. package/lib/components/tearsheet-preview/tearsheet-influencer.d.ts +5 -1
  147. package/lib/components/tearsheet-preview/tearsheet-influencer.d.ts.map +1 -1
  148. package/lib/components/tearsheet-preview/tearsheet-signal.d.ts +1 -0
  149. package/lib/components/tearsheet-preview/tearsheet-signal.d.ts.map +1 -1
  150. package/lib/components/tearsheet-preview/tearsheet-summary-content.d.ts +5 -1
  151. package/lib/components/tearsheet-preview/tearsheet-summary-content.d.ts.map +1 -1
  152. package/lib/components/tearsheet-preview/tearsheet.d.ts +11 -1
  153. package/lib/components/tearsheet-preview/tearsheet.d.ts.map +1 -1
  154. package/lib/utilities/manageFocusTrap/manageFocusTrap.d.ts +121 -3
  155. package/lib/utilities/manageFocusTrap/manageFocusTrap.d.ts.map +1 -1
  156. package/package.json +7 -6
  157. package/scss/components/page-header/page-header.scss +49 -10
  158. package/scss/components/side-panel/side-panel.scss +19 -0
  159. package/scss/components/tearsheet-preview/tearsheet.scss +5 -0
  160. package/telemetry.yml +5 -0
@@ -11,6 +11,7 @@ import tearsheet_default$1 from "./tearsheet.scss.js";
11
11
  import { MatchMediaController } from "../../globals/js/utils/match-media-controller.js";
12
12
  import { blockClass, updateTearsheetSignals } from "./tearsheet-signal.js";
13
13
  import { stackManager } from "./stack-signal.js";
14
+ import { clearFocusableContainers, trapFocus } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
14
15
  import { LitElement, html } from "lit";
15
16
  import { property, query, state } from "lit/decorators.js";
16
17
  import { carbonElement } from "@carbon/web-components/es/globals/decorators/carbon-element.js";
@@ -54,6 +55,8 @@ let CDSTearsheet = class CDSTearsheet extends SignalWatcher(HostListenerMixin(Li
54
55
  this.uniqueId = `tearsheet-${Math.random().toString(36).substr(2, 9)}`;
55
56
  this._stackingEnabled = false;
56
57
  this.isSm = false;
58
+ this._trapFocusAPI = null;
59
+ this._wasOpen = false;
57
60
  this.smMediaQuery = `(max-width: ${breakpoints.md.width})`;
58
61
  this.isSmallDevice = new MatchMediaController(this, this.smMediaQuery, false);
59
62
  this.handleStackConnected = (event) => {
@@ -111,7 +114,8 @@ let CDSTearsheet = class CDSTearsheet extends SignalWatcher(HostListenerMixin(Li
111
114
  variant: this.variant,
112
115
  isSm: this.isSm,
113
116
  open: this.open,
114
- hasAILabel: this.hasAILabel
117
+ hasAILabel: this.hasAILabel,
118
+ uniqueId: this.uniqueId
115
119
  });
116
120
  }
117
121
  updated(_changedProperties) {
@@ -129,10 +133,29 @@ let CDSTearsheet = class CDSTearsheet extends SignalWatcher(HostListenerMixin(Li
129
133
  }
130
134
  handleOpenPropertyChange(_changedProperties) {
131
135
  if (!_changedProperties.has("open")) return;
136
+ const wasOpen = this._wasOpen;
137
+ const isOpen = this.open;
132
138
  updateTearsheetSignals({ open: this.open });
133
139
  if (this._stackingEnabled && this.modalBodyElement) stackManager.notifyStack(this.uniqueId, this.open, this.modalBodyElement);
134
140
  this.classList.toggle("is-visible", this.open);
135
141
  if (this._stackingEnabled) this.updateStackProperties();
142
+ if (!wasOpen && isOpen) {
143
+ updateTearsheetSignals({ uniqueId: this.uniqueId });
144
+ requestAnimationFrame(() => {
145
+ this._trapFocusAPI = trapFocus(this, this.uniqueId);
146
+ });
147
+ }
148
+ this._wasOpen = isOpen;
149
+ if (!this.open && this.launcherButtonRef) setTimeout(() => {
150
+ if (this.launcherButtonRef instanceof HTMLElement) {
151
+ const headerActionItem = this.launcherButtonRef.closest(`.${blockClass}__header-action-item`);
152
+ if (headerActionItem) {
153
+ const menuButton = headerActionItem.closest(`.${blockClass}__content__header-actions`)?.querySelector(`.${blockClass}__header-actions-menuButton:not(.${blockClass}__header-actions-menuButton--hidden) button`);
154
+ if (menuButton instanceof HTMLElement) menuButton.focus();
155
+ else this.launcherButtonRef.focus();
156
+ } else this.launcherButtonRef.focus();
157
+ }
158
+ }, 100);
136
159
  }
137
160
  updateCSSPropertiesIfNeeded(_changedProperties) {
138
161
  if (_changedProperties.has("influencerWidth") || _changedProperties.has("summaryContentWidth") || _changedProperties.has("verticalGap")) this.updateCSSCustomProperties();
@@ -159,6 +182,8 @@ let CDSTearsheet = class CDSTearsheet extends SignalWatcher(HostListenerMixin(Li
159
182
  }
160
183
  disconnectedCallback() {
161
184
  super.disconnectedCallback();
185
+ this._trapFocusAPI?.cleanup();
186
+ clearFocusableContainers();
162
187
  this.removeEventListener(`c4p-tearsheet-header-close-button-clicked`, this.handleHeaderCloseButtonClick);
163
188
  this.removeEventListener(`c4p-tearsheet-stack-connected`, this.handleStackConnected);
164
189
  this.removeEventListener(`c4p-tearsheet-stack-step-size-changed`, this.handleStackStepSizeChanged);
@@ -250,6 +275,7 @@ let CDSTearsheet = class CDSTearsheet extends SignalWatcher(HostListenerMixin(Li
250
275
  [`${blockClass}--has-decorator`]: this.hasDecorator && !this.hasAILabel
251
276
  });
252
277
  const containerClasses = `${blockClass}__container ${this.containerClassName}`;
278
+ const computedAriaLabelledby = !this.ariaLabel && this.headerContentElement?.titleId ? this.headerContentElement.titleId : void 0;
253
279
  return html`<cds-modal
254
280
  class=${classes}
255
281
  size=${this.variant === "narrow" ? "sm" : "lg"}
@@ -257,6 +283,7 @@ let CDSTearsheet = class CDSTearsheet extends SignalWatcher(HostListenerMixin(Li
257
283
  container-class="${containerClasses}"
258
284
  ?prevent-close-on-click-outside="${this.preventCloseOnClickOutside}"
259
285
  aria-label="${ifDefined(this.ariaLabel || void 0)}"
286
+ aria-labelledby="${ifDefined(computedAriaLabelledby)}"
260
287
  selector-primary-focus="${ifDefined(this.selectorPrimaryFocus || void 0)}"
261
288
  selectors-floating-menus="${this.getFloatingMenuSelectors()}"
262
289
  @cds-modal-beingclosed="${this.handleClose}"
@@ -295,8 +322,10 @@ __decorate([property({
295
322
  type: Boolean,
296
323
  attribute: "prevent-close-on-click-outside"
297
324
  })], CDSTearsheet.prototype, "preventCloseOnClickOutside", void 0);
325
+ __decorate([property({ attribute: false })], CDSTearsheet.prototype, "launcherButtonRef", void 0);
298
326
  __decorate([state()], CDSTearsheet.prototype, "isSm", void 0);
299
327
  __decorate([query("cds-modal-body")], CDSTearsheet.prototype, "modalBodyElement", void 0);
328
+ __decorate([query(`c4p-tearsheet-header-content`)], CDSTearsheet.prototype, "headerContentElement", void 0);
300
329
  CDSTearsheet = __decorate([carbonElement(`c4p-preview-tearsheet`)], CDSTearsheet);
301
330
  var tearsheet_default = CDSTearsheet;
302
331
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"tearsheet.js","names":["styles","customElement"],"sources":["../../../src/components/tearsheet-preview/tearsheet.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 { LitElement, PropertyValues, html } from 'lit';\nimport { property, state, query } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './tearsheet.scss?lit';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { MatchMediaController } from '../../globals/js/utils/match-media-controller';\nimport { breakpoints } from '@carbon/layout';\nimport { blockClass, updateTearsheetSignals } from './tearsheet-signal';\nimport { SignalWatcher } from '@lit-labs/signals';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { stackManager } from './stack-signal';\n\n/**\n * Tearsheet component - A slide-out panel for displaying detailed content.\n *\n * @element c4p-preview-tearsheet\n * @slot header - The header content of the tearsheet\n * @slot influencer - Optional left sidebar content (wide variant only)\n * @slot body - Main body content\n * @slot footer - Footer content with actions\n * @fires c4p-preview-tearsheet-beingclosed - Fired when the tearsheet is about to close\n * @fires c4p-preview-tearsheet-closed - Fired after the tearsheet has closed\n */\n@customElement(`${prefix}-preview-tearsheet`)\nclass CDSTearsheet extends SignalWatcher(HostListenerMixin(LitElement)) {\n /**\n * Specifies whether the tearsheet is currently open.\n */\n @property({ type: Boolean, reflect: true })\n open: boolean = false;\n\n /**\n * User can pass any class names that will be added to the modal container\n */\n @property({ attribute: 'container-class-name' })\n containerClassName: string = '';\n\n /**\n * Default influencer takes 256px, this allows override eg: 300px, 20rem\n */\n @property({ attribute: 'influencer-width' })\n influencerWidth: string = '';\n\n /**\n * Default summary content takes 256px, this allows override eg: 300px, 20rem\n */\n @property({ attribute: 'summary-content-width' })\n summaryContentWidth: string = '';\n\n /**\n * Defines the gap from top of the viewport. Defaulted to 3rem\n */\n @property({ attribute: 'vertical-gap' })\n verticalGap: string = '';\n\n /**\n * Default to wide variant. Pass in narrow for narrow tearsheet\n */\n @property({ reflect: true })\n variant: 'wide' | 'narrow' = 'wide';\n\n /**\n * Specify the CSS selectors that match the floating menus (comma-separated)\n */\n @property({ attribute: 'selectors-floating-menus' })\n selectorsFloatingMenus: string = '';\n\n /**\n * Specify a CSS selector that matches the DOM element that should be focused when the Modal opens\n */\n @property({ attribute: 'selector-primary-focus' })\n selectorPrimaryFocus: string = '';\n\n /**\n * Prevents the modal from closing when clicking outside\n */\n @property({ type: Boolean, attribute: 'prevent-close-on-click-outside' })\n preventCloseOnClickOutside: boolean = false;\n\n /**\n * Unique ID for this tearsheet instance\n */\n private uniqueId: string = `tearsheet-${Math.random().toString(36).substr(2, 9)}`;\n\n /**\n * Internal flag to track if stacking is enabled (via wrapper)\n */\n private _stackingEnabled: boolean = false;\n\n /**\n * Internal state for tracking if the tearsheet is in small screen mode\n */\n @state()\n private isSm: boolean = false;\n\n /**\n * Query the modal body element\n */\n @query('cds-modal-body')\n private modalBodyElement?: HTMLElement;\n\n private smMediaQuery = `(max-width: ${breakpoints.md.width})`;\n private isSmallDevice = new MatchMediaController(\n this,\n this.smMediaQuery,\n false\n );\n /**\n * Checks if the tearsheet has a decorator (AI label or other)\n */\n private get hasDecorator(): boolean {\n const headerElement = this.querySelector(`${prefix}-tearsheet-header`);\n if (!headerElement) {\n return false;\n }\n const decorator = headerElement.querySelector('[slot=\"decorator\"]');\n return !!decorator;\n }\n\n /**\n * Checks if the tearsheet has an AI label decorator\n */\n private get hasAILabel(): boolean {\n const headerElement = this.querySelector(`${prefix}-tearsheet-header`);\n if (!headerElement) {\n return false;\n }\n const decorator = headerElement.querySelector('[slot=\"decorator\"]');\n if (!decorator) {\n return false;\n }\n const tagName = decorator.tagName.toLowerCase();\n return tagName === 'cds-ai-label' || tagName === `${prefix}-ai-label`;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Listen for stack wrapper events first\n this.addEventListener(\n `${prefix}-tearsheet-stack-connected`,\n this.handleStackConnected as EventListener\n );\n this.addEventListener(\n `${prefix}-tearsheet-stack-step-size-changed`,\n this.handleStackStepSizeChanged as EventListener\n );\n\n // Check if this tearsheet is wrapped in a stack provider\n // This handles the case where the stack wrapper connected before this tearsheet\n this._checkForStackWrapper();\n\n // Set visibility class\n if (this.open) {\n this.classList.add('is-visible');\n } else {\n this.classList.remove('is-visible');\n }\n\n // Listen for close button click from header\n this.addEventListener(\n `${prefix}-tearsheet-header-close-button-clicked`,\n this.handleHeaderCloseButtonClick as EventListener\n );\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.updateCSSCustomProperties();\n this.isSm = this.isSmallDevice?.matches || this.variant === 'narrow';\n // Initialize all signals on first update\n updateTearsheetSignals({\n variant: this.variant,\n isSm: this.isSm,\n open: this.open,\n hasAILabel: this.hasAILabel,\n });\n }\n\n protected updated(_changedProperties: PropertyValues): void {\n this.updateIsSmState(_changedProperties);\n this.handleOpenPropertyChange(_changedProperties);\n this.updateCSSPropertiesIfNeeded(_changedProperties);\n\n if (_changedProperties.has('variant')) {\n updateTearsheetSignals({ variant: this.variant });\n }\n\n if (_changedProperties.has('isSm')) {\n this.updateInfluencerVisibility();\n }\n\n this.updateStackPropertiesIfNeeded();\n }\n\n private updateIsSmState(_changedProperties: PropertyValues): void {\n const previousIsSm = this.isSm;\n this.isSm = this.isSmallDevice?.matches || this.variant === 'narrow';\n\n if (this.isSm !== previousIsSm) {\n updateTearsheetSignals({ isSm: this.isSm });\n }\n }\n\n private handleOpenPropertyChange(_changedProperties: PropertyValues): void {\n if (!_changedProperties.has('open')) {\n return;\n }\n\n updateTearsheetSignals({ open: this.open });\n\n // Only register with stack manager if stacking is enabled\n if (this._stackingEnabled && this.modalBodyElement) {\n stackManager.notifyStack(this.uniqueId, this.open, this.modalBodyElement);\n }\n\n this.classList.toggle('is-visible', this.open);\n\n // Only update stack properties if stacking is enabled\n if (this._stackingEnabled) {\n this.updateStackProperties();\n }\n }\n\n private updateCSSPropertiesIfNeeded(\n _changedProperties: PropertyValues\n ): void {\n const hasRelevantChanges =\n _changedProperties.has('influencerWidth') ||\n _changedProperties.has('summaryContentWidth') ||\n _changedProperties.has('verticalGap');\n\n if (hasRelevantChanges) {\n this.updateCSSCustomProperties();\n }\n }\n\n private updateStackPropertiesIfNeeded(): void {\n // Only update if stacking is enabled\n if (!this._stackingEnabled) {\n return;\n }\n\n const stackState = stackManager.state;\n if (stackState.stack.length > 0) {\n this.updateStackProperties();\n }\n }\n\n /**\n * Update CSS custom properties for stacking\n */\n private updateStackProperties(): void {\n const stackState = stackManager.state;\n const depth = stackManager.getDepth(this.uniqueId);\n const scaleFactor = stackManager.getScaleFactor(this.uniqueId);\n const blockSizeChange = stackManager.getBlockSizeChange(this.uniqueId);\n\n // Manage --stack-activated class on host element\n if (stackState.stack.length > 1) {\n this.classList.add(`${blockClass}--stack-activated`);\n } else {\n this.classList.remove(`${blockClass}--stack-activated`);\n }\n\n if (depth !== -1) {\n this.style.setProperty('--stack-depth', depth.toString());\n this.style.setProperty('--scale-factor', scaleFactor.toString());\n this.style.setProperty('--block-size-change', blockSizeChange);\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Remove event listeners\n this.removeEventListener(\n `${prefix}-tearsheet-header-close-button-clicked`,\n this.handleHeaderCloseButtonClick as EventListener\n );\n this.removeEventListener(\n `${prefix}-tearsheet-stack-connected`,\n this.handleStackConnected as EventListener\n );\n this.removeEventListener(\n `${prefix}-tearsheet-stack-step-size-changed`,\n this.handleStackStepSizeChanged as EventListener\n );\n\n // Notify stack manager that this tearsheet is closing (only if stacking was enabled)\n if (this._stackingEnabled) {\n stackManager.notifyStack(this.uniqueId, false, null);\n }\n\n // Clean up CSS custom properties\n if (this.influencerWidth) {\n document.documentElement.style.removeProperty(\n '--tearsheet-influencer-width'\n );\n }\n if (this.summaryContentWidth) {\n document.documentElement.style.removeProperty(\n '--tearsheet-summary-content-width'\n );\n }\n if (this.verticalGap) {\n document.documentElement.style.removeProperty('--tearsheet-vertical-gap');\n }\n }\n\n /**\n * Update CSS custom properties for dynamic styling\n */\n private updateCSSCustomProperties(): void {\n if (this.influencerWidth) {\n document.documentElement.style.setProperty(\n '--tearsheet-influencer-width',\n this.influencerWidth\n );\n }\n if (this.summaryContentWidth) {\n document.documentElement.style.setProperty(\n '--tearsheet-summary-content-width',\n this.summaryContentWidth\n );\n }\n if (this.verticalGap) {\n document.documentElement.style.setProperty(\n '--tearsheet-vertical-gap',\n this.verticalGap\n );\n }\n }\n\n /**\n * Update influencer visibility based on slot content and screen size\n * Handles both slot changes and screen size changes\n */\n private updateInfluencerVisibility(slot?: HTMLSlotElement): void {\n const influencerSlot =\n slot ||\n (this.shadowRoot?.querySelector(\n 'slot[name=\"influencer\"]'\n ) as HTMLSlotElement);\n\n if (!influencerSlot) {\n return;\n }\n\n const hasContent =\n influencerSlot.assignedNodes({ flatten: true }).length > 0;\n const shouldShow = hasContent && !this.isSm;\n\n // Update CSS class on modal body\n if (this.modalBodyElement) {\n if (shouldShow) {\n this.modalBodyElement.classList.add(\n `${blockClass}__body-layout--has-influencer`\n );\n } else {\n this.modalBodyElement.classList.remove(\n `${blockClass}__body-layout--has-influencer`\n );\n }\n }\n }\n\n /**\n * Check if this tearsheet is wrapped in a stack provider\n */\n private _checkForStackWrapper(): void {\n // Check if there's a c4p-tearsheet-stack ancestor\n let parent = this.parentElement;\n while (parent) {\n if (parent.tagName.toLowerCase() === `${prefix}-tearsheet-stack`) {\n this._stackingEnabled = true;\n return;\n }\n parent = parent.parentElement;\n }\n this._stackingEnabled = false;\n }\n\n /**\n * Handle stack wrapper connected event\n */\n private handleStackConnected = (event: Event) => {\n event.stopPropagation();\n this._stackingEnabled = true;\n };\n\n /**\n * Handle stack step size changed event\n */\n private handleStackStepSizeChanged = (event: Event) => {\n event.stopPropagation();\n // Stack manager is already updated by the wrapper\n // Just trigger a re-render of stack properties if needed\n if (this._stackingEnabled && this.open) {\n this.updateStackProperties();\n }\n };\n\n /**\n * Handle influencer slot change\n */\n private handleInfluencerSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement;\n this.updateInfluencerVisibility(slot);\n };\n\n /**\n * Common method to handle tearsheet close with proper event dispatching\n * @param originalEvent - The original event that triggered the close (optional)\n * @param useAsync - Whether to dispatch closed event asynchronously\n */\n private closeTearsheet(originalEvent?: Event, useAsync: boolean = false) {\n // Dispatch the beingclosed event (cancelable)\n const beforeCloseEvent = new CustomEvent(\n `${prefix}-preview-tearsheet-beingclosed`,\n {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {},\n }\n );\n\n if (!this.dispatchEvent(beforeCloseEvent)) {\n // If event was cancelled, prevent closing\n if (originalEvent) {\n originalEvent.preventDefault();\n }\n return;\n }\n\n // Close the tearsheet\n this.open = false;\n\n // Dispatch closed event\n const dispatchClosedEvent = () => {\n this.dispatchEvent(\n new CustomEvent(`${prefix}-preview-tearsheet-closed`, {\n bubbles: true,\n composed: true,\n detail: {},\n })\n );\n };\n\n if (useAsync) {\n // Use microtask for async scenarios (e.g., click outside)\n Promise.resolve().then(dispatchClosedEvent);\n } else {\n dispatchClosedEvent();\n }\n }\n\n /**\n * Handle close button click from the header\n * This is an internal event that triggers the tearsheet to close\n */\n private handleHeaderCloseButtonClick = (event: Event) => {\n // Stop the internal event from propagating\n event.stopPropagation();\n this.closeTearsheet();\n };\n\n /**\n * Handle close event from the modal (ESC key, click outside, etc.)\n */\n private handleClose = (event: Event) => {\n this.closeTearsheet(event, true);\n };\n\n /**\n * Parse floating menu selectors from comma-separated string\n */\n private getFloatingMenuSelectors(): string {\n const defaultSelectors = [\n `.${prefix}--overflow-menu-options`,\n `.${prefix}--tooltip`,\n '.flatpickr-calendar',\n `.${blockClass}__container`,\n `.${prefix}--menu`,\n ];\n\n const customSelectors = this.selectorsFloatingMenus\n ? this.selectorsFloatingMenus.split(',').map((s) => s.trim())\n : [];\n\n return [...defaultSelectors, ...customSelectors].join(',');\n }\n\n render() {\n const classes = classMap({\n [blockClass]: true,\n [`${blockClass}--wide`]: this.variant === 'wide',\n [`${blockClass}--narrow`]: this.variant === 'narrow',\n [`${blockClass}--has-ai-label`]: this.hasAILabel,\n [`${blockClass}--has-decorator`]: this.hasDecorator && !this.hasAILabel,\n });\n\n const containerClasses = `${blockClass}__container ${this.containerClassName}`;\n\n return html`<cds-modal\n class=${classes}\n size=${this.variant === 'narrow' ? 'sm' : 'lg'}\n ?open=\"${this.open}\"\n container-class=\"${containerClasses}\"\n ?prevent-close-on-click-outside=\"${this.preventCloseOnClickOutside}\"\n aria-label=\"${ifDefined(this.ariaLabel || undefined)}\"\n selector-primary-focus=\"${ifDefined(\n this.selectorPrimaryFocus || undefined\n )}\"\n selectors-floating-menus=\"${this.getFloatingMenuSelectors()}\"\n @cds-modal-beingclosed=\"${this.handleClose}\"\n @cds-modal-closed=\"${this.handleClose}\"\n ?full-width=\"${true}\"\n ai-label=\"${ifDefined(this.hasAILabel || undefined)}\"\n >\n <slot name=\"decorator\"></slot>\n <slot name=\"header\"></slot>\n <cds-modal-body class=\"${blockClass}__body-layout\">\n <slot\n name=\"influencer\"\n @slotchange=${this.handleInfluencerSlotChange}\n ></slot>\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n </cds-modal-body>\n </cds-modal>`;\n }\n\n static styles = styles;\n}\n\nexport default CDSTearsheet;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAA,eAAA,MACM,qBAAqB,cAAc,kBAAkB,WAAW,CAAC,CAAC;;;cAKtD;4BA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e"}
1
+ {"version":3,"file":"tearsheet.js","names":["styles","customElement"],"sources":["../../../src/components/tearsheet-preview/tearsheet.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 { LitElement, PropertyValues, html } from 'lit';\nimport { property, state, query } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './tearsheet.scss?lit';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport { classMap } from 'lit-html/directives/class-map.js';\nimport { MatchMediaController } from '../../globals/js/utils/match-media-controller';\nimport { breakpoints } from '@carbon/layout';\nimport { blockClass, updateTearsheetSignals } from './tearsheet-signal';\nimport { SignalWatcher } from '@lit-labs/signals';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { stackManager } from './stack-signal';\nimport {\n trapFocus,\n clearFocusableContainers,\n} from '../../utilities/manageFocusTrap/manageFocusTrap';\n\n/**\n * Tearsheet component - A slide-out panel for displaying detailed content.\n *\n * @element c4p-preview-tearsheet\n * @slot header - The header content of the tearsheet\n * @slot influencer - Optional left sidebar content (wide variant only)\n * @slot body - Main body content\n * @slot footer - Footer content with actions\n * @fires c4p-preview-tearsheet-beingclosed - Fired when the tearsheet is about to close\n * @fires c4p-preview-tearsheet-closed - Fired after the tearsheet has closed\n */\n@customElement(`${prefix}-preview-tearsheet`)\nclass CDSTearsheet extends SignalWatcher(HostListenerMixin(LitElement)) {\n /**\n * Specifies whether the tearsheet is currently open.\n */\n @property({ type: Boolean, reflect: true })\n open: boolean = false;\n\n /**\n * User can pass any class names that will be added to the modal container\n */\n @property({ attribute: 'container-class-name' })\n containerClassName: string = '';\n\n /**\n * Default influencer takes 256px, this allows override eg: 300px, 20rem\n */\n @property({ attribute: 'influencer-width' })\n influencerWidth: string = '';\n\n /**\n * Default summary content takes 256px, this allows override eg: 300px, 20rem\n */\n @property({ attribute: 'summary-content-width' })\n summaryContentWidth: string = '';\n\n /**\n * Defines the gap from top of the viewport. Defaulted to 3rem\n */\n @property({ attribute: 'vertical-gap' })\n verticalGap: string = '';\n\n /**\n * Default to wide variant. Pass in narrow for narrow tearsheet\n */\n @property({ reflect: true })\n variant: 'wide' | 'narrow' = 'wide';\n\n /**\n * Specify the CSS selectors that match the floating menus (comma-separated)\n */\n @property({ attribute: 'selectors-floating-menus' })\n selectorsFloatingMenus: string = '';\n\n /**\n * Specify a CSS selector that matches the DOM element that should be focused when the Modal opens\n */\n @property({ attribute: 'selector-primary-focus' })\n selectorPrimaryFocus: string = '';\n\n /**\n * Prevents the modal from closing when clicking outside\n */\n @property({ type: Boolean, attribute: 'prevent-close-on-click-outside' })\n preventCloseOnClickOutside: boolean = false;\n\n /**\n * Optional ref to the trigger button that opened the tearsheet. Focus will return here when tearsheet closes.\n */\n @property({ attribute: false })\n launcherButtonRef?: HTMLElement;\n\n /**\n * Unique ID for this tearsheet instance\n */\n private uniqueId: string = `tearsheet-${Math.random().toString(36).substr(2, 9)}`;\n\n /**\n * Internal flag to track if stacking is enabled (via wrapper)\n */\n private _stackingEnabled: boolean = false;\n\n /**\n * Internal state for tracking if the tearsheet is in small screen mode\n */\n @state()\n private isSm: boolean = false;\n\n /**\n * Query the modal body element\n */\n @query('cds-modal-body')\n private modalBodyElement?: HTMLElement;\n\n private _trapFocusAPI: { cleanup: () => void } | null = null;\n private _wasOpen = false;\n /**\n * Query the header content element to get its titleId\n */\n @query(`${prefix}-tearsheet-header-content`)\n private headerContentElement?: any;\n\n private smMediaQuery = `(max-width: ${breakpoints.md.width})`;\n private isSmallDevice = new MatchMediaController(\n this,\n this.smMediaQuery,\n false\n );\n /**\n * Checks if the tearsheet has a decorator (AI label or other)\n */\n private get hasDecorator(): boolean {\n const headerElement = this.querySelector(`${prefix}-tearsheet-header`);\n if (!headerElement) {\n return false;\n }\n const decorator = headerElement.querySelector('[slot=\"decorator\"]');\n return !!decorator;\n }\n\n /**\n * Checks if the tearsheet has an AI label decorator\n */\n private get hasAILabel(): boolean {\n const headerElement = this.querySelector(`${prefix}-tearsheet-header`);\n if (!headerElement) {\n return false;\n }\n const decorator = headerElement.querySelector('[slot=\"decorator\"]');\n if (!decorator) {\n return false;\n }\n const tagName = decorator.tagName.toLowerCase();\n return tagName === 'cds-ai-label' || tagName === `${prefix}-ai-label`;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Listen for stack wrapper events first\n this.addEventListener(\n `${prefix}-tearsheet-stack-connected`,\n this.handleStackConnected as EventListener\n );\n this.addEventListener(\n `${prefix}-tearsheet-stack-step-size-changed`,\n this.handleStackStepSizeChanged as EventListener\n );\n\n // Check if this tearsheet is wrapped in a stack provider\n // This handles the case where the stack wrapper connected before this tearsheet\n this._checkForStackWrapper();\n\n // Set visibility class\n if (this.open) {\n this.classList.add('is-visible');\n } else {\n this.classList.remove('is-visible');\n }\n\n // Listen for close button click from header\n this.addEventListener(\n `${prefix}-tearsheet-header-close-button-clicked`,\n this.handleHeaderCloseButtonClick as EventListener\n );\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.updateCSSCustomProperties();\n this.isSm = this.isSmallDevice?.matches || this.variant === 'narrow';\n // Initialize all signals on first update, including uniqueId so children can register\n updateTearsheetSignals({\n variant: this.variant,\n isSm: this.isSm,\n open: this.open,\n hasAILabel: this.hasAILabel,\n uniqueId: this.uniqueId,\n });\n }\n\n protected updated(_changedProperties: PropertyValues): void {\n this.updateIsSmState(_changedProperties);\n this.handleOpenPropertyChange(_changedProperties);\n this.updateCSSPropertiesIfNeeded(_changedProperties);\n\n if (_changedProperties.has('variant')) {\n updateTearsheetSignals({ variant: this.variant });\n }\n\n if (_changedProperties.has('isSm')) {\n this.updateInfluencerVisibility();\n }\n\n this.updateStackPropertiesIfNeeded();\n }\n\n private updateIsSmState(_changedProperties: PropertyValues): void {\n const previousIsSm = this.isSm;\n this.isSm = this.isSmallDevice?.matches || this.variant === 'narrow';\n\n if (this.isSm !== previousIsSm) {\n updateTearsheetSignals({ isSm: this.isSm });\n }\n }\n\n private handleOpenPropertyChange(_changedProperties: PropertyValues): void {\n if (!_changedProperties.has('open')) {\n return;\n }\n const wasOpen = this._wasOpen;\n const isOpen = this.open;\n\n updateTearsheetSignals({ open: this.open });\n\n // Only register with stack manager if stacking is enabled\n if (this._stackingEnabled && this.modalBodyElement) {\n stackManager.notifyStack(this.uniqueId, this.open, this.modalBodyElement);\n }\n\n this.classList.toggle('is-visible', this.open);\n\n // Only update stack properties if stacking is enabled\n if (this._stackingEnabled) {\n this.updateStackProperties();\n }\n\n // Initialize focus trap when tearsheet opens\n if (!wasOpen && isOpen) {\n // `focusableContainers` holds the containers where we can query DOM elements.\n // Our strategy here is to let child/slotted components register their containers,\n // which are then passed to `trapFocus`. This allows the utility to query elements\n // directly without being blocked by shadow DOM boundaries.\n\n // Update signal with current uniqueId FIRST so children can register\n updateTearsheetSignals({ uniqueId: this.uniqueId });\n\n // Use requestAnimationFrame to ensure child components have registered their containers\n requestAnimationFrame(() => {\n this._trapFocusAPI = trapFocus(this as HTMLElement, this.uniqueId);\n });\n }\n\n this._wasOpen = isOpen;\n // Return focus to launcher button when tearsheet closes\n if (!this.open && this.launcherButtonRef) {\n // Use a small delay to ensure the tearsheet has fully closed\n setTimeout(() => {\n if (this.launcherButtonRef instanceof HTMLElement) {\n // Check if the button is inside a TearsheetHeaderActions component\n const headerActionItem = this.launcherButtonRef.closest(\n `.${blockClass}__header-action-item`\n );\n\n if (headerActionItem) {\n // This is a button inside TearsheetHeaderActions\n // Check if it's currently visible or if items are collapsed to menu\n const headerActionsContainer = headerActionItem.closest(\n `.${blockClass}__content__header-actions`\n );\n const menuButton = headerActionsContainer?.querySelector(\n `.${blockClass}__header-actions-menuButton:not(.${blockClass}__header-actions-menuButton--hidden) button`\n );\n\n if (menuButton instanceof HTMLElement) {\n // On small screens, action buttons collapse to menu - focus the menu button\n menuButton.focus();\n } else {\n // On large screens, focus the action button directly\n this.launcherButtonRef.focus();\n }\n } else {\n // Regular button ref (not inside TearsheetHeaderActions): focus directly\n this.launcherButtonRef.focus();\n }\n }\n }, 100);\n }\n }\n\n private updateCSSPropertiesIfNeeded(\n _changedProperties: PropertyValues\n ): void {\n const hasRelevantChanges =\n _changedProperties.has('influencerWidth') ||\n _changedProperties.has('summaryContentWidth') ||\n _changedProperties.has('verticalGap');\n\n if (hasRelevantChanges) {\n this.updateCSSCustomProperties();\n }\n }\n\n private updateStackPropertiesIfNeeded(): void {\n // Only update if stacking is enabled\n if (!this._stackingEnabled) {\n return;\n }\n\n const stackState = stackManager.state;\n if (stackState.stack.length > 0) {\n this.updateStackProperties();\n }\n }\n\n /**\n * Update CSS custom properties for stacking\n */\n private updateStackProperties(): void {\n const stackState = stackManager.state;\n const depth = stackManager.getDepth(this.uniqueId);\n const scaleFactor = stackManager.getScaleFactor(this.uniqueId);\n const blockSizeChange = stackManager.getBlockSizeChange(this.uniqueId);\n\n // Manage --stack-activated class on host element\n if (stackState.stack.length > 1) {\n this.classList.add(`${blockClass}--stack-activated`);\n } else {\n this.classList.remove(`${blockClass}--stack-activated`);\n }\n\n if (depth !== -1) {\n this.style.setProperty('--stack-depth', depth.toString());\n this.style.setProperty('--scale-factor', scaleFactor.toString());\n this.style.setProperty('--block-size-change', blockSizeChange);\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // Cleanup focus trap and clear all registered containers\n this._trapFocusAPI?.cleanup();\n\n clearFocusableContainers();\n\n // Remove event listeners\n this.removeEventListener(\n `${prefix}-tearsheet-header-close-button-clicked`,\n this.handleHeaderCloseButtonClick as EventListener\n );\n this.removeEventListener(\n `${prefix}-tearsheet-stack-connected`,\n this.handleStackConnected as EventListener\n );\n this.removeEventListener(\n `${prefix}-tearsheet-stack-step-size-changed`,\n this.handleStackStepSizeChanged as EventListener\n );\n\n // Notify stack manager that this tearsheet is closing (only if stacking was enabled)\n if (this._stackingEnabled) {\n stackManager.notifyStack(this.uniqueId, false, null);\n }\n\n // Clean up CSS custom properties\n if (this.influencerWidth) {\n document.documentElement.style.removeProperty(\n '--tearsheet-influencer-width'\n );\n }\n if (this.summaryContentWidth) {\n document.documentElement.style.removeProperty(\n '--tearsheet-summary-content-width'\n );\n }\n if (this.verticalGap) {\n document.documentElement.style.removeProperty('--tearsheet-vertical-gap');\n }\n }\n\n /**\n * Update CSS custom properties for dynamic styling\n */\n private updateCSSCustomProperties(): void {\n if (this.influencerWidth) {\n document.documentElement.style.setProperty(\n '--tearsheet-influencer-width',\n this.influencerWidth\n );\n }\n if (this.summaryContentWidth) {\n document.documentElement.style.setProperty(\n '--tearsheet-summary-content-width',\n this.summaryContentWidth\n );\n }\n if (this.verticalGap) {\n document.documentElement.style.setProperty(\n '--tearsheet-vertical-gap',\n this.verticalGap\n );\n }\n }\n\n /**\n * Update influencer visibility based on slot content and screen size\n * Handles both slot changes and screen size changes\n */\n private updateInfluencerVisibility(slot?: HTMLSlotElement): void {\n const influencerSlot =\n slot ||\n (this.shadowRoot?.querySelector(\n 'slot[name=\"influencer\"]'\n ) as HTMLSlotElement);\n\n if (!influencerSlot) {\n return;\n }\n\n const hasContent =\n influencerSlot.assignedNodes({ flatten: true }).length > 0;\n const shouldShow = hasContent && !this.isSm;\n\n // Update CSS class on modal body\n if (this.modalBodyElement) {\n if (shouldShow) {\n this.modalBodyElement.classList.add(\n `${blockClass}__body-layout--has-influencer`\n );\n } else {\n this.modalBodyElement.classList.remove(\n `${blockClass}__body-layout--has-influencer`\n );\n }\n }\n }\n\n /**\n * Check if this tearsheet is wrapped in a stack provider\n */\n private _checkForStackWrapper(): void {\n // Check if there's a c4p-tearsheet-stack ancestor\n let parent = this.parentElement;\n while (parent) {\n if (parent.tagName.toLowerCase() === `${prefix}-tearsheet-stack`) {\n this._stackingEnabled = true;\n return;\n }\n parent = parent.parentElement;\n }\n this._stackingEnabled = false;\n }\n\n /**\n * Handle stack wrapper connected event\n */\n private handleStackConnected = (event: Event) => {\n event.stopPropagation();\n this._stackingEnabled = true;\n };\n\n /**\n * Handle stack step size changed event\n */\n private handleStackStepSizeChanged = (event: Event) => {\n event.stopPropagation();\n // Stack manager is already updated by the wrapper\n // Just trigger a re-render of stack properties if needed\n if (this._stackingEnabled && this.open) {\n this.updateStackProperties();\n }\n };\n\n /**\n * Handle influencer slot change\n */\n private handleInfluencerSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement;\n this.updateInfluencerVisibility(slot);\n };\n\n /**\n * Common method to handle tearsheet close with proper event dispatching\n * @param originalEvent - The original event that triggered the close (optional)\n * @param useAsync - Whether to dispatch closed event asynchronously\n */\n private closeTearsheet(originalEvent?: Event, useAsync: boolean = false) {\n // Dispatch the beingclosed event (cancelable)\n const beforeCloseEvent = new CustomEvent(\n `${prefix}-preview-tearsheet-beingclosed`,\n {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {},\n }\n );\n\n if (!this.dispatchEvent(beforeCloseEvent)) {\n // If event was cancelled, prevent closing\n if (originalEvent) {\n originalEvent.preventDefault();\n }\n return;\n }\n\n // Close the tearsheet\n this.open = false;\n\n // Dispatch closed event\n const dispatchClosedEvent = () => {\n this.dispatchEvent(\n new CustomEvent(`${prefix}-preview-tearsheet-closed`, {\n bubbles: true,\n composed: true,\n detail: {},\n })\n );\n };\n\n if (useAsync) {\n // Use microtask for async scenarios (e.g., click outside)\n Promise.resolve().then(dispatchClosedEvent);\n } else {\n dispatchClosedEvent();\n }\n }\n\n /**\n * Handle close button click from the header\n * This is an internal event that triggers the tearsheet to close\n */\n private handleHeaderCloseButtonClick = (event: Event) => {\n // Stop the internal event from propagating\n event.stopPropagation();\n this.closeTearsheet();\n };\n\n /**\n * Handle close event from the modal (ESC key, click outside, etc.)\n */\n private handleClose = (event: Event) => {\n this.closeTearsheet(event, true);\n };\n\n /**\n * Parse floating menu selectors from comma-separated string\n */\n private getFloatingMenuSelectors(): string {\n const defaultSelectors = [\n `.${prefix}--overflow-menu-options`,\n `.${prefix}--tooltip`,\n '.flatpickr-calendar',\n `.${blockClass}__container`,\n `.${prefix}--menu`,\n ];\n\n const customSelectors = this.selectorsFloatingMenus\n ? this.selectorsFloatingMenus.split(',').map((s) => s.trim())\n : [];\n\n return [...defaultSelectors, ...customSelectors].join(',');\n }\n\n render() {\n const classes = classMap({\n [blockClass]: true,\n [`${blockClass}--wide`]: this.variant === 'wide',\n [`${blockClass}--narrow`]: this.variant === 'narrow',\n [`${blockClass}--has-ai-label`]: this.hasAILabel,\n [`${blockClass}--has-decorator`]: this.hasDecorator && !this.hasAILabel,\n });\n\n const containerClasses = `${blockClass}__container ${this.containerClassName}`;\n\n const computedAriaLabelledby =\n !this.ariaLabel && this.headerContentElement?.titleId\n ? this.headerContentElement.titleId\n : undefined;\n\n return html`<cds-modal\n class=${classes}\n size=${this.variant === 'narrow' ? 'sm' : 'lg'}\n ?open=\"${this.open}\"\n container-class=\"${containerClasses}\"\n ?prevent-close-on-click-outside=\"${this.preventCloseOnClickOutside}\"\n aria-label=\"${ifDefined(this.ariaLabel || undefined)}\"\n aria-labelledby=\"${ifDefined(computedAriaLabelledby)}\"\n selector-primary-focus=\"${ifDefined(\n this.selectorPrimaryFocus || undefined\n )}\"\n selectors-floating-menus=\"${this.getFloatingMenuSelectors()}\"\n @cds-modal-beingclosed=\"${this.handleClose}\"\n @cds-modal-closed=\"${this.handleClose}\"\n ?full-width=\"${true}\"\n ai-label=\"${ifDefined(this.hasAILabel || undefined)}\"\n >\n <slot name=\"decorator\"></slot>\n <slot name=\"header\"></slot>\n <cds-modal-body class=\"${blockClass}__body-layout\">\n <slot\n name=\"influencer\"\n @slotchange=${this.handleInfluencerSlotChange}\n ></slot>\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n </cds-modal-body>\n </cds-modal>`;\n }\n\n static styles = styles;\n}\n\nexport default CDSTearsheet;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAA;YAM1C,SAAS,EAAE,WAAW,wBAAwB,CAAC,CAAA,EAAA,aAAA,WAAA,sBAAA,KAAA,EAAA;YAM/C,SAAS,EAAE,WAAW,oBAAoB,CAAC,CAAA,EAAA,aAAA,WAAA,mBAAA,KAAA,EAAA;YAM3C,SAAS,EAAE,WAAW,yBAAyB,CAAC,CAAA,EAAA,aAAA,WAAA,uBAAA,KAAA,EAAA;YAMhD,SAAS,EAAE,WAAW,gBAAgB,CAAC,CAAA,EAAA,aAAA,WAAA,eAAA,KAAA,EAAA;YAMvC,SAAS,EAAE,SAAS,MAAM,CAAC,CAAA,EAAA,aAAA,WAAA,WAAA,KAAA,EAAA;YAM3B,SAAS,EAAE,WAAW,4BAA4B,CAAC,CAAA,EAAA,aAAA,WAAA,0BAAA,KAAA,EAAA;YAMnD,SAAS,EAAE,WAAW,0BAA0B,CAAC,CAAA,EAAA,aAAA,WAAA,wBAAA,KAAA,EAAA;YAMjD,SAAS;CAAE,MAAM;CAAS,WAAW;CAAkC,CAAC,CAAA,EAAA,aAAA,WAAA,8BAAA,KAAA,EAAA;YAMxE,SAAS,EAAE,WAAW,OAAO,CAAC,CAAA,EAAA,aAAA,WAAA,qBAAA,KAAA,EAAA;YAgB9B,OAAO,CAAA,EAAA,aAAA,WAAA,QAAA,KAAA,EAAA;YAMP,MAAM,iBAAiB,CAAA,EAAA,aAAA,WAAA,oBAAA,KAAA,EAAA;YAQvB,MAAM,+BAAqC,CAAA,EAAA,aAAA,WAAA,wBAAA,KAAA,EAAA;2BAzF7CC,cAAc,wBAA8B,CAAA,EAAA,aAAA;AAilB7C,IAAA,oBAAe"}
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { css } from "lit";
9
9
  //#region src/components/tearsheet-preview/tearsheet.scss?lit
10
- var tearsheet_default = css(["@keyframes cds--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds--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--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--assistive-text,.cds--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}.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}.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-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, 3rem));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-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-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-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-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-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--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--modal-container--sm .cds--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--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);visibility:hidden}.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)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{padding-block-start:.75rem;transition:padding .24s cubic-bezier(0,0,.3,1)}.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--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--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:all .24s cubic-bezier(0,0,.3,1);visibility:hidden}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{align-items:center;font-size:var(--cds-label-02-font-size,.875rem);font-weight:var(--cds-label-02-font-weight,400);letter-spacing:var(--cds-label-02-letter-spacing,.16px);line-height:var(--cds-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}.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}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{margin-block-start:-.125rem}@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}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper{min-block-size:2.5rem;padding-block-end:.75rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__navigation-bar:before{background:var(--cds-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-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, 3rem) + var(--block-size-change));transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next__header-label{color:var(--cds-text-secondary,#525252);font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin-block-end:.25rem}.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}@media (max-width:41.98rem){.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-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 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-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);line-height:var(--cds-body-compact-01-line-height,1.28572)}.c4p--tearsheet__next__header--no-close-icon{display:none}.c4p--tearsheet__next__decorator{inset-block-start:.625rem;inset-inline-end:3rem;position:absolute}.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--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__header-actions{display:flex;justify-content:flex-end}.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-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__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:5rem;border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);grid-area:footer;overflow:hidden}@media (max-width:41.98rem){.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:4rem}}@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__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__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-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-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--narrow .c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=footer]){block-size:4rem}.c4p--tearsheet__next--has-ai-label::part(dialog){background:linear-gradient(to top,var(--cds-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent!important;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-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-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-ai-inner-shadow,rgba(69,137,255,.1))}: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-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, 3rem));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-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, 3rem));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 (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-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-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, 3rem) + var(--block-size-change));transform:scaleX(var(--scale-factor))}: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-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-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}"]);
10
+ var tearsheet_default = css(["@keyframes cds--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes cds--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes cds--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--layout--size-xs{--cds-layout-size-height-context:var(--cds-layout-size-height-xs,1.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xs{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xs,1.5rem))}.cds--layout-constraint--size__min-xs{--cds-layout-size-height-min:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout-constraint--size__max-xs{--cds-layout-size-height-max:var(--cds-layout-size-height-xs,1.5rem)}.cds--layout--size-sm{--cds-layout-size-height-context:var(--cds-layout-size-height-sm,2rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-sm{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-sm,2rem))}.cds--layout-constraint--size__min-sm{--cds-layout-size-height-min:var(--cds-layout-size-height-sm,2rem)}.cds--layout-constraint--size__max-sm{--cds-layout-size-height-max:var(--cds-layout-size-height-sm,2rem)}.cds--layout--size-md{--cds-layout-size-height-context:var(--cds-layout-size-height-md,2.5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-md{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-md,2.5rem))}.cds--layout-constraint--size__min-md{--cds-layout-size-height-min:var(--cds-layout-size-height-md,2.5rem)}.cds--layout-constraint--size__max-md{--cds-layout-size-height-max:var(--cds-layout-size-height-md,2.5rem)}.cds--layout--size-lg{--cds-layout-size-height-context:var(--cds-layout-size-height-lg,3rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-lg{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-lg,3rem))}.cds--layout-constraint--size__min-lg{--cds-layout-size-height-min:var(--cds-layout-size-height-lg,3rem)}.cds--layout-constraint--size__max-lg{--cds-layout-size-height-max:var(--cds-layout-size-height-lg,3rem)}.cds--layout--size-xl{--cds-layout-size-height-context:var(--cds-layout-size-height-xl,4rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-xl,4rem))}.cds--layout-constraint--size__min-xl{--cds-layout-size-height-min:var(--cds-layout-size-height-xl,4rem)}.cds--layout-constraint--size__max-xl{--cds-layout-size-height-max:var(--cds-layout-size-height-xl,4rem)}.cds--layout--size-2xl{--cds-layout-size-height-context:var(--cds-layout-size-height-2xl,5rem);--cds-layout-size-height:var(--cds-layout-size-height-context)}.cds--layout-constraint--size__default-2xl{--cds-layout-size-height:var(--cds-layout-size-height-context,var(--cds-layout-size-height-2xl,5rem))}.cds--layout-constraint--size__min-2xl{--cds-layout-size-height-min:var(--cds-layout-size-height-2xl,5rem)}.cds--layout-constraint--size__max-2xl{--cds-layout-size-height-max:var(--cds-layout-size-height-2xl,5rem)}.cds--layout--density-condensed{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-condensed,0.5rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-condensed{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-condensed,0.5rem))}.cds--layout-constraint--density__min-condensed{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout-constraint--density__max-condensed{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-condensed,0.5rem)}.cds--layout--density-normal{--cds-layout-density-padding-inline-context:var(--cds-layout-density-padding-inline-normal,1rem);--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context)}.cds--layout-constraint--density__default-normal{--cds-layout-density-padding-inline:var(--cds-layout-density-padding-inline-context,var(--cds-layout-density-padding-inline-normal,1rem))}.cds--layout-constraint--density__min-normal{--cds-layout-density-padding-inline-min:var(--cds-layout-density-padding-inline-normal,1rem)}.cds--layout-constraint--density__max-normal{--cds-layout-density-padding-inline-max:var(--cds-layout-density-padding-inline-normal,1rem)}:root{--cds-layout-size-height-xs:1.5rem;--cds-layout-size-height-sm:2rem;--cds-layout-size-height-md:2.5rem;--cds-layout-size-height-lg:3rem;--cds-layout-size-height-xl:4rem;--cds-layout-size-height-2xl:5rem;--cds-layout-size-height-min:0px;--cds-layout-size-height-max:999999999px;--cds-layout-density-padding-inline-condensed:0.5rem;--cds-layout-density-padding-inline-normal:1rem;--cds-layout-density-padding-inline-min:0px;--cds-layout-density-padding-inline-max:999999999px}.cds--assistive-text,.cds--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}.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}.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-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, 3rem));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-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-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-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-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-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--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--modal-container--sm .cds--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--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);visibility:hidden}.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)}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed{padding-block-start:.75rem;transition:padding .24s cubic-bezier(0,0,.3,1)}.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--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--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:all .24s cubic-bezier(0,0,.3,1);visibility:hidden}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-title{align-items:center;font-size:var(--cds-label-02-font-size,.875rem);font-weight:var(--cds-label-02-font-weight,400);letter-spacing:var(--cds-label-02-letter-spacing,.16px);line-height:var(--cds-label-02-line-height,1.28572);margin-block-start:.25rem;transition:all .24s cubic-bezier(0,0,.3,1)}.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}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__content__header-actions{margin-block-start:-.125rem}@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}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__header-content-wrapper{min-block-size:2.5rem;padding-block-end:.75rem}.c4p--tearsheet__next .c4p--tearsheet__next__header-collapsed .c4p--tearsheet__next__navigation-bar:before{background:var(--cds-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-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, 3rem) + var(--block-size-change));transform:scaleX(var(--scale-factor))}.c4p--tearsheet__next__header-label{color:var(--cds-text-secondary,#525252);font-size:var(--cds-label-01-font-size,.75rem);font-weight:var(--cds-label-01-font-weight,400);letter-spacing:var(--cds-label-01-letter-spacing,.32px);line-height:var(--cds-label-01-line-height,1.33333);margin-block-end:.25rem}.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-04-font-size,1.75rem);font-weight:var(--cds-heading-04-font-weight,400);letter-spacing:var(--cds-heading-04-letter-spacing,0);line-height:var(--cds-heading-04-line-height,1.28572)}@media (max-width:41.98rem){.c4p--tearsheet__next__header-title{font-size:var(--cds-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-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 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-body-compact-01-font-size,.875rem);font-weight:var(--cds-body-compact-01-font-weight,400);letter-spacing:var(--cds-body-compact-01-letter-spacing,.16px);line-height:var(--cds-body-compact-01-line-height,1.28572)}.c4p--tearsheet__next__header--no-close-icon{display:none}.c4p--tearsheet__next__decorator{inset-block-start:.625rem;inset-inline-end:3rem;position:absolute}.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--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__header-actions{display:flex;justify-content:flex-end}.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-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__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:5rem;border-block-start:1px solid var(--cds-border-subtle-01,#c6c6c6);grid-area:footer;overflow:hidden}@media (max-width:41.98rem){.c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) ::slotted([slot=footer]){block-size:4rem}}@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-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__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__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-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-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--narrow .c4p--tearsheet__next__footer,:host(c4p-preview-tearsheet) .c4p--tearsheet__next--narrow ::slotted([slot=footer]){block-size:4rem}.c4p--tearsheet__next--has-ai-label::part(dialog){background:linear-gradient(to top,var(--cds-layer),var(--cds-layer)) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,#78a9ff),var(--cds-ai-border-end,#d0e2ff)) border-box,linear-gradient(to top,var(--cds-layer),var(--cds-layer)) border-box;border:1px solid transparent!important;border-block-end:0;box-shadow:0 4px 10px 2px var(--cds-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-background,var(--cds-ai-popover-background,#fff)) 0,var(--cds-ai-aura-start,rgba(69,137,255,.1)) 0,15%,var(--cds-ai-aura-end,hsla(0,0%,100%,0)) 50%) padding-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) padding-box,linear-gradient(to bottom,var(--cds-ai-border-start,rgba(166,200,255,.64)),var(--cds-ai-border-end,#78a9ff)) border-box,linear-gradient(to top,var(--cds-background,var(--cds-ai-popover-background,#fff)),var(--cds-background,var(--cds-ai-popover-background,#fff))) border-box;box-shadow:inset 0 -80px 70px -65px var(--cds-ai-inner-shadow,rgba(69,137,255,.1))}:host ::slotted([slot=summary-content]:focus){outline:2px solid var(--cds-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-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, 3rem));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-border-subtle-01,#c6c6c6);inset-block-start:auto;max-block-size:calc(100% - var(--tearsheet-vertical-gap, 3rem));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 (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-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-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, 3rem) + var(--block-size-change));transform:scaleX(var(--scale-factor))}: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-heading-03-font-size,1.25rem);font-weight:var(--cds-heading-03-font-weight,400);letter-spacing:var(--cds-heading-03-letter-spacing,0);line-height:var(--cds-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}"]);
11
11
  //#endregion
12
12
  export { tearsheet_default as default };
13
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"tearsheet.scss.js","names":[],"sources":["../../../src/components/tearsheet-preview/tearsheet.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$css--plex: true !default;\n\n@use '@carbon/styles/scss/breakpoint' as *;\n@use '@carbon/styles/scss/motion' as *;\n@use '@carbon/styles/scss/spacing' as *;\n@use '@carbon/styles/scss/theme' as *;\n@use '@carbon/styles/scss/type';\n@use '@carbon/styles/scss/utilities';\n@use '@carbon/styles/scss/utilities/ai-gradient' as *;\n\n@use '@carbon/ibm-products-styles/scss/components/Tearsheet/_tearsheet_next.scss'\n as *;\n\n$c4p-prefix: 'c4p';\n$carbon-prefix: 'cds';\n\n$block-class__next: #{$c4p-prefix}--tearsheet__next;\n$motion-duration: $duration-moderate-02;\n\n@mixin collapsed-element {\n overflow: hidden;\n padding: 0;\n margin: 0;\n max-block-size: 0;\n opacity: 0;\n pointer-events: none;\n transition: all $motion-duration motion(entrance, expressive);\n}\n.#{$block-class__next}--has-ai-label::part(dialog) {\n border: 1px solid transparent !important; /* stylelint-disable-line declaration-no-important */\n\n /* override carbon ai removing background gradient */\n background:\n linear-gradient(to top, var(--cds-layer), var(--cds-layer)) padding-box,\n linear-gradient(\n to bottom,\n var(--cds-ai-border-start, #78a9ff),\n var(--cds-ai-border-end, #d0e2ff)\n )\n border-box,\n linear-gradient(to top, var(--cds-layer), var(--cds-layer)) border-box;\n border-block-end: 0;\n box-shadow: 0 4px 10px 2px $ai-drop-shadow;\n}\n\n.#{$block-class__next}__main-content {\n position: relative;\n\n &.#{$block-class__next}__flush {\n padding-inline: 0;\n }\n\n &.#{$block-class__next}__main-content--no-summary {\n grid-column: 1 / -1;\n }\n\n &.#{$block-class__next}__main-content--has-ai-label {\n @include ai-popover-gradient('default', 0, 'background');\n\n box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;\n }\n}\n\n:host ::slotted([slot='summary-content']) {\n @extend .#{$block-class__next}__summary-content;\n}\n\n:host ::slotted([slot='summary-content'][is-flush]) {\n padding-inline: 0;\n}\n:host(#{$c4p-prefix}-preview-tearsheet) {\n @media screen and (prefers-reduced-motion: reduce) {\n ::part(dialog) {\n align-self: flex-end;\n border: 1px solid $border-subtle-01;\n block-size: 100%;\n inset-block-start: auto;\n max-block-size: calc(\n 100% - var(--tearsheet-vertical-gap, #{$spacing-09})\n );\n transform: translate3d(0, min(95vh, 500px), 0);\n transition: none;\n }\n }\n\n ::part(dialog) {\n align-self: flex-end;\n border: 1px solid $border-subtle-01;\n block-size: 100%;\n inset-block-start: auto;\n max-block-size: calc(100% - var(--tearsheet-vertical-gap, #{$spacing-09}));\n transform: translate3d(0, min(95vh, 500px), 0);\n transition:\n transform $motion-duration motion(entrance, expressive),\n max-block-size $motion-duration motion(entrance, expressive);\n }\n\n ::slotted([slot='influencer']) {\n @extend .#{$block-class__next}__influencer;\n }\n\n ::slotted([slot='influencer'][is-flush]) {\n padding-inline: 0;\n }\n\n ::slotted([slot='body']) {\n @extend .#{$block-class__next}__body;\n }\n\n ::slotted([slot='footer']) {\n @extend .#{$block-class__next}__footer;\n }\n}\n:host(#{$c4p-prefix}-preview-tearsheet[open]) {\n ::part(dialog) {\n transform: translate3d(0, 0, 0);\n transition: transform $duration-moderate-02 motion(entrance, expressive);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n// This will set full screen height for tearsheets in mobile devices\n:host(:not(.#{$block-class__next}--stack-activated.is-visible)) {\n ::part(dialog) {\n @include breakpoint-down(md) {\n max-block-size: none;\n }\n }\n}\n\n// Stacking styles\n:host(\n #{$c4p-prefix}-preview-tearsheet.#{$block-class__next}--stack-activated.is-visible\n) {\n --overlay-color: #{$overlay};\n --overlay-alpha: 0.5;\n\n &::before {\n position: fixed;\n z-index: calc(#{utilities.z('modal')} - var(--stack-depth, 0));\n display: block;\n background: var(--overlay-color);\n content: '';\n inset: 0;\n opacity: calc(var(--overlay-alpha) - var(--stack-depth) * 0.1);\n pointer-events: none;\n\n transition:\n background-color $motion-duration motion(exit, expressive),\n opacity $motion-duration motion(exit, expressive);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n #{$carbon-prefix}-modal {\n background-color: transparent;\n }\n\n ::part(dialog) {\n max-block-size: calc(\n 100% - var(--tearsheet-vertical-gap, #{$spacing-09}) +\n var(--block-size-change)\n );\n transform: scaleX(var(--scale-factor));\n }\n}\n\n// Narrow variant styles\n:host(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n .#{$block-class__next}__header {\n padding-inline: $spacing-05;\n }\n\n .#{$block-class__next}__header.#{$block-class__next}__header-collapsed {\n .#{$block-class__next}__header-actions {\n display: none;\n }\n }\n\n .#{$block-class__next}__header-content-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n .#{$block-class__next}__header-title {\n @include type.type-style('heading-03');\n }\n\n .#{$block-class__next}__content__header-actions {\n justify-content: flex-start;\n margin-inline-end: 0;\n }\n\n .#{$block-class__next}__body {\n grid-template-columns: 1fr 0;\n }\n\n ::slotted([slot='influencer']),\n ::slotted([slot='summary-content']) {\n padding: 0 !important; /* stylelint-disable-line declaration-no-important */\n }\n}\n\n// Small screen styles\n@include breakpoint-down(md) {\n :host(#{$c4p-prefix}-preview-tearsheet) {\n ::slotted([slot='influencer']),\n ::slotted([slot='summary-content']) {\n padding: 0 !important; /* stylelint-disable-line declaration-no-important */\n }\n }\n}\n\n.#{$block-class__next}__header-label {\n @extend .#{$block-class__next}__header-label;\n}\n.#{$block-class__next}__header-title {\n @extend .#{$block-class__next}__header-title;\n}\n\n.#{$block-class__next}__header-description {\n @extend .#{$block-class__next}__header-description;\n}\n\n:host {\n #{$c4p-prefix}-side-panel::part(dialog) {\n @extend .#{$block-class__next}__side-panel; // Extend the side panel styles}\n }\n}\n\n:host-context(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n ::slotted([slot='summary-content']) {\n padding: 0;\n }\n}\n\n:host ::slotted([slot='footer']) {\n padding-block: 0;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"tearsheet.scss.js","names":[],"sources":["../../../src/components/tearsheet-preview/tearsheet.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$css--plex: true !default;\n\n@use '@carbon/styles/scss/breakpoint' as *;\n@use '@carbon/styles/scss/motion' as *;\n@use '@carbon/styles/scss/spacing' as *;\n@use '@carbon/styles/scss/theme' as *;\n@use '@carbon/styles/scss/type';\n@use '@carbon/styles/scss/utilities';\n@use '@carbon/styles/scss/utilities/ai-gradient' as *;\n@use '@carbon/styles/scss/utilities/focus-outline';\n\n@use '@carbon/ibm-products-styles/scss/components/Tearsheet/_tearsheet_next.scss'\n as *;\n\n$c4p-prefix: 'c4p';\n$carbon-prefix: 'cds';\n\n$block-class__next: #{$c4p-prefix}--tearsheet__next;\n$motion-duration: $duration-moderate-02;\n\n@mixin collapsed-element {\n overflow: hidden;\n padding: 0;\n margin: 0;\n max-block-size: 0;\n opacity: 0;\n pointer-events: none;\n transition: all $motion-duration motion(entrance, expressive);\n}\n.#{$block-class__next}--has-ai-label::part(dialog) {\n border: 1px solid transparent !important; /* stylelint-disable-line declaration-no-important */\n\n /* override carbon ai removing background gradient */\n background:\n linear-gradient(to top, var(--cds-layer), var(--cds-layer)) padding-box,\n linear-gradient(\n to bottom,\n var(--cds-ai-border-start, #78a9ff),\n var(--cds-ai-border-end, #d0e2ff)\n )\n border-box,\n linear-gradient(to top, var(--cds-layer), var(--cds-layer)) border-box;\n border-block-end: 0;\n box-shadow: 0 4px 10px 2px $ai-drop-shadow;\n}\n\n.#{$block-class__next}__main-content {\n position: relative;\n\n &.#{$block-class__next}__flush {\n padding-inline: 0;\n }\n\n &.#{$block-class__next}__main-content--no-summary {\n grid-column: 1 / -1;\n }\n\n &.#{$block-class__next}__main-content--has-ai-label {\n @include ai-popover-gradient('default', 0, 'background');\n\n box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;\n }\n}\n\n:host ::slotted([slot='summary-content']) {\n @extend .#{$block-class__next}__summary-content;\n}\n\n:host ::slotted([slot='summary-content']:focus) {\n @include focus-outline.focus-outline('outline');\n}\n\n:host ::slotted([slot='summary-content'][is-flush]) {\n padding-inline: 0;\n}\n:host(#{$c4p-prefix}-preview-tearsheet) {\n @media screen and (prefers-reduced-motion: reduce) {\n ::part(dialog) {\n align-self: flex-end;\n border: 1px solid $border-subtle-01;\n block-size: 100%;\n inset-block-start: auto;\n max-block-size: calc(\n 100% - var(--tearsheet-vertical-gap, #{$spacing-09})\n );\n transform: translate3d(0, min(95vh, 500px), 0);\n transition: none;\n }\n }\n\n ::part(dialog) {\n align-self: flex-end;\n border: 1px solid $border-subtle-01;\n block-size: 100%;\n inset-block-start: auto;\n max-block-size: calc(100% - var(--tearsheet-vertical-gap, #{$spacing-09}));\n transform: translate3d(0, min(95vh, 500px), 0);\n transition:\n transform $motion-duration motion(entrance, expressive),\n max-block-size $motion-duration motion(entrance, expressive);\n }\n\n ::slotted([slot='influencer']) {\n @extend .#{$block-class__next}__influencer;\n }\n\n ::slotted([slot='influencer'][is-flush]) {\n padding-inline: 0;\n }\n\n ::slotted([slot='body']) {\n @extend .#{$block-class__next}__body;\n }\n\n ::slotted([slot='footer']) {\n @extend .#{$block-class__next}__footer;\n }\n}\n:host(#{$c4p-prefix}-preview-tearsheet[open]) {\n ::part(dialog) {\n transform: translate3d(0, 0, 0);\n transition: transform $duration-moderate-02 motion(entrance, expressive);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n}\n\n// This will set full screen height for tearsheets in mobile devices\n:host(:not(.#{$block-class__next}--stack-activated.is-visible)) {\n ::part(dialog) {\n @include breakpoint-down(md) {\n max-block-size: none;\n }\n }\n}\n\n// Stacking styles\n:host(\n #{$c4p-prefix}-preview-tearsheet.#{$block-class__next}--stack-activated.is-visible\n) {\n --overlay-color: #{$overlay};\n --overlay-alpha: 0.5;\n\n &::before {\n position: fixed;\n z-index: calc(#{utilities.z('modal')} - var(--stack-depth, 0));\n display: block;\n background: var(--overlay-color);\n content: '';\n inset: 0;\n opacity: calc(var(--overlay-alpha) - var(--stack-depth) * 0.1);\n pointer-events: none;\n\n transition:\n background-color $motion-duration motion(exit, expressive),\n opacity $motion-duration motion(exit, expressive);\n\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n }\n\n #{$carbon-prefix}-modal {\n background-color: transparent;\n }\n\n ::part(dialog) {\n max-block-size: calc(\n 100% - var(--tearsheet-vertical-gap, #{$spacing-09}) +\n var(--block-size-change)\n );\n transform: scaleX(var(--scale-factor));\n }\n}\n\n// Narrow variant styles\n:host(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n .#{$block-class__next}__header {\n padding-inline: $spacing-05;\n }\n\n .#{$block-class__next}__header.#{$block-class__next}__header-collapsed {\n .#{$block-class__next}__header-actions {\n display: none;\n }\n }\n\n .#{$block-class__next}__header-content-wrapper {\n display: flex;\n flex-direction: column;\n }\n\n .#{$block-class__next}__header-title {\n @include type.type-style('heading-03');\n }\n\n .#{$block-class__next}__content__header-actions {\n justify-content: flex-start;\n margin-inline-end: 0;\n }\n\n .#{$block-class__next}__body {\n grid-template-columns: 1fr 0;\n }\n\n ::slotted([slot='influencer']),\n ::slotted([slot='summary-content']) {\n padding: 0 !important; /* stylelint-disable-line declaration-no-important */\n }\n}\n\n// Small screen styles\n@include breakpoint-down(md) {\n :host(#{$c4p-prefix}-preview-tearsheet) {\n ::slotted([slot='influencer']),\n ::slotted([slot='summary-content']) {\n padding: 0 !important; /* stylelint-disable-line declaration-no-important */\n }\n }\n}\n\n.#{$block-class__next}__header-label {\n @extend .#{$block-class__next}__header-label;\n}\n.#{$block-class__next}__header-title {\n @extend .#{$block-class__next}__header-title;\n}\n\n.#{$block-class__next}__header-description {\n @extend .#{$block-class__next}__header-description;\n}\n\n:host {\n #{$c4p-prefix}-side-panel::part(dialog) {\n @extend .#{$block-class__next}__side-panel; // Extend the side panel styles}\n }\n}\n\n:host-context(#{$c4p-prefix}-preview-tearsheet[variant='narrow']) {\n ::slotted([slot='summary-content']) {\n padding: 0;\n }\n}\n\n:host ::slotted([slot='footer']) {\n padding-block: 0;\n}\n"],"mappings":""}
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  //#region package.json
9
- var version = "0.41.1-rc.0";
9
+ var version = "0.42.0-rc.0";
10
10
  //#endregion
11
11
  export { version };
12
12
 
@@ -6,9 +6,127 @@
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- export declare const registerFocusableContainers: (container: any) => void;
10
- export declare const clearFocusableContainers: () => void;
11
- export declare const trapFocus: (containers?: HTMLElement[]) => {
9
+ /**
10
+ * Registers a focusable container to be included in the focus trap.
11
+ *
12
+ * This function allows child components to register their shadow roots or DOM elements
13
+ * so that the focus trap utility can query focusable elements within them. This is necessary
14
+ * because shadow DOM boundaries prevent direct querying from parent components.
15
+ *
16
+ * @param container - The HTMLElement or ShadowRoot to register as a focusable container.
17
+ * If null, the function returns early without registering.
18
+ * @param uniqueId - Optional unique identifier to scope containers to a specific component instance.
19
+ * If not provided, uses a default key for backward compatibility.
20
+ *
21
+ * @example
22
+ * // In a child component's firstUpdated lifecycle
23
+ * protected firstUpdated() {
24
+ * const uniqueId = tearsheetSignal.get().uniqueId;
25
+ * registerFocusableContainers(this.shadowRoot, uniqueId);
26
+ * }
27
+ *
28
+ * @example
29
+ * // Without uniqueId (uses default key)
30
+ * registerFocusableContainers(this.shadowRoot);
31
+ */
32
+ export declare const registerFocusableContainers: (container: HTMLElement | ShadowRoot | null, uniqueId?: string) => void;
33
+ /**
34
+ * UnRegisters a previously registered focusable container.
35
+ *
36
+ * This function should be called in the component's disconnectedCallback lifecycle method
37
+ * to clean up and prevent memory leaks when the component is removed from the DOM.
38
+ *
39
+ * @param container - The HTMLElement or ShadowRoot to unregister.
40
+ * If null, the function returns early without doing anything.
41
+ * @param uniqueId - Optional unique identifier that was used when registering the container.
42
+ * If not provided, uses the default key.
43
+ *
44
+ * @example
45
+ * // In a child component's disconnectedCallback
46
+ * disconnectedCallback() {
47
+ * super.disconnectedCallback();
48
+ * const uniqueId = tearsheetSignal.get().uniqueId;
49
+ * unregisterFocusableContainers(this.shadowRoot, uniqueId);
50
+ * }
51
+ *
52
+ * @example
53
+ * // Without uniqueId (uses default key)
54
+ * disconnectedCallback() {
55
+ * super.disconnectedCallback();
56
+ * unregisterFocusableContainers(this.shadowRoot);
57
+ * }
58
+ */
59
+ export declare const unregisterFocusableContainers: (container: HTMLElement | ShadowRoot | null, uniqueId?: string) => void;
60
+ /**
61
+ * Clears all registered focusable containers, either globally or for a specific uniqueId.
62
+ *
63
+ * This function is typically called when a parent component (like a tearsheet or modal) is closing
64
+ * or being removed from the DOM. It ensures all registered containers are cleaned up to prevent
65
+ * memory leaks.
66
+ *
67
+ * @param uniqueId - Optional unique identifier to clear containers for a specific component instance.
68
+ * If provided, only containers registered with this uniqueId are cleared.
69
+ * If not provided, ALL containers across all uniqueIds are cleared.
70
+ *
71
+ * @example
72
+ * // Clear containers for a specific tearsheet instance
73
+ * clearFocusableContainers(this.uniqueId);
74
+ *
75
+ * @example
76
+ * // Clear all containers (typically in disconnectedCallback)
77
+ * disconnectedCallback() {
78
+ * super.disconnectedCallback();
79
+ * this._trapFocusAPI?.cleanup();
80
+ * clearFocusableContainers();
81
+ * }
82
+ */
83
+ export declare const clearFocusableContainers: (uniqueId?: string) => void;
84
+ /**
85
+ * Traps keyboard focus within registered focusable containers.
86
+ *
87
+ * This function creates a focus trap that prevents Tab/Shift+Tab navigation from leaving
88
+ * the registered containers. When the user reaches the last focusable element and presses Tab,
89
+ * focus wraps to the first element, and vice versa with Shift+Tab.
90
+ *
91
+ * The function works with Shadow DOM by querying focusable elements from all registered
92
+ * containers, which can include shadow roots from child components.
93
+ *
94
+ * @param wrapper - Optional wrapper element to attach the keydown listener to.
95
+ * If not provided, defaults to document for backward compatibility.
96
+ * Using a specific wrapper can improve performance and scope the listener.
97
+ * @param uniqueId - Optional unique identifier to scope the focus trap to specific containers.
98
+ * If provided, only containers registered with this uniqueId are included.
99
+ * If not provided, uses the default key for backward compatibility.
100
+ *
101
+ * @returns An object with a `cleanup` method that removes event listeners.
102
+ * Call this method when the component is closing or unmounting.
103
+ *
104
+ * @example
105
+ * // In a parent component when opening
106
+ * protected updated(changedProps) {
107
+ * if (changedProps.has('open') && this.open) {
108
+ * // Update signal so children can register
109
+ * updateTearsheetSignals({ uniqueId: this.uniqueId });
110
+ *
111
+ * // Wait for children to register, then trap focus
112
+ * requestAnimationFrame(() => {
113
+ * this._trapFocusAPI = trapFocus(this as HTMLElement, this.uniqueId);
114
+ * });
115
+ * }
116
+ * }
117
+ *
118
+ * @example
119
+ * // Without uniqueId (uses default key)
120
+ * this._trapFocusAPI = trapFocus();
121
+ *
122
+ * @example
123
+ * // Cleanup when closing
124
+ * disconnectedCallback() {
125
+ * this._trapFocusAPI?.cleanup();
126
+ * clearFocusableContainers(this.uniqueId);
127
+ * }
128
+ */
129
+ export declare const trapFocus: (wrapper?: HTMLElement, uniqueId?: string) => {
12
130
  cleanup: () => void;
13
131
  };
14
132
  //# sourceMappingURL=manageFocusTrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manageFocusTrap.d.ts","sourceRoot":"","sources":["../../../src/utilities/manageFocusTrap/manageFocusTrap.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,eAAO,MAAM,2BAA2B,GAAI,cAAS,SAIpD,CAAC;AACF,eAAO,MAAM,wBAAwB,YAEpC,CAAC;AACF,eAAO,MAAM,SAAS,GAAI,aAAa,WAAW,EAAE;;CA0HnD,CAAC"}
1
+ {"version":3,"file":"manageFocusTrap.d.ts","sourceRoot":"","sources":["../../../src/utilities/manageFocusTrap/manageFocusTrap.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAkBH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,2BAA2B,GACtC,WAAW,WAAW,GAAG,UAAU,GAAG,IAAI,EAC1C,WAAW,MAAM,SAiBlB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,6BAA6B,GACxC,WAAW,WAAW,GAAG,UAAU,GAAG,IAAI,EAC1C,WAAW,MAAM,SAalB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB,GAAI,WAAW,MAAM,SAMzD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,SAAS,GAAI,UAAU,WAAW,EAAE,WAAW,MAAM;;CA8JjE,CAAC"}