@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
@@ -3317,7 +3317,22 @@
3317
3317
  "name": "c4p-page-header-tabs",
3318
3318
  "path": "./src/components/page-header/page-header-tabs.ts",
3319
3319
  "description": "Page header Tabs Bar.",
3320
+ "attributes": [
3321
+ {
3322
+ "name": "disable-sticky-tab-bar",
3323
+ "description": "Disable sticky positioning for the tab bar",
3324
+ "type": "boolean",
3325
+ "default": "false"
3326
+ }
3327
+ ],
3320
3328
  "properties": [
3329
+ {
3330
+ "name": "disableStickyTabBar",
3331
+ "attribute": "disable-sticky-tab-bar",
3332
+ "description": "Disable sticky positioning for the tab bar",
3333
+ "type": "boolean",
3334
+ "default": "false"
3335
+ },
3321
3336
  {
3322
3337
  "name": "styles",
3323
3338
  "default": "\"styles\""
@@ -3471,6 +3486,12 @@
3471
3486
  "type": "boolean",
3472
3487
  "default": "false"
3473
3488
  },
3489
+ {
3490
+ "name": "resizable",
3491
+ "description": "Determines if the side panel is resizable",
3492
+ "type": "boolean",
3493
+ "default": "false"
3494
+ },
3474
3495
  {
3475
3496
  "name": "title",
3476
3497
  "description": "Sets the title text"
@@ -3582,6 +3603,13 @@
3582
3603
  "type": "boolean",
3583
3604
  "default": "false"
3584
3605
  },
3606
+ {
3607
+ "name": "resizable",
3608
+ "attribute": "resizable",
3609
+ "description": "Determines if the side panel is resizable",
3610
+ "type": "boolean",
3611
+ "default": "false"
3612
+ },
3585
3613
  {
3586
3614
  "name": "title",
3587
3615
  "attribute": "title",
@@ -3970,6 +3998,11 @@
3970
3998
  "type": "string",
3971
3999
  "default": "\"\""
3972
4000
  },
4001
+ {
4002
+ "name": "titleId",
4003
+ "description": "Public getter for the title ID (used by parent tearsheet for aria-labelledby)",
4004
+ "type": "string"
4005
+ },
3973
4006
  {
3974
4007
  "name": "styles",
3975
4008
  "default": "\"styles\""
@@ -4169,6 +4202,12 @@
4169
4202
  "description": "In mobile screens left side influencer section won't be visible by default.\nThis prop can be toggled to open/close left panel in this case.",
4170
4203
  "type": "boolean",
4171
4204
  "default": "false"
4205
+ },
4206
+ {
4207
+ "name": "influencer-panel-aria-label",
4208
+ "description": "Optional aria-label for the influencer panel. Defaults to \"Influencer panel\".",
4209
+ "type": "string",
4210
+ "default": "\"Influencer panel\""
4172
4211
  }
4173
4212
  ],
4174
4213
  "properties": [
@@ -4191,6 +4230,13 @@
4191
4230
  "type": "boolean",
4192
4231
  "default": "false"
4193
4232
  },
4233
+ {
4234
+ "name": "influencerPanelAriaLabel",
4235
+ "attribute": "influencer-panel-aria-label",
4236
+ "description": "Optional aria-label for the influencer panel. Defaults to \"Influencer panel\".",
4237
+ "type": "string",
4238
+ "default": "\"Influencer panel\""
4239
+ },
4194
4240
  {
4195
4241
  "name": "enabledWarnings",
4196
4242
  "description": "Read or set all the enabled warning categories for this class.\n\nThis property is only used in development builds.",
@@ -4541,6 +4587,12 @@
4541
4587
  "description": "In mobile screens right side summary-content section won't be visible by default.\nThis prop can be toggled to open/close right panel in this case.",
4542
4588
  "type": "boolean",
4543
4589
  "default": "false"
4590
+ },
4591
+ {
4592
+ "name": "summary-panel-aria-label",
4593
+ "description": "Optional aria-label for the summary panel. Defaults to \"Summary panel\".",
4594
+ "type": "string",
4595
+ "default": "\"Summary panel\""
4544
4596
  }
4545
4597
  ],
4546
4598
  "properties": [
@@ -4563,6 +4615,13 @@
4563
4615
  "type": "boolean",
4564
4616
  "default": "false"
4565
4617
  },
4618
+ {
4619
+ "name": "summaryPanelAriaLabel",
4620
+ "attribute": "summary-panel-aria-label",
4621
+ "description": "Optional aria-label for the summary panel. Defaults to \"Summary panel\".",
4622
+ "type": "string",
4623
+ "default": "\"Summary panel\""
4624
+ },
4566
4625
  {
4567
4626
  "name": "enabledWarnings",
4568
4627
  "description": "Read or set all the enabled warning categories for this class.\n\nThis property is only used in development builds.",
@@ -4765,6 +4824,11 @@
4765
4824
  "type": "boolean",
4766
4825
  "default": "false"
4767
4826
  },
4827
+ {
4828
+ "name": "launcherButtonRef",
4829
+ "description": "Optional ref to the trigger button that opened the tearsheet. Focus will return here when tearsheet closes.",
4830
+ "type": "HTMLElement | undefined"
4831
+ },
4768
4832
  {
4769
4833
  "name": "enabledWarnings",
4770
4834
  "description": "Read or set all the enabled warning categories for this class.\n\nThis property is only used in development builds.",
@@ -20,7 +20,7 @@ declare const CDSCoachmarkBody_base: {
20
20
  };
21
21
  };
22
22
  };
23
- } & typeof LitElement;
23
+ } & typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
24
24
  /**
25
25
  * coachmark-body for content body
26
26
  * @element c4p-coachmark-body
@@ -21,7 +21,7 @@ declare const CDSCoachmarkHeader_base: {
21
21
  };
22
22
  };
23
23
  };
24
- } & typeof LitElement;
24
+ } & typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
25
25
  /**
26
26
  * coachmark-header for content header section
27
27
  * @element c4p-coachmark-header
@@ -22,7 +22,7 @@ declare const CDSCoachmark_base: {
22
22
  };
23
23
  };
24
24
  };
25
- } & typeof LitElement;
25
+ } & typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
26
26
  /**
27
27
  * coachmark main component
28
28
  * @element c4p-coachmark
@@ -7,8 +7,8 @@
7
7
 
8
8
  import "../../globals/settings.js";
9
9
  import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
10
- import { interstitialDetailsSignal, updateInterstitialDetailsSignal } from "./interstitial-screen-context.js";
11
10
  import { registerFocusableContainers } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
11
+ import { interstitialDetailsSignal, updateInterstitialDetailsSignal } from "./interstitial-screen-context.js";
12
12
  import interstitial_screen_body_item_default$1 from "./interstitial-screen-body-item.scss.js";
13
13
  import { LitElement, html } from "lit";
14
14
  import { property } from "lit/decorators.js";
@@ -21,7 +21,7 @@ declare const CDSInterstitialScreenBody_base: {
21
21
  };
22
22
  };
23
23
  };
24
- } & typeof LitElement;
24
+ } & typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
25
25
  /**
26
26
  * interstitial-screen-body for body section
27
27
  * @element c4p-interstitial-screen-body
@@ -25,7 +25,7 @@ declare const CDSInterstitialScreenFooter_base: {
25
25
  };
26
26
  };
27
27
  };
28
- } & typeof CDSModalFooter;
28
+ } & typeof CDSModalFooter & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
29
29
  /**
30
30
  * interstitial-screen-footer for footer section
31
31
  * @element c4p-interstitial-screen-footer
@@ -8,8 +8,8 @@
8
8
  import "../../globals/settings.js";
9
9
  import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
10
10
  import "../action-set/index.js";
11
- import { interstitialDetailsSignal } from "./interstitial-screen-context.js";
12
11
  import { registerFocusableContainers } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
12
+ import { interstitialDetailsSignal } from "./interstitial-screen-context.js";
13
13
  import interstitial_screen_footer_default$1 from "./interstitial-screen-footer.scss.js";
14
14
  import { html, nothing } from "lit";
15
15
  import { property, state } from "lit/decorators.js";
@@ -21,7 +21,7 @@ declare const CDSInterstitialScreenHeader_base: {
21
21
  };
22
22
  };
23
23
  };
24
- } & typeof LitElement;
24
+ } & typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
25
25
  /**
26
26
  * interstitial-screen-header for header section
27
27
  * @element c4p-interstitial-screen-header
@@ -7,8 +7,8 @@
7
7
 
8
8
  import "../../globals/settings.js";
9
9
  import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
10
- import { interstitialDetailsSignal } from "./interstitial-screen-context.js";
11
10
  import { registerFocusableContainers } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
11
+ import { interstitialDetailsSignal } from "./interstitial-screen-context.js";
12
12
  import interstitial_screen_header_default$1 from "./interstitial-screen-header.scss.js";
13
13
  import { LitElement, html, nothing } from "lit";
14
14
  import { property } from "lit/decorators.js";
@@ -28,7 +28,7 @@ declare const CDSInterstitialScreen_base: {
28
28
  };
29
29
  };
30
30
  };
31
- } & typeof LitElement;
31
+ } & typeof LitElement & (new (...args: any[]) => import("@lit-labs/signals").SignalWatcherApi);
32
32
  /**
33
33
  * interstitial-screen main component
34
34
  * @element c4p-interstitial-screen
@@ -1 +1 @@
1
- {"version":3,"file":"interstitial-screen.d.ts","sourceRoot":"","sources":["../../../src/components/interstitial-screen/interstitial-screen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,qDAAqD,CAAC;AAc7D,eAAO,MAAM,UAAU,6BAAmC,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;;;;;;;;;;uBAhBU,CAAC;;;;;AAiBb;;;;;;;;;GASG;AAEH,cACM,qBAAsB,SAAQ,0BAEnC;IACC;;;OAGG;IAGH,YAAY,EAAE,OAAO,CAAS;IAC9B;;OAEG;IAEH,IAAI,EAAE,OAAO,CAAS;IAGtB,WAAW,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;IAC9D;;OAEG;IACsB,SAAS,EAAG,WAAW,CAAC;IAEjD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAwC;IAE7D,iBAAiB;IAIjB,oBAAoB,IAAI,IAAI;IAK5B,YAAY;IAUZ,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC;IAyB5D,OAAO,CAAC,uBAAuB,CA2B7B;IAEF;;;;OAIG;IAGH,OAAO,CAAC,mBAAmB,CASzB;IAEF,OAAO,CAAC,uBAAuB,CAE7B;IAEF,YAAY,CAAC,CAAC,KAAA;IA2Cd,gBAAgB;IAUhB,WAAW;IAkBX,MAAM;IAQN,MAAM,CAAC,MAAM,MAAU;IAEvB,MAAM,KAAK,yBAAyB,WAEnC;IACD;;;;OAIG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IACH,MAAM,KAAK,UAAU,WAEpB;CACF;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"interstitial-screen.d.ts","sourceRoot":"","sources":["../../../src/components/interstitial-screen/interstitial-screen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,qDAAqD,CAAC;AAiB7D,eAAO,MAAM,UAAU,6BAAmC,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;;;;;;;;;;uBAnBU,CAAC;;;;;AAoBb;;;;;;;;;GASG;AAEH,cACM,qBAAsB,SAAQ,0BAEnC;IACC;;;OAGG;IAGH,YAAY,EAAE,OAAO,CAAS;IAC9B;;OAEG;IAEH,IAAI,EAAE,OAAO,CAAS;IAGtB,WAAW,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;IAC9D;;OAEG;IACsB,SAAS,EAAG,WAAW,CAAC;IAEjD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAwC;IAE7D,iBAAiB;IAIjB,oBAAoB,IAAI,IAAI;IAM5B,YAAY;IAUZ,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC;IAyB5D,OAAO,CAAC,uBAAuB,CA2B7B;IAEF;;;;OAIG;IAGH,OAAO,CAAC,mBAAmB,CASzB;IAEF,OAAO,CAAC,uBAAuB,CAE7B;IAEF,YAAY,CAAC,CAAC,KAAA;IA2Cd,gBAAgB;IAUhB,WAAW;IAkBX,MAAM;IAQN,MAAM,CAAC,MAAM,MAAU;IAEvB,MAAM,KAAK,yBAAyB,WAEnC;IACD;;;;OAIG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IACH,MAAM,KAAK,UAAU,WAEpB;CACF;AAED,eAAe,qBAAqB,CAAC"}
@@ -7,9 +7,9 @@
7
7
 
8
8
  import "../../globals/settings.js";
9
9
  import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
10
+ import { clearFocusableContainers, trapFocus } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
10
11
  import interstitial_screen_default$1 from "./interstitial-screen.scss.js";
11
12
  import { interstitialDetailsSignal, resetInterstitialDetailsSignal, updateInterstitialDetailsSignal } from "./interstitial-screen-context.js";
12
- import { trapFocus } from "../../utilities/manageFocusTrap/manageFocusTrap.js";
13
13
  import { LitElement, html, nothing } from "lit";
14
14
  import { property, query, state } from "lit/decorators.js";
15
15
  import HostListenerMixin from "@carbon/web-components/es/globals/mixins/host-listener.js";
@@ -84,6 +84,7 @@ let CDSInterstitialScreen = class CDSInterstitialScreen extends SignalWatcher(Ho
84
84
  const { carouselAPI } = interstitialDetailsSignal.get();
85
85
  carouselAPI?.destroyEvents?.();
86
86
  this._trapFocusAPI?.cleanup();
87
+ clearFocusableContainers();
87
88
  }
88
89
  firstUpdated() {
89
90
  this.requestUpdate();
@@ -1 +1 @@
1
- {"version":3,"file":"interstitial-screen.js","names":["styles","customElement"],"sources":["../../../src/components/interstitial-screen/interstitial-screen.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025\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, html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { carbonPrefix, prefix } from '../../globals/settings';\nimport '@carbon/web-components/es/components/modal/index.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nimport styles from './interstitial-screen.scss?lit';\nimport { SignalWatcher } from '@lit-labs/signals';\nimport {\n interstitialDetailsSignal,\n resetInterstitialDetailsSignal,\n updateInterstitialDetailsSignal,\n} from './interstitial-screen-context';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener';\nimport { trapFocus } from '../../utilities/manageFocusTrap/manageFocusTrap';\n\nexport const blockClass = `${prefix}--interstitial-screen`;\n\nexport type disableButtonConfigType = {\n skip?: boolean;\n back?: boolean;\n next?: boolean;\n start?: boolean;\n};\n/**\n * interstitial-screen main component\n * @element c4p-interstitial-screen\n * @fires c4p-interstitial-opened - The custom event triggered after loading the component.\n * Its event.detail will provide you with carousal api methods for step navigation and method to disable any action button\n * * @fires c4p-interstitial-beingclosed - The name of the custom event fired before interstitial is being closed upon a user gesture.\n * Cancellation of this event stops the user-initiated action of closing the interstitial.\n * @fires c4p-interstitial-closed - The name of the custom event fired after this tearsheet is closed upon a user gesture.\n\n */\n\n@customElement(`${prefix}-interstitial-screen`)\nclass CDSInterstitialScreen extends SignalWatcher(\n HostListenerMixin(LitElement)\n) {\n /**\n * Specifies whether the component is shown as a full-screen\n * experience, else it is shown as a modal by default.\n */\n\n @property({ type: Boolean, reflect: true, attribute: 'fullscreen' })\n isFullScreen: boolean = false;\n /**\n * Specifies whether the component is currently open.\n */\n @property({ type: Boolean, reflect: true })\n open: boolean = false;\n\n @state()\n stepDetails: Array<{ stepTitle: string; name?: string }> = [];\n /**\n * @ignore\n */\n @query('cds-modal-body') modalBody!: HTMLElement;\n\n private _wasOpen = false;\n private _trapFocusAPI: { cleanup: () => void } | null = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(`${prefix}-request-close`, this._handleClose);\n }\n disconnectedCallback(): void {\n const { carouselAPI } = interstitialDetailsSignal.get();\n carouselAPI?.destroyEvents?.();\n this._trapFocusAPI?.cleanup();\n }\n firstUpdated() {\n this.requestUpdate(); // Ensure re-render\n resetInterstitialDetailsSignal();\n\n updateInterstitialDetailsSignal({\n name: 'isFullScreen',\n detail: this.isFullScreen,\n });\n }\n\n updated(changedProps: Map<string | number | symbol, unknown>) {\n if (changedProps.has('open')) {\n const wasOpen = this._wasOpen;\n const isOpen = this.open;\n\n // Update the signal with the open state\n updateInterstitialDetailsSignal({\n name: 'open',\n detail: isOpen,\n });\n\n if (!wasOpen && isOpen) {\n this.dispatchInItializeEvent();\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 this._trapFocusAPI = trapFocus();\n }\n\n this._wasOpen = isOpen;\n }\n }\n\n private dispatchInItializeEvent = () => {\n setTimeout(() => {\n const { carouselAPI } = interstitialDetailsSignal.get();\n this.dispatchEvent(\n new CustomEvent(\n (\n this.constructor as typeof CDSInterstitialScreen\n ).eventOnInterstitialOpened,\n {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n carouselAPI: carouselAPI\n ? {\n next: carouselAPI.next,\n prev: carouselAPI.prev,\n reset: carouselAPI.reset,\n gotToStep: carouselAPI.goToIndex,\n }\n : undefined,\n setDisableActionButtons: this.setDisableActionButtons,\n },\n }\n )\n );\n });\n };\n\n /**\n * Handles `click` event on this element.\n *\n * @param event The event.\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleOutsideClick = (event: MouseEvent) => {\n const modal = this.shadowRoot?.querySelector(`${carbonPrefix}-modal`);\n const modalContent = modal?.shadowRoot?.querySelector(\n `.${carbonPrefix}--modal-container`\n );\n const path = event.composedPath();\n if (modalContent && !path.includes(modalContent)) {\n this._handleClose(event);\n }\n };\n\n private setDisableActionButtons = (config: disableButtonConfigType) => {\n updateInterstitialDetailsSignal({ name: 'disableActions', detail: config });\n };\n\n _handleClose(e) {\n this.open = false;\n e.stopPropagation();\n\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n triggeredBy: e.detail.triggeredBy,\n },\n };\n if (\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSInterstitialScreen).eventBeforeClose,\n init\n )\n )\n ) {\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSInterstitialScreen).eventClose,\n init\n )\n );\n\n // Reset carousel and step after close event is dispatched\n const { carouselAPI } = interstitialDetailsSignal.get();\n if (carouselAPI) {\n carouselAPI.reset();\n }\n\n // Reset the current step to 0\n updateInterstitialDetailsSignal({\n name: 'currentStep',\n detail: 0,\n });\n }\n }\n\n //template methods\n\n renderFullScreen() {\n return html`\n <div class=\"${blockClass}--container\">\n <slot name=\"header\"></slot>\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n renderModal() {\n return html`<cds-modal\n key=${this.open}\n ?prevent-close-on-click-outside=\"true\"\n class=${blockClass}\n size=\"lg\"\n ?open=\"${this.open}\"\n >\n <slot name=\"header\"></slot>\n <cds-modal-body class=\"${blockClass}__body-container\">\n <slot name=\"body\"></slot>\n </cds-modal-body>\n <cds-modal-footer>\n <slot name=\"footer\"></slot>\n </cds-modal-footer>\n </cds-modal>`;\n }\n\n render() {\n return this.open\n ? this.isFullScreen\n ? html`${this.renderFullScreen()}`\n : html`${this.renderModal()}`\n : nothing;\n }\n\n static styles = styles;\n\n static get eventOnInterstitialOpened() {\n return `${prefix}-interstitial-opened`;\n }\n /**\n \n * The name of the custom event fired before interstitial is being closed upon a user gesture.\n * Cancellation of this event stops the user-initiated action of closing the interstitial.\n */\n static get eventBeforeClose() {\n return `${prefix}-interstitial-beingclosed`;\n }\n\n /**\n * The name of the custom event fired after this tearsheet is closed upon a user gesture.\n */\n static get eventClose() {\n return `${prefix}-interstitial-closed`;\n }\n}\n\nexport default CDSInterstitialScreen;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,aAAa;;;;;;;;;;;AAmB1B,IAAA,wBAAA,MACM,8BAA8B,cAClC,kBAAkB,WAAW,CAC9B,CAAC;;;sBAOwB;cAKR;qBAG2C,EAAE;kBAM1C;uBACqC;uCA8ChB;AACtC,oBAAiB;IACf,MAAM,EAAE,gBAAgB,0BAA0B,KAAK;AACvD,SAAK,cACH,IAAI,YAEA,KAAK,YACL,2BACF;KACE,SAAS;KACT,YAAY;KACZ,UAAU;KACV,QAAQ;MACN,aAAa,cACT;OACE,MAAM,YAAY;OAClB,MAAM,YAAY;OAClB,OAAO,YAAY;OACnB,WAAW,YAAY;OACxB,GACD,KAAA;MACJ,yBAAyB,KAAK;MAC/B;KACF,CACF,CACF;KACD;;8BAU2B,UAAsB;GAEnD,MAAM,gBADQ,KAAK,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ACZ,SAAO,IAAI;YACH,KAAK,KAAK;;cAER,WAAW;;eAEV,KAAK,KAAK;;;+BAGM,WAAW;;;;;;;;CASxC,SAAS;AACP,SAAO,KAAK,OACR,KAAK,eACH,IAAI,GAAG,KAAK,kBAAkB,KAC9B,IAAI,GAAG,KAAK,aAAa,KAC3B;;;gBAGUA;;CAEhB,WAAW,4BAA4B;AACrC,SAAO;;;;;;;CAOT,WAAW,mBAAmB;AAC5B,SAAO;;;;;CAMT,WAAW,aAAa;AACtB,SAAO;;;YAlNR,SAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;CAAc,CAAC,CAAA,EAAA,sBAAA,WAAA,gBAAA,KAAA,EAAA;YAKnE,SAAS;CAAE,MAAM;CAAS,SAAS;CAAM,CAAC,CAAA,EAAA,sBAAA,WAAA,QAAA,KAAA,EAAA;YAG1C,OAAO,CAAA,EAAA,sBAAA,WAAA,eAAA,KAAA,EAAA;YAKP,MAAM,iBAAiB,CAAA,EAAA,sBAAA,WAAA,aAAA,KAAA,EAAA;YAmFvB,aAAa,QAAQ,CAAA,EAAA,sBAAA,WAAA,uBAAA,KAAA,EAAA;oCAzGvBC,cAAc,0BAAgC,CAAA,EAAA,sBAAA;AA+N/C,IAAA,8BAAe"}
1
+ {"version":3,"file":"interstitial-screen.js","names":["styles","customElement"],"sources":["../../../src/components/interstitial-screen/interstitial-screen.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025\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, html, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { carbonPrefix, prefix } from '../../globals/settings';\nimport '@carbon/web-components/es/components/modal/index.js';\nimport HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nimport styles from './interstitial-screen.scss?lit';\nimport { SignalWatcher } from '@lit-labs/signals';\nimport {\n interstitialDetailsSignal,\n resetInterstitialDetailsSignal,\n updateInterstitialDetailsSignal,\n} from './interstitial-screen-context';\nimport HostListener from '@carbon/web-components/es/globals/decorators/host-listener';\nimport {\n trapFocus,\n clearFocusableContainers,\n} from '../../utilities/manageFocusTrap/manageFocusTrap';\n\nexport const blockClass = `${prefix}--interstitial-screen`;\n\nexport type disableButtonConfigType = {\n skip?: boolean;\n back?: boolean;\n next?: boolean;\n start?: boolean;\n};\n/**\n * interstitial-screen main component\n * @element c4p-interstitial-screen\n * @fires c4p-interstitial-opened - The custom event triggered after loading the component.\n * Its event.detail will provide you with carousal api methods for step navigation and method to disable any action button\n * * @fires c4p-interstitial-beingclosed - The name of the custom event fired before interstitial is being closed upon a user gesture.\n * Cancellation of this event stops the user-initiated action of closing the interstitial.\n * @fires c4p-interstitial-closed - The name of the custom event fired after this tearsheet is closed upon a user gesture.\n\n */\n\n@customElement(`${prefix}-interstitial-screen`)\nclass CDSInterstitialScreen extends SignalWatcher(\n HostListenerMixin(LitElement)\n) {\n /**\n * Specifies whether the component is shown as a full-screen\n * experience, else it is shown as a modal by default.\n */\n\n @property({ type: Boolean, reflect: true, attribute: 'fullscreen' })\n isFullScreen: boolean = false;\n /**\n * Specifies whether the component is currently open.\n */\n @property({ type: Boolean, reflect: true })\n open: boolean = false;\n\n @state()\n stepDetails: Array<{ stepTitle: string; name?: string }> = [];\n /**\n * @ignore\n */\n @query('cds-modal-body') modalBody!: HTMLElement;\n\n private _wasOpen = false;\n private _trapFocusAPI: { cleanup: () => void } | null = null;\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(`${prefix}-request-close`, this._handleClose);\n }\n disconnectedCallback(): void {\n const { carouselAPI } = interstitialDetailsSignal.get();\n carouselAPI?.destroyEvents?.();\n this._trapFocusAPI?.cleanup();\n clearFocusableContainers();\n }\n firstUpdated() {\n this.requestUpdate(); // Ensure re-render\n resetInterstitialDetailsSignal();\n\n updateInterstitialDetailsSignal({\n name: 'isFullScreen',\n detail: this.isFullScreen,\n });\n }\n\n updated(changedProps: Map<string | number | symbol, unknown>) {\n if (changedProps.has('open')) {\n const wasOpen = this._wasOpen;\n const isOpen = this.open;\n\n // Update the signal with the open state\n updateInterstitialDetailsSignal({\n name: 'open',\n detail: isOpen,\n });\n\n if (!wasOpen && isOpen) {\n this.dispatchInItializeEvent();\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 this._trapFocusAPI = trapFocus();\n }\n\n this._wasOpen = isOpen;\n }\n }\n\n private dispatchInItializeEvent = () => {\n setTimeout(() => {\n const { carouselAPI } = interstitialDetailsSignal.get();\n this.dispatchEvent(\n new CustomEvent(\n (\n this.constructor as typeof CDSInterstitialScreen\n ).eventOnInterstitialOpened,\n {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n carouselAPI: carouselAPI\n ? {\n next: carouselAPI.next,\n prev: carouselAPI.prev,\n reset: carouselAPI.reset,\n gotToStep: carouselAPI.goToIndex,\n }\n : undefined,\n setDisableActionButtons: this.setDisableActionButtons,\n },\n }\n )\n );\n });\n };\n\n /**\n * Handles `click` event on this element.\n *\n * @param event The event.\n */\n @HostListener('click')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleOutsideClick = (event: MouseEvent) => {\n const modal = this.shadowRoot?.querySelector(`${carbonPrefix}-modal`);\n const modalContent = modal?.shadowRoot?.querySelector(\n `.${carbonPrefix}--modal-container`\n );\n const path = event.composedPath();\n if (modalContent && !path.includes(modalContent)) {\n this._handleClose(event);\n }\n };\n\n private setDisableActionButtons = (config: disableButtonConfigType) => {\n updateInterstitialDetailsSignal({ name: 'disableActions', detail: config });\n };\n\n _handleClose(e) {\n this.open = false;\n e.stopPropagation();\n\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n triggeredBy: e.detail.triggeredBy,\n },\n };\n if (\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSInterstitialScreen).eventBeforeClose,\n init\n )\n )\n ) {\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSInterstitialScreen).eventClose,\n init\n )\n );\n\n // Reset carousel and step after close event is dispatched\n const { carouselAPI } = interstitialDetailsSignal.get();\n if (carouselAPI) {\n carouselAPI.reset();\n }\n\n // Reset the current step to 0\n updateInterstitialDetailsSignal({\n name: 'currentStep',\n detail: 0,\n });\n }\n }\n\n //template methods\n\n renderFullScreen() {\n return html`\n <div class=\"${blockClass}--container\">\n <slot name=\"header\"></slot>\n <slot name=\"body\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n renderModal() {\n return html`<cds-modal\n key=${this.open}\n ?prevent-close-on-click-outside=\"true\"\n class=${blockClass}\n size=\"lg\"\n ?open=\"${this.open}\"\n >\n <slot name=\"header\"></slot>\n <cds-modal-body class=\"${blockClass}__body-container\">\n <slot name=\"body\"></slot>\n </cds-modal-body>\n <cds-modal-footer>\n <slot name=\"footer\"></slot>\n </cds-modal-footer>\n </cds-modal>`;\n }\n\n render() {\n return this.open\n ? this.isFullScreen\n ? html`${this.renderFullScreen()}`\n : html`${this.renderModal()}`\n : nothing;\n }\n\n static styles = styles;\n\n static get eventOnInterstitialOpened() {\n return `${prefix}-interstitial-opened`;\n }\n /**\n \n * The name of the custom event fired before interstitial is being closed upon a user gesture.\n * Cancellation of this event stops the user-initiated action of closing the interstitial.\n */\n static get eventBeforeClose() {\n return `${prefix}-interstitial-beingclosed`;\n }\n\n /**\n * The name of the custom event fired after this tearsheet is closed upon a user gesture.\n */\n static get eventClose() {\n return `${prefix}-interstitial-closed`;\n }\n}\n\nexport default CDSInterstitialScreen;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,aAAa;;;;;;;;;;;AAmB1B,IAAA,wBAAA,MACM,8BAA8B,cAClC,kBAAkB,WAAW,CAC9B,CAAC;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Context<{
12
12
  fullyCollapsed: boolean;
13
13
  root: null;
14
14
  titleClipped: boolean;
15
+ disableStickyTabBar: boolean;
15
16
  }, unknown>;
16
17
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,iBAAiB;;;;;;WAM5B,CAAC"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,iBAAiB;;;;;;;WAO5B,CAAC"}
@@ -20,7 +20,8 @@ const pageHeaderContext = createContext({
20
20
  breadcrumbOffset: 0,
21
21
  fullyCollapsed: false,
22
22
  root: null,
23
- titleClipped: false
23
+ titleClipped: false,
24
+ disableStickyTabBar: false
24
25
  });
25
26
  //#endregion
26
27
  export { pageHeaderContext };
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","names":[],"sources":["../../../src/components/page-header/context.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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 { createContext } from '@lit/context';\n\nexport const pageHeaderContext = createContext({\n headerOffset: 0,\n breadcrumbOffset: 0,\n fullyCollapsed: false,\n root: null,\n titleClipped: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,MAAa,oBAAoB,cAAc;CAC7C,cAAc;CACd,kBAAkB;CAClB,gBAAgB;CAChB,MAAM;CACN,cAAc;CACf,CAAC"}
1
+ {"version":3,"file":"context.js","names":[],"sources":["../../../src/components/page-header/context.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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 { createContext } from '@lit/context';\n\nexport const pageHeaderContext = createContext({\n headerOffset: 0,\n breadcrumbOffset: 0,\n fullyCollapsed: false,\n root: null,\n titleClipped: false,\n disableStickyTabBar: false,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,MAAa,oBAAoB,cAAc;CAC7C,cAAc;CACd,kBAAkB;CAClB,gBAAgB;CAChB,MAAM;CACN,cAAc;CACd,qBAAqB;CACtB,CAAC"}
@@ -30,6 +30,9 @@ declare class CDSPageHeaderBreadcrumb extends LitElement {
30
30
  */
31
31
  contentActionsFlush: boolean;
32
32
  context: any;
33
+ connectedCallback(): void;
34
+ updated(changedProperties: Map<string, any>): void;
35
+ private updateFixedClass;
33
36
  render(): import("lit-html").TemplateResult<1>;
34
37
  static styles: any;
35
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"page-header-breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header-breadcrumb.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AASvC;;;GAGG;AACH,cACM,uBAAwB,SAAQ,UAAU;IAC9C;;OAEG;IAEH,MAAM,UAAQ;IAEd;;;OAGG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,gBAAgB,UAAS;IAEzB;;OAEG;IAEH,mBAAmB,UAAS;IAG5B,OAAO,MAAC;IAER,MAAM;IAqCN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"page-header-breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header-breadcrumb.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AASvC;;;GAGG;AACH,cACM,uBAAwB,SAAQ,UAAU;IAC9C;;OAEG;IAEH,MAAM,UAAQ;IAEd;;;OAGG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,gBAAgB,UAAS;IAEzB;;OAEG;IAEH,mBAAmB,UAAS;IAI5B,OAAO,MAAC;IAER,iBAAiB;IAMjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAO3C,OAAO,CAAC,gBAAgB;IAQxB,MAAM;IAqCN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,uBAAuB,CAAC"}
@@ -11,7 +11,7 @@ import page_header_default from "./page-header.scss.js";
11
11
  import { pageHeaderContext } from "./context.js";
12
12
  import { classMap } from "lit/directives/class-map.js";
13
13
  import { LitElement, html } from "lit";
14
- import { property } from "lit/decorators.js";
14
+ import { property, state } from "lit/decorators.js";
15
15
  import { carbonElement } from "@carbon/web-components/es/globals/decorators/carbon-element.js";
16
16
  import { consume } from "@lit/context";
17
17
  //#region src/components/page-header/page-header-breadcrumb.ts
@@ -35,6 +35,18 @@ let CDSPageHeaderBreadcrumb = class CDSPageHeaderBreadcrumb extends LitElement {
35
35
  this.pageActionsFlush = false;
36
36
  this.contentActionsFlush = false;
37
37
  }
38
+ connectedCallback() {
39
+ super.connectedCallback();
40
+ this.updateFixedClass();
41
+ }
42
+ updated(changedProperties) {
43
+ super.updated(changedProperties);
44
+ if (changedProperties.has("context")) this.updateFixedClass();
45
+ }
46
+ updateFixedClass() {
47
+ if (this.context?.disableStickyTabBar) this.classList.add(`c4p--page-header-breadcrumb--fixed`);
48
+ else this.classList.remove(`c4p--page-header-breadcrumb--fixed`);
49
+ }
38
50
  render() {
39
51
  const { withinGrid, context } = this;
40
52
  const { contentActionsClipped } = context ?? {};
@@ -69,7 +81,10 @@ let CDSPageHeaderBreadcrumb = class CDSPageHeaderBreadcrumb extends LitElement {
69
81
  this.styles = page_header_default;
70
82
  }
71
83
  };
72
- __decorate([property({ reflect: true })], CDSPageHeaderBreadcrumb.prototype, "border", void 0);
84
+ __decorate([property({
85
+ reflect: true,
86
+ type: Boolean
87
+ })], CDSPageHeaderBreadcrumb.prototype, "border", void 0);
73
88
  __decorate([property({
74
89
  attribute: "within-grid",
75
90
  type: Boolean
@@ -85,7 +100,7 @@ __decorate([property({
85
100
  __decorate([consume({
86
101
  context: pageHeaderContext,
87
102
  subscribe: true
88
- })], CDSPageHeaderBreadcrumb.prototype, "context", void 0);
103
+ }), state()], CDSPageHeaderBreadcrumb.prototype, "context", void 0);
89
104
  CDSPageHeaderBreadcrumb = __decorate([carbonElement(`c4p-page-header-breadcrumb`)], CDSPageHeaderBreadcrumb);
90
105
  var page_header_breadcrumb_default = CDSPageHeaderBreadcrumb;
91
106
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"page-header-breadcrumb.js","names":["styles","customElement"],"sources":["../../../src/components/page-header/page-header-breadcrumb.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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, html } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { prefix, carbonPrefix } from '../../globals/settings';\nimport { property } from 'lit/decorators.js';\nimport styles from './page-header.scss?lit';\nimport { consume } from '@lit/context';\nimport { pageHeaderContext } from './context';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\n/**\n * Page header Breadcrumb Bar.\n * @element c4p-page-header-breadcrumb\n */\n@customElement(`${prefix}-page-header-breadcrumb`)\nclass CDSPageHeaderBreadcrumb extends LitElement {\n /**\n * Specify if breadcrumb bar has bottom border.\n */\n @property({ reflect: true })\n border = true;\n\n /**\n * Set to `true` if the breadcrumb bar is sitting within a grid\n * (ie. when used in tandem with page-header-hero-image)\n */\n @property({ attribute: 'within-grid', type: Boolean })\n withinGrid = false;\n\n /**\n * Set to `true` if page actions should be flush (no padding)\n */\n @property({ attribute: 'page-actions-flush', type: Boolean })\n pageActionsFlush = false;\n\n /**\n * Set to `true` if content actions should be flush (no padding)\n */\n @property({ attribute: 'content-actions-flush', type: Boolean })\n contentActionsFlush = false;\n\n @consume({ context: pageHeaderContext, subscribe: true })\n context;\n\n render() {\n const { withinGrid, context } = this;\n const { contentActionsClipped } = context ?? {};\n const gridClasses = classMap({\n [`${carbonPrefix}--css-grid`]: !withinGrid,\n [`${carbonPrefix}--subgrid ${carbonPrefix}--subgrid--wide`]: withinGrid,\n });\n\n const contentActionClasses = classMap({\n [`${prefix}--page-header__breadcrumb__content-actions-with-global-actions`]:\n true,\n [`${prefix}--page-header__breadcrumb__content-actions-with-global-actions--show`]:\n contentActionsClipped,\n });\n\n return html`\n <div class=\"${gridClasses}\">\n <div\n class=\"${carbonPrefix}--sm:col-span-4 ${carbonPrefix}--md:col-span-8 ${carbonPrefix}--lg:col-span-16 ${carbonPrefix}--css-grid-column\"\n >\n <div class=\"${prefix}--page-header__breadcrumb-container\">\n <div class=\"${prefix}--page-header__breadcrumb-wrapper\">\n <slot name=\"icon\"></slot>\n <slot></slot>\n </div>\n <div class=\"${prefix}--page-header__breadcrumb__actions\">\n <div class=\"${contentActionClasses}\">\n <slot name=\"content-actions\"></slot>\n </div>\n <slot name=\"page-actions\"></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default CDSPageHeaderBreadcrumb;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAA,0BAAA,MACM,gCAAgC,WAAW;;;gBAKtC;oBAOI;0BAMM;6BAMG;;CAKtB,SAAS;EACP,MAAM,EAAE,YAAY,YAAY;EAChC,MAAM,EAAE,0BAA0B,WAAW,EAAE;AAa/C,SAAO,IAAI;oBAZS,SAAS;IAC1B,kBAA8B,CAAC;IAC/B,oCAA4D;GAC9D,CAU0B,CAAC;;yBAEA,kBAAA,MAA+B,kBAAA,MAA+B,mBAAA,MAAgC;;8BAE/F;gCACE;;;;gCAIA;4BAjBA,SAAS;IACnC,sEACC;IACD,4EACC;GACH,CAa2C,CAAC;;;;;;;;;;;gBAW/BA;;;YA9Df,SAAS,EAAE,SAAS,MAAM,CAAC,CAAA,EAAA,wBAAA,WAAA,UAAA,KAAA,EAAA;YAO3B,SAAS;CAAE,WAAW;CAAe,MAAM;CAAS,CAAC,CAAA,EAAA,wBAAA,WAAA,cAAA,KAAA,EAAA;YAMrD,SAAS;CAAE,WAAW;CAAsB,MAAM;CAAS,CAAC,CAAA,EAAA,wBAAA,WAAA,oBAAA,KAAA,EAAA;YAM5D,SAAS;CAAE,WAAW;CAAyB,MAAM;CAAS,CAAC,CAAA,EAAA,wBAAA,WAAA,uBAAA,KAAA,EAAA;YAG/D,QAAQ;CAAE,SAAS;CAAmB,WAAW;CAAM,CAAC,CAAA,EAAA,wBAAA,WAAA,WAAA,KAAA,EAAA;sCA3B1DC,cAAc,6BAAmC,CAAA,EAAA,wBAAA;AAsElD,IAAA,iCAAe"}
1
+ {"version":3,"file":"page-header-breadcrumb.js","names":["styles","customElement"],"sources":["../../../src/components/page-header/page-header-breadcrumb.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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, html } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { prefix, carbonPrefix } from '../../globals/settings';\nimport { property, state } from 'lit/decorators.js';\nimport styles from './page-header.scss?lit';\nimport { consume } from '@lit/context';\nimport { pageHeaderContext } from './context';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\n/**\n * Page header Breadcrumb Bar.\n * @element c4p-page-header-breadcrumb\n */\n@customElement(`${prefix}-page-header-breadcrumb`)\nclass CDSPageHeaderBreadcrumb extends LitElement {\n /**\n * Specify if breadcrumb bar has bottom border.\n */\n @property({ reflect: true, type: Boolean })\n border = true;\n\n /**\n * Set to `true` if the breadcrumb bar is sitting within a grid\n * (ie. when used in tandem with page-header-hero-image)\n */\n @property({ attribute: 'within-grid', type: Boolean })\n withinGrid = false;\n\n /**\n * Set to `true` if page actions should be flush (no padding)\n */\n @property({ attribute: 'page-actions-flush', type: Boolean })\n pageActionsFlush = false;\n\n /**\n * Set to `true` if content actions should be flush (no padding)\n */\n @property({ attribute: 'content-actions-flush', type: Boolean })\n contentActionsFlush = false;\n\n @consume({ context: pageHeaderContext, subscribe: true })\n @state()\n context;\n\n connectedCallback() {\n super.connectedCallback();\n // Apply class on initial connection\n this.updateFixedClass();\n }\n\n updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n if (changedProperties.has('context')) {\n this.updateFixedClass();\n }\n }\n\n private updateFixedClass() {\n if (this.context?.disableStickyTabBar) {\n this.classList.add(`${prefix}--page-header-breadcrumb--fixed`);\n } else {\n this.classList.remove(`${prefix}--page-header-breadcrumb--fixed`);\n }\n }\n\n render() {\n const { withinGrid, context } = this;\n const { contentActionsClipped } = context ?? {};\n const gridClasses = classMap({\n [`${carbonPrefix}--css-grid`]: !withinGrid,\n [`${carbonPrefix}--subgrid ${carbonPrefix}--subgrid--wide`]: withinGrid,\n });\n\n const contentActionClasses = classMap({\n [`${prefix}--page-header__breadcrumb__content-actions-with-global-actions`]:\n true,\n [`${prefix}--page-header__breadcrumb__content-actions-with-global-actions--show`]:\n contentActionsClipped,\n });\n\n return html`\n <div class=\"${gridClasses}\">\n <div\n class=\"${carbonPrefix}--sm:col-span-4 ${carbonPrefix}--md:col-span-8 ${carbonPrefix}--lg:col-span-16 ${carbonPrefix}--css-grid-column\"\n >\n <div class=\"${prefix}--page-header__breadcrumb-container\">\n <div class=\"${prefix}--page-header__breadcrumb-wrapper\">\n <slot name=\"icon\"></slot>\n <slot></slot>\n </div>\n <div class=\"${prefix}--page-header__breadcrumb__actions\">\n <div class=\"${contentActionClasses}\">\n <slot name=\"content-actions\"></slot>\n </div>\n <slot name=\"page-actions\"></slot>\n </div>\n </div>\n </div>\n </div>\n `;\n }\n\n static styles = styles;\n}\n\nexport default CDSPageHeaderBreadcrumb;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAs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,13 @@ import { LitElement } from 'lit';
12
12
  * @element c4p-page-header-tabs
13
13
  */
14
14
  declare class CDSPageHeaderTabs extends LitElement {
15
+ /**
16
+ * Disable sticky positioning for the tab bar
17
+ */
18
+ disableStickyTabBar: boolean;
19
+ connectedCallback(): void;
20
+ updated(changedProperties: Map<string, any>): void;
21
+ private updateContext;
15
22
  render(): import("lit-html").TemplateResult<1>;
16
23
  static styles: any;
17
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"page-header-tabs.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;GAGG;AACH,cACM,iBAAkB,SAAQ,UAAU;IACxC,MAAM;IAcN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"page-header-tabs.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAOvC;;;GAGG;AACH,cACM,iBAAkB,SAAQ,UAAU;IACxC;;OAEG;IAEH,mBAAmB,UAAS;IAE5B,iBAAiB;IAKjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAO3C,OAAO,CAAC,aAAa;IAarB,MAAM;IAcN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,iBAAiB,CAAC"}
@@ -9,6 +9,7 @@ import "../../globals/settings.js";
9
9
  import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.127.0/helpers/decorate.js";
10
10
  import page_header_default from "./page-header.scss.js";
11
11
  import { LitElement, html } from "lit";
12
+ import { property } from "lit/decorators.js";
12
13
  import { carbonElement } from "@carbon/web-components/es/globals/decorators/carbon-element.js";
13
14
  //#region src/components/page-header/page-header-tabs.ts
14
15
  /**
@@ -24,6 +25,28 @@ import { carbonElement } from "@carbon/web-components/es/globals/decorators/carb
24
25
  * @element c4p-page-header-tabs
25
26
  */
26
27
  let CDSPageHeaderTabs = class CDSPageHeaderTabs extends LitElement {
28
+ constructor(..._args) {
29
+ super(..._args);
30
+ this.disableStickyTabBar = false;
31
+ }
32
+ connectedCallback() {
33
+ super.connectedCallback();
34
+ this.updateContext();
35
+ }
36
+ updated(changedProperties) {
37
+ super.updated(changedProperties);
38
+ if (changedProperties.has("disableStickyTabBar")) this.updateContext();
39
+ }
40
+ updateContext() {
41
+ const pageHeader = this.closest(`c4p-page-header`);
42
+ if (pageHeader) {
43
+ pageHeader.context = {
44
+ ...pageHeader.context,
45
+ disableStickyTabBar: this.disableStickyTabBar
46
+ };
47
+ pageHeader.requestUpdate("context");
48
+ }
49
+ }
27
50
  render() {
28
51
  return html` <div class="${"cds"}--css-grid" condensed="">
29
52
  <div
@@ -41,6 +64,10 @@ let CDSPageHeaderTabs = class CDSPageHeaderTabs extends LitElement {
41
64
  this.styles = page_header_default;
42
65
  }
43
66
  };
67
+ __decorate([property({
68
+ type: Boolean,
69
+ attribute: "disable-sticky-tab-bar"
70
+ })], CDSPageHeaderTabs.prototype, "disableStickyTabBar", void 0);
44
71
  CDSPageHeaderTabs = __decorate([carbonElement(`c4p-page-header-tabs`)], CDSPageHeaderTabs);
45
72
  var page_header_tabs_default = CDSPageHeaderTabs;
46
73
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"page-header-tabs.js","names":["styles","customElement"],"sources":["../../../src/components/page-header/page-header-tabs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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, html } from 'lit';\nimport { prefix, carbonPrefix } from '../../globals/settings';\nimport styles from './page-header.scss?lit';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\n/**\n * Page header Tabs Bar.\n * @element c4p-page-header-tabs\n */\n@customElement(`${prefix}-page-header-tabs`)\nclass CDSPageHeaderTabs extends LitElement {\n render() {\n return html` <div class=\"${carbonPrefix}--css-grid\" condensed=\"\">\n <div\n class=\"${carbonPrefix}--sm:col-span-4 ${carbonPrefix}--md:col-span-8 ${carbonPrefix}--lg:col-span-16 ${carbonPrefix}--css-grid-column\"\n >\n <div class=\"${prefix}--page-header__tab-bar--tablist\">\n <slot></slot>\n <slot name=\"tags\"></slot>\n </div>\n </div>\n <slot name=\"scroller\"></slot>\n </div>`;\n }\n\n static styles = styles;\n}\n\nexport default CDSPageHeaderTabs;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAA,oBAAA,MACM,0BAA0B,WAAW;CACzC,SAAS;AACP,SAAO,IAAI,gBAAA,MAA6B;;uBAEd,kBAAA,MAA+B,kBAAA,MAA+B,mBAAA,MAAgC;;4BAE/F;;;;;;;;;gBASXA;;;gCAhBjBC,cAAc,uBAA6B,CAAA,EAAA,kBAAA;AAmB5C,IAAA,2BAAe"}
1
+ {"version":3,"file":"page-header-tabs.js","names":["styles","customElement"],"sources":["../../../src/components/page-header/page-header-tabs.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { prefix, carbonPrefix } from '../../globals/settings';\nimport styles from './page-header.scss?lit';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport CDSPageHeader from './page-header';\n\n/**\n * Page header Tabs Bar.\n * @element c4p-page-header-tabs\n */\n@customElement(`${prefix}-page-header-tabs`)\nclass CDSPageHeaderTabs extends LitElement {\n /**\n * Disable sticky positioning for the tab bar\n */\n @property({ type: Boolean, attribute: 'disable-sticky-tab-bar' })\n disableStickyTabBar = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.updateContext();\n }\n\n updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n if (changedProperties.has('disableStickyTabBar')) {\n this.updateContext();\n }\n }\n\n private updateContext() {\n const pageHeader = this.closest(`${prefix}-page-header`) as CDSPageHeader;\n if (pageHeader) {\n // Create a new object to trigger reactivity\n pageHeader.context = {\n ...pageHeader.context,\n disableStickyTabBar: this.disableStickyTabBar,\n };\n // Force update\n pageHeader.requestUpdate('context');\n }\n }\n\n render() {\n return html` <div class=\"${carbonPrefix}--css-grid\" condensed=\"\">\n <div\n class=\"${carbonPrefix}--sm:col-span-4 ${carbonPrefix}--md:col-span-8 ${carbonPrefix}--lg:col-span-16 ${carbonPrefix}--css-grid-column\"\n >\n <div class=\"${prefix}--page-header__tab-bar--tablist\">\n <slot></slot>\n <slot name=\"tags\"></slot>\n </div>\n </div>\n <slot name=\"scroller\"></slot>\n </div>`;\n }\n\n static styles = styles;\n}\n\nexport default CDSPageHeaderTabs;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAA,oBAAA,MACM,0BAA0B,WAAW;;;6BAKnB;;CAEtB,oBAAoB;AAClB,QAAM,mBAAmB;AACzB,OAAK,eAAe;;CAGtB,QAAQ,mBAAqC;AAC3C,QAAM,QAAQ,kBAAkB;AAChC,MAAI,kBAAkB,IAAI,sBAAsB,CAC9C,MAAK,eAAe;;CAIxB,gBAAwB;EACtB,MAAM,aAAa,KAAK,QAAQ,kBAAwB;AACxD,MAAI,YAAY;AAEd,cAAW,UAAU;IACnB,GAAG,WAAW;IACd,qBAAqB,KAAK;IAC3B;AAED,cAAW,cAAc,UAAU;;;CAIvC,SAAS;AACP,SAAO,IAAI,gBAAA,MAA6B;;uBAEd,kBAAA,MAA+B,kBAAA,MAA+B,mBAAA,MAAgC;;4BAE/F;;;;;;;;;gBASXA;;;YA1Cf,SAAS;CAAE,MAAM;CAAS,WAAW;CAA0B,CAAC,CAAA,EAAA,kBAAA,WAAA,uBAAA,KAAA,EAAA;gCALlEC,cAAc,uBAA6B,CAAA,EAAA,kBAAA;AAkD5C,IAAA,2BAAe"}
@@ -15,6 +15,7 @@ export interface pageHeaderContextType {
15
15
  contentActionsClipped?: boolean;
16
16
  root?: CDSPageHeader | null;
17
17
  withContent?: boolean;
18
+ disableStickyTabBar?: boolean;
18
19
  }
19
20
  /**
20
21
  * Page header.
@@ -23,6 +24,7 @@ export interface pageHeaderContextType {
23
24
  declare class CDSPageHeader extends LitElement {
24
25
  context: pageHeaderContextType;
25
26
  private resizeObserver;
27
+ updated(changedProperties: Map<string, any>): void;
26
28
  connectedCallback(): void;
27
29
  disconnectedCallback(): void;
28
30
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAUvC,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;GAGG;AACH,cACM,aAAc,SAAQ,UAAU;IAGpC,OAAO,EAAE,qBAAqB,CAAM;IAEpC,OAAO,CAAC,cAAc,CAA6B;IAEnD,iBAAiB,IAAI,IAAI;IAqHzB,oBAAoB;IAKpB,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../src/components/page-header/page-header.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAUvC,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,cACM,aAAc,SAAQ,UAAU;IAGpC,OAAO,EAAE,qBAAqB,CAAM;IAEpC,OAAO,CAAC,cAAc,CAA6B;IAEnD,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAY3C,iBAAiB,IAAI,IAAI;IAqHzB,oBAAoB;IAKpB,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,aAAa,CAAC"}
@@ -33,6 +33,11 @@ let CDSPageHeader = class CDSPageHeader extends LitElement {
33
33
  super(..._args);
34
34
  this.context = {};
35
35
  }
36
+ updated(changedProperties) {
37
+ super.updated(changedProperties);
38
+ if (changedProperties.has("context")) if (this.context.disableStickyTabBar) this.classList.add(`c4p--page-header--disable-sticky-tab-bar`);
39
+ else this.classList.remove(`c4p--page-header--disable-sticky-tab-bar`);
40
+ }
36
41
  connectedCallback() {
37
42
  super.connectedCallback();
38
43
  const contentElement = this.querySelector(`c4p-page-header-content`);
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.js","names":["CDSPageHeaderContent","styles","customElement"],"sources":["../../../src/components/page-header/page-header.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { provide } from '@lit/context';\nimport { prefix } from '../../globals/settings';\nimport styles from './page-header.scss?lit';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport { pageHeaderContext } from './context';\nimport { getHeaderOffset } from './utils';\nimport CDSPageHeaderContent from './page-header-content';\n\nexport interface pageHeaderContextType {\n breadcrumbOffset?: number;\n headerOffset?: number;\n fullyCollapsed?: boolean;\n titleClipped?: boolean;\n contentActionsClipped?: boolean;\n root?: CDSPageHeader | null;\n withContent?: boolean;\n}\n\n/**\n * Page header.\n * @element c4p-page-header\n */\n@customElement(`${prefix}-page-header`)\nclass CDSPageHeader extends LitElement {\n @state()\n @provide({ context: pageHeaderContext })\n context: pageHeaderContextType = {};\n\n private resizeObserver: ResizeObserver | undefined;\n\n connectedCallback(): void {\n super.connectedCallback();\n const contentElement = this.querySelector(`${prefix}-page-header-content`);\n\n this.resizeObserver = new ResizeObserver((entries) => {\n const pageHeaderElement = entries[0];\n const contentEl = pageHeaderElement.target.querySelector(\n `${prefix}-page-header-content`\n );\n const contentHeight =\n contentEl instanceof CDSPageHeaderContent ? contentEl.scrollHeight : 0;\n const padding =\n contentEl instanceof CDSPageHeaderContent\n ? parseFloat(getComputedStyle(contentEl)?.paddingBlockStart) +\n parseFloat(getComputedStyle(contentEl)?.paddingBlockEnd)\n : 0;\n const totalContentHeight = contentHeight + padding;\n const headerOffset = getHeaderOffset(this);\n const contentPadding = contentEl instanceof CDSPageHeaderContent ? 48 : 0;\n\n this.style.setProperty(\n `--${prefix}-page-header-header-top`,\n `${(Math.round(totalContentHeight - contentPadding) - headerOffset) * -1}px`\n );\n this.style.setProperty(\n `--${prefix}-page-header-breadcrumb-top`,\n `${headerOffset}px`\n );\n this.context = {\n ...this.context,\n breadcrumbOffset: headerOffset,\n headerOffset: (Math.round(totalContentHeight) - headerOffset) * -1,\n root: this,\n withContent: !!contentEl,\n };\n });\n this.resizeObserver.observe(this);\n\n const predefinedContentPadding = 24;\n const totalHeaderOffset = getHeaderOffset(this);\n const contentObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n this.context = {\n ...this.context,\n fullyCollapsed: true,\n };\n } else {\n this.context = {\n ...this.context,\n fullyCollapsed: false,\n };\n }\n });\n },\n {\n root: null,\n rootMargin: `${(predefinedContentPadding + totalHeaderOffset + 40) * -1}px 0px 0px 0px`,\n threshold: 0.1,\n }\n );\n\n const titleObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n this.context = {\n ...this.context,\n titleClipped: true,\n };\n } else {\n this.context = {\n ...this.context,\n titleClipped: false,\n };\n }\n });\n },\n {\n root: null,\n rootMargin: `${(predefinedContentPadding + totalHeaderOffset + 40) * -1}px 0px 0px 0px`,\n threshold: 0.95,\n }\n );\n\n const actionsObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n this.context = {\n ...this.context,\n contentActionsClipped: true,\n };\n } else {\n this.context = {\n ...this.context,\n contentActionsClipped: false,\n };\n }\n });\n },\n {\n root: null,\n // 48 -> breadcrumb bar\n // 18 -> content padding\n rootMargin: `${(totalHeaderOffset + 48 + 18) * -1}px 0px 0px 0px`,\n threshold: 0.95,\n }\n );\n if (contentElement) {\n contentObserver.observe(contentElement);\n titleObserver.observe(contentElement);\n actionsObserver.observe(contentElement);\n }\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect(); // Clean up\n super.disconnectedCallback();\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n static styles = styles;\n}\n\nexport default CDSPageHeader;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAA,gBAAA,MACM,sBAAsB,WAAW;;;iBAGJ,EAAE;;CAInC,oBAA0B;AACxB,QAAM,mBAAmB;EACzB,MAAM,iBAAiB,KAAK,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AAM,GAAG;GACxE,WAAW;GACZ,CACF;EAED,MAAM,kBAAkB,IAAI,sBACzB,YAAY;AACX,WAAQ,SAAS,UAAU;AACzB,QAAI,CAAC,MAAM,eACT,MAAK,UAAU;KACb,GAAG,KAAK;KACR,uBAAuB;KACxB;QAED,MAAK,UAAU;KACb,GAAG,KAAK;KACR,uBAAuB;KACxB;KAEH;KAEJ;GACE,MAAM;GAGN,YAAY,IAAI,oBAAoB,KAAK,MAAM,GAAG;GAClD,WAAW;GACZ,CACF;AACD,MAAI,gBAAgB;AAClB,mBAAgB,QAAQ,eAAe;AACvC,iBAAc,QAAQ,eAAe;AACrC,mBAAgB,QAAQ,eAAe;;;CAI3C,uBAAuB;AACrB,OAAK,gBAAgB,YAAY;AACjC,QAAM,sBAAsB;;CAG9B,SAAS;AACP,SAAO,IAAI;;;gBAGGC;;;YApIf,OAAO,EACP,QAAQ,EAAE,SAAS,mBAAmB,CAAC,CAAA,EAAA,cAAA,WAAA,WAAA,KAAA,EAAA;4BAHzCC,cAAc,kBAAwB,CAAA,EAAA,cAAA;AAyIvC,IAAA,sBAAe"}
1
+ {"version":3,"file":"page-header.js","names":["CDSPageHeaderContent","styles","customElement"],"sources":["../../../src/components/page-header/page-header.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2025, 2025\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, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { provide } from '@lit/context';\nimport { prefix } from '../../globals/settings';\nimport styles from './page-header.scss?lit';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\nimport { pageHeaderContext } from './context';\nimport { getHeaderOffset } from './utils';\nimport CDSPageHeaderContent from './page-header-content';\n\nexport interface pageHeaderContextType {\n breadcrumbOffset?: number;\n headerOffset?: number;\n fullyCollapsed?: boolean;\n titleClipped?: boolean;\n contentActionsClipped?: boolean;\n root?: CDSPageHeader | null;\n withContent?: boolean;\n disableStickyTabBar?: boolean;\n}\n\n/**\n * Page header.\n * @element c4p-page-header\n */\n@customElement(`${prefix}-page-header`)\nclass CDSPageHeader extends LitElement {\n @state()\n @provide({ context: pageHeaderContext })\n context: pageHeaderContextType = {};\n\n private resizeObserver: ResizeObserver | undefined;\n\n updated(changedProperties: Map<string, any>) {\n super.updated(changedProperties);\n if (changedProperties.has('context')) {\n // Update host class based on disableStickyTabBar\n if (this.context.disableStickyTabBar) {\n this.classList.add(`${prefix}--page-header--disable-sticky-tab-bar`);\n } else {\n this.classList.remove(`${prefix}--page-header--disable-sticky-tab-bar`);\n }\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const contentElement = this.querySelector(`${prefix}-page-header-content`);\n\n this.resizeObserver = new ResizeObserver((entries) => {\n const pageHeaderElement = entries[0];\n const contentEl = pageHeaderElement.target.querySelector(\n `${prefix}-page-header-content`\n );\n const contentHeight =\n contentEl instanceof CDSPageHeaderContent ? contentEl.scrollHeight : 0;\n const padding =\n contentEl instanceof CDSPageHeaderContent\n ? parseFloat(getComputedStyle(contentEl)?.paddingBlockStart) +\n parseFloat(getComputedStyle(contentEl)?.paddingBlockEnd)\n : 0;\n const totalContentHeight = contentHeight + padding;\n const headerOffset = getHeaderOffset(this);\n const contentPadding = contentEl instanceof CDSPageHeaderContent ? 48 : 0;\n\n this.style.setProperty(\n `--${prefix}-page-header-header-top`,\n `${(Math.round(totalContentHeight - contentPadding) - headerOffset) * -1}px`\n );\n this.style.setProperty(\n `--${prefix}-page-header-breadcrumb-top`,\n `${headerOffset}px`\n );\n this.context = {\n ...this.context,\n breadcrumbOffset: headerOffset,\n headerOffset: (Math.round(totalContentHeight) - headerOffset) * -1,\n root: this,\n withContent: !!contentEl,\n };\n });\n this.resizeObserver.observe(this);\n\n const predefinedContentPadding = 24;\n const totalHeaderOffset = getHeaderOffset(this);\n const contentObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n this.context = {\n ...this.context,\n fullyCollapsed: true,\n };\n } else {\n this.context = {\n ...this.context,\n fullyCollapsed: false,\n };\n }\n });\n },\n {\n root: null,\n rootMargin: `${(predefinedContentPadding + totalHeaderOffset + 40) * -1}px 0px 0px 0px`,\n threshold: 0.1,\n }\n );\n\n const titleObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n this.context = {\n ...this.context,\n titleClipped: true,\n };\n } else {\n this.context = {\n ...this.context,\n titleClipped: false,\n };\n }\n });\n },\n {\n root: null,\n rootMargin: `${(predefinedContentPadding + totalHeaderOffset + 40) * -1}px 0px 0px 0px`,\n threshold: 0.95,\n }\n );\n\n const actionsObserver = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n this.context = {\n ...this.context,\n contentActionsClipped: true,\n };\n } else {\n this.context = {\n ...this.context,\n contentActionsClipped: false,\n };\n }\n });\n },\n {\n root: null,\n // 48 -> breadcrumb bar\n // 18 -> content padding\n rootMargin: `${(totalHeaderOffset + 48 + 18) * -1}px 0px 0px 0px`,\n threshold: 0.95,\n }\n );\n if (contentElement) {\n contentObserver.observe(contentElement);\n titleObserver.observe(contentElement);\n actionsObserver.observe(contentElement);\n }\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect(); // Clean up\n super.disconnectedCallback();\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n static styles = styles;\n}\n\nexport default CDSPageHeader;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAA,gBAAA,MACM,sBAAsB,WAAW;;;iBAGJ,EAAE;;CAInC,QAAQ,mBAAqC;AAC3C,QAAM,QAAQ,kBAAkB;AAChC,MAAI,kBAAkB,IAAI,UAAU,CAElC,KAAI,KAAK,QAAQ,oBACf,MAAK,UAAU,IAAI,2CAAiD;MAEpE,MAAK,UAAU,OAAO,2CAAiD;;CAK7E,oBAA0B;AACxB,QAAM,mB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