@fluentui/web-components 3.0.0-rc.26 → 3.0.0-rc.28

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 (128) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/README.md +26 -0
  3. package/custom-elements.json +41 -56
  4. package/dist/esm/accordion/accordion.styles.css +11 -7
  5. package/dist/esm/accordion/accordion.template.html +4 -3
  6. package/dist/esm/accordion-item/accordion-item.styles.css +174 -170
  7. package/dist/esm/accordion-item/accordion-item.template.html +38 -31
  8. package/dist/esm/anchor-button/anchor-button.styles.css +224 -223
  9. package/dist/esm/anchor-button/anchor-button.template.html +8 -11
  10. package/dist/esm/avatar/avatar.styles.css +475 -470
  11. package/dist/esm/avatar/avatar.template.html +10 -14
  12. package/dist/esm/badge/badge.styles.css +264 -266
  13. package/dist/esm/badge/badge.template.html +5 -2
  14. package/dist/esm/button/button.base.js +2 -0
  15. package/dist/esm/button/button.base.js.map +1 -1
  16. package/dist/esm/button/button.styles.css +260 -259
  17. package/dist/esm/button/button.template.html +8 -10
  18. package/dist/esm/checkbox/checkbox.base.js +2 -0
  19. package/dist/esm/checkbox/checkbox.base.js.map +1 -1
  20. package/dist/esm/checkbox/checkbox.styles.css +146 -142
  21. package/dist/esm/checkbox/checkbox.template.html +21 -16
  22. package/dist/esm/compound-button/compound-button.styles.css +363 -365
  23. package/dist/esm/compound-button/compound-button.template.html +9 -11
  24. package/dist/esm/counter-badge/counter-badge.styles.css +177 -177
  25. package/dist/esm/counter-badge/counter-badge.template.html +5 -2
  26. package/dist/esm/dialog/dialog.styles.css +65 -66
  27. package/dist/esm/dialog/dialog.template.html +18 -15
  28. package/dist/esm/dialog-body/dialog-body.styles.css +81 -76
  29. package/dist/esm/dialog-body/dialog-body.styles.js +1 -0
  30. package/dist/esm/dialog-body/dialog-body.styles.js.map +1 -1
  31. package/dist/esm/dialog-body/dialog-body.template.html +2 -1
  32. package/dist/esm/divider/divider.styles.css +105 -101
  33. package/dist/esm/divider/divider.template.html +6 -1
  34. package/dist/esm/drawer/drawer.styles.css +124 -119
  35. package/dist/esm/drawer/drawer.template.html +5 -2
  36. package/dist/esm/drawer-body/drawer-body.styles.css +29 -26
  37. package/dist/esm/drawer-body/drawer-body.template.html +5 -2
  38. package/dist/esm/dropdown/dropdown.base.d.ts +1 -1
  39. package/dist/esm/dropdown/dropdown.base.js +3 -1
  40. package/dist/esm/dropdown/dropdown.base.js.map +1 -1
  41. package/dist/esm/dropdown/dropdown.styles.css +192 -190
  42. package/dist/esm/dropdown/dropdown.styles.js +1 -0
  43. package/dist/esm/dropdown/dropdown.styles.js.map +1 -1
  44. package/dist/esm/dropdown/dropdown.template.html +26 -19
  45. package/dist/esm/field/field.styles.css +125 -121
  46. package/dist/esm/field/field.template.html +3 -2
  47. package/dist/esm/image/image.styles.css +49 -50
  48. package/dist/esm/image/image.template.html +6 -1
  49. package/dist/esm/label/label.styles.css +34 -30
  50. package/dist/esm/label/label.template.html +5 -2
  51. package/dist/esm/link/link.styles.css +58 -54
  52. package/dist/esm/link/link.template.html +4 -7
  53. package/dist/esm/listbox/listbox.styles.css +40 -36
  54. package/dist/esm/listbox/listbox.styles.js +2 -2
  55. package/dist/esm/listbox/listbox.template.html +4 -6
  56. package/dist/esm/menu/menu.d.ts +8 -8
  57. package/dist/esm/menu/menu.js.map +1 -1
  58. package/dist/esm/menu/menu.styles.css +56 -52
  59. package/dist/esm/menu/menu.styles.js +5 -5
  60. package/dist/esm/menu/menu.template.html +6 -5
  61. package/dist/esm/menu-button/menu-button.styles.css +260 -259
  62. package/dist/esm/menu-button/menu-button.template.html +23 -14
  63. package/dist/esm/menu-item/menu-item.js +2 -0
  64. package/dist/esm/menu-item/menu-item.js.map +1 -1
  65. package/dist/esm/menu-item/menu-item.styles.css +141 -137
  66. package/dist/esm/menu-item/menu-item.styles.js +8 -3
  67. package/dist/esm/menu-item/menu-item.styles.js.map +1 -1
  68. package/dist/esm/menu-item/menu-item.template.html +48 -17
  69. package/dist/esm/menu-list/menu-list.styles.css +19 -15
  70. package/dist/esm/menu-list/menu-list.template.html +4 -3
  71. package/dist/esm/message-bar/message-bar.styles.css +83 -84
  72. package/dist/esm/message-bar/message-bar.template.html +7 -2
  73. package/dist/esm/option/option.styles.css +117 -114
  74. package/dist/esm/option/option.template.html +17 -14
  75. package/dist/esm/progress-bar/progress-bar.styles.css +83 -79
  76. package/dist/esm/progress-bar/progress-bar.template.html +4 -1
  77. package/dist/esm/radio/radio.styles.css +100 -96
  78. package/dist/esm/radio/radio.template.html +6 -9
  79. package/dist/esm/radio-group/radio-group.styles.css +45 -41
  80. package/dist/esm/radio-group/radio-group.template.html +11 -10
  81. package/dist/esm/rating-display/rating-display.styles.css +136 -134
  82. package/dist/esm/rating-display/rating-display.template.html +5 -2
  83. package/dist/esm/slider/slider.js +2 -0
  84. package/dist/esm/slider/slider.js.map +1 -1
  85. package/dist/esm/slider/slider.styles.css +186 -182
  86. package/dist/esm/slider/slider.template.html +13 -15
  87. package/dist/esm/spinner/spinner.styles.css +155 -151
  88. package/dist/esm/spinner/spinner.template.html +16 -11
  89. package/dist/esm/switch/switch.styles.css +112 -108
  90. package/dist/esm/switch/switch.template.html +9 -8
  91. package/dist/esm/tab/tab.js +2 -0
  92. package/dist/esm/tab/tab.js.map +1 -1
  93. package/dist/esm/tab/tab.styles.css +112 -108
  94. package/dist/esm/tab/tab.template.html +6 -5
  95. package/dist/esm/tablist/tablist.styles.css +194 -190
  96. package/dist/esm/tablist/tablist.template.html +2 -5
  97. package/dist/esm/text/text.styles.css +105 -101
  98. package/dist/esm/text/text.template.html +6 -1
  99. package/dist/esm/text-input/text-input.base.d.ts +0 -7
  100. package/dist/esm/text-input/text-input.base.js +3 -14
  101. package/dist/esm/text-input/text-input.base.js.map +1 -1
  102. package/dist/esm/text-input/text-input.styles.css +199 -195
  103. package/dist/esm/text-input/text-input.template.html +34 -35
  104. package/dist/esm/text-input/text-input.template.js +1 -4
  105. package/dist/esm/text-input/text-input.template.js.map +1 -1
  106. package/dist/esm/textarea/textarea.base.js +2 -0
  107. package/dist/esm/textarea/textarea.base.js.map +1 -1
  108. package/dist/esm/textarea/textarea.styles.css +254 -250
  109. package/dist/esm/textarea/textarea.template.html +28 -27
  110. package/dist/esm/toggle-button/toggle-button.styles.css +360 -357
  111. package/dist/esm/toggle-button/toggle-button.template.html +8 -10
  112. package/dist/esm/tooltip/tooltip.styles.css +81 -77
  113. package/dist/esm/tooltip/tooltip.template.html +6 -1
  114. package/dist/esm/tree/tree.styles.css +9 -5
  115. package/dist/esm/tree/tree.template.html +3 -2
  116. package/dist/esm/tree-item/tree-item.base.js +2 -0
  117. package/dist/esm/tree-item/tree-item.base.js.map +1 -1
  118. package/dist/esm/tree-item/tree-item.styles.css +157 -153
  119. package/dist/esm/tree-item/tree-item.template.html +8 -7
  120. package/dist/esm/utils/autofocus.d.ts +12 -0
  121. package/dist/esm/utils/autofocus.js +25 -0
  122. package/dist/esm/utils/autofocus.js.map +1 -0
  123. package/dist/web-components-all.js +26 -20
  124. package/dist/web-components-all.min.js +15 -15
  125. package/dist/web-components.d.ts +9 -16
  126. package/dist/web-components.js +26 -20
  127. package/dist/web-components.min.js +15 -15
  128. package/package.json +4 -5
package/CHANGELOG.md CHANGED
@@ -1,12 +1,31 @@
1
1
  # Change Log - @fluentui/web-components
2
2
 
3
- This log was last generated on Thu, 11 Jun 2026 04:07:21 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 19 Jun 2026 04:05:16 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [3.0.0-rc.28](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.28)
8
+
9
+ Fri, 19 Jun 2026 04:05:16 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.27..@fluentui/web-components_v3.0.0-rc.28)
11
+
12
+ ### Changes
13
+
14
+ - fix anchor positioning for rtl ([PR #36321](https://github.com/microsoft/fluentui/pull/36321) by machi@microsoft.com)
15
+
16
+ ## [3.0.0-rc.27](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.27)
17
+
18
+ Fri, 12 Jun 2026 04:07:42 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.26..@fluentui/web-components_v3.0.0-rc.27)
20
+
21
+ ### Changes
22
+
23
+ - feat(web-components): generate SSR templates and stylesheets into src/ and copy into dist during compile ([PR #36259](https://github.com/microsoft/fluentui/pull/36259) by 863023+radium-v@users.noreply.github.com)
24
+ - fix: make sure autofocus works on all focusable custom elements during initial page load ([PR #36296](https://github.com/microsoft/fluentui/pull/36296) by machi@microsoft.com)
25
+
7
26
  ## [3.0.0-rc.26](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-rc.26)
8
27
 
9
- Thu, 11 Jun 2026 04:07:21 GMT
28
+ Thu, 11 Jun 2026 04:07:32 GMT
10
29
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-rc.25..@fluentui/web-components_v3.0.0-rc.26)
11
30
 
12
31
  ### Changes
package/README.md CHANGED
@@ -88,6 +88,32 @@ import CEM from '@fluentui/custom-elements.json' with { type: 'json' };
88
88
 
89
89
  To start the component development environment, run `yarn start`.
90
90
 
91
+ ### SSR templates and stylesheets
92
+
93
+ Each component ships a declarative-shadow-DOM template (`*.template.html`) and an extracted stylesheet (`*.styles.css`) next to its `*.template.ts` and `*.styles.ts` sources. These files are generated from the TypeScript sources and committed to the repo so the DSD output is visible without running a build.
94
+
95
+ After editing a `*.template.ts` or `*.styles.ts`, regenerate the matching HTML and CSS with:
96
+
97
+ ```sh
98
+ yarn generate:ssr
99
+ ```
100
+
101
+ To check that the committed files match what the generators would produce (for example, before opening a PR), run:
102
+
103
+ ```sh
104
+ yarn check:ssr
105
+ ```
106
+
107
+ `yarn compile` does not regenerate these files; it copies them from `src/` into `dist/esm/` alongside the compiled JS.
108
+
109
+ Use the `yarn check:ssr` summary to avoid clobbering intentional SSR-only edits:
110
+
111
+ - `stale`: the committed source and generated file are unchanged, but regeneration disagrees with disk. Rebase if needed, then run `yarn generate:ssr`, review the generated diff, and commit it with the related source or generator change.
112
+ - `hand-edited`: the generated HTML/CSS changed without a matching `*.template.ts` or `*.styles.ts` change. Do not overwrite it blindly; either move the intended delta into the TypeScript source or generator before regenerating, or reapply and call out the intentional SSR-only edit in the PR.
113
+ - `conflicts`: both the TypeScript source and generated file changed, and regeneration still disagrees with disk. Treat this like a merge conflict: inspect the current generated-file diff, regenerate, then preserve only the intentional SSR delta before committing.
114
+
115
+ Keep generated-file updates scoped to the component you changed. If `yarn check:ssr` reports unrelated stale files, leave them out of your PR and coordinate a dedicated cleanup.
116
+
91
117
  ### Known issue with Storybook site hot-reloading during development
92
118
 
93
119
  Storybook will watch modules for changes and hot-reload the module when necessary. This is usually great but poses a problem when the module being hot-reloaded defines a custom element. A custom element name can only be defined by the `CustomElementsRegistry` once, so reloading a module that defines a custom element will attempt to re-register the custom element name, throwing an error because the name has already been defined. This error will manifest with the following message:
@@ -9401,6 +9401,35 @@
9401
9401
  }
9402
9402
  ]
9403
9403
  },
9404
+ {
9405
+ "kind": "javascript-module",
9406
+ "path": "src/utils/autofocus.ts",
9407
+ "declarations": [
9408
+ {
9409
+ "kind": "function",
9410
+ "name": "maybeSetAutoFocus",
9411
+ "parameters": [
9412
+ {
9413
+ "name": "element",
9414
+ "type": {
9415
+ "text": "HTMLElement"
9416
+ }
9417
+ }
9418
+ ],
9419
+ "description": "Artificial sets the focus to the given element, if no other element in the\ndocument is currently focused and the given element meets the following\nconditions:\n\n- is connected to DOM\n- has `autofocus` attribute\n- is visible\n\nFor more details of this issue, see https://codepen.io/editor/marchbox/pen/019e9ab9-cd81-7c21-a3ae-1b7fe2d3458a"
9420
+ }
9421
+ ],
9422
+ "exports": [
9423
+ {
9424
+ "kind": "js",
9425
+ "name": "maybeSetAutoFocus",
9426
+ "declaration": {
9427
+ "name": "maybeSetAutoFocus",
9428
+ "module": "src/utils/autofocus.ts"
9429
+ }
9430
+ }
9431
+ ]
9432
+ },
9404
9433
  {
9405
9434
  "kind": "javascript-module",
9406
9435
  "path": "./dist/esm/button/button.base.js",
@@ -25498,26 +25527,6 @@
25498
25527
  ],
25499
25528
  "description": "Clicks the inner control when the component is clicked."
25500
25529
  },
25501
- {
25502
- "kind": "method",
25503
- "name": "focusinHandler",
25504
- "privacy": "public",
25505
- "return": {
25506
- "type": {
25507
- "text": "boolean | void"
25508
- }
25509
- },
25510
- "parameters": [
25511
- {
25512
- "name": "e",
25513
- "type": {
25514
- "text": "FocusEvent"
25515
- },
25516
- "description": "the event object"
25517
- }
25518
- ],
25519
- "description": "Focuses the inner control when the component is focused."
25520
- },
25521
25530
  {
25522
25531
  "kind": "method",
25523
25532
  "name": "select",
@@ -26140,30 +26149,6 @@
26140
26149
  "module": "src/text-input/text-input.base.ts"
26141
26150
  }
26142
26151
  },
26143
- {
26144
- "kind": "method",
26145
- "name": "focusinHandler",
26146
- "privacy": "public",
26147
- "return": {
26148
- "type": {
26149
- "text": "boolean | void"
26150
- }
26151
- },
26152
- "parameters": [
26153
- {
26154
- "name": "e",
26155
- "type": {
26156
- "text": "FocusEvent"
26157
- },
26158
- "description": "the event object"
26159
- }
26160
- ],
26161
- "description": "Focuses the inner control when the component is focused.",
26162
- "inheritedFrom": {
26163
- "name": "BaseTextInput",
26164
- "module": "src/text-input/text-input.base.ts"
26165
- }
26166
- },
26167
26152
  {
26168
26153
  "kind": "method",
26169
26154
  "name": "select",
@@ -28536,7 +28521,7 @@
28536
28521
  },
28537
28522
  {
28538
28523
  "kind": "javascript-module",
28539
- "path": "src/anchor-button/anchor-button.definition-async.ts",
28524
+ "path": "src/accordion-item/accordion-item.definition-async.ts",
28540
28525
  "declarations": [
28541
28526
  {
28542
28527
  "kind": "variable",
@@ -28545,7 +28530,7 @@
28545
28530
  "text": "PartialFASTElementDefinition"
28546
28531
  },
28547
28532
  "default": "{ name: tagName, templateOptions: 'defer-and-hydrate', }",
28548
- "description": "The async definition configuration for the fluent-anchor-button element.",
28533
+ "description": "The async definition configuration for the fluent-accordion-item element.",
28549
28534
  "privacy": "public"
28550
28535
  }
28551
28536
  ],
@@ -28555,20 +28540,20 @@
28555
28540
  "name": "definition",
28556
28541
  "declaration": {
28557
28542
  "name": "definition",
28558
- "module": "src/anchor-button/anchor-button.definition-async.ts"
28543
+ "module": "src/accordion-item/accordion-item.definition-async.ts"
28559
28544
  }
28560
28545
  }
28561
28546
  ]
28562
28547
  },
28563
28548
  {
28564
28549
  "kind": "javascript-module",
28565
- "path": "src/anchor-button/define-async.ts",
28550
+ "path": "src/accordion-item/define-async.ts",
28566
28551
  "declarations": [],
28567
28552
  "exports": []
28568
28553
  },
28569
28554
  {
28570
28555
  "kind": "javascript-module",
28571
- "path": "src/avatar/avatar.definition-async.ts",
28556
+ "path": "src/anchor-button/anchor-button.definition-async.ts",
28572
28557
  "declarations": [
28573
28558
  {
28574
28559
  "kind": "variable",
@@ -28577,7 +28562,7 @@
28577
28562
  "text": "PartialFASTElementDefinition"
28578
28563
  },
28579
28564
  "default": "{ name: tagName, templateOptions: 'defer-and-hydrate', }",
28580
- "description": "The async definition configuration for the fluent-avatar element.",
28565
+ "description": "The async definition configuration for the fluent-anchor-button element.",
28581
28566
  "privacy": "public"
28582
28567
  }
28583
28568
  ],
@@ -28587,14 +28572,14 @@
28587
28572
  "name": "definition",
28588
28573
  "declaration": {
28589
28574
  "name": "definition",
28590
- "module": "src/avatar/avatar.definition-async.ts"
28575
+ "module": "src/anchor-button/anchor-button.definition-async.ts"
28591
28576
  }
28592
28577
  }
28593
28578
  ]
28594
28579
  },
28595
28580
  {
28596
28581
  "kind": "javascript-module",
28597
- "path": "src/avatar/define-async.ts",
28582
+ "path": "src/anchor-button/define-async.ts",
28598
28583
  "declarations": [],
28599
28584
  "exports": []
28600
28585
  },
@@ -28664,7 +28649,7 @@
28664
28649
  },
28665
28650
  {
28666
28651
  "kind": "javascript-module",
28667
- "path": "src/accordion-item/accordion-item.definition-async.ts",
28652
+ "path": "src/avatar/avatar.definition-async.ts",
28668
28653
  "declarations": [
28669
28654
  {
28670
28655
  "kind": "variable",
@@ -28673,7 +28658,7 @@
28673
28658
  "text": "PartialFASTElementDefinition"
28674
28659
  },
28675
28660
  "default": "{ name: tagName, templateOptions: 'defer-and-hydrate', }",
28676
- "description": "The async definition configuration for the fluent-accordion-item element.",
28661
+ "description": "The async definition configuration for the fluent-avatar element.",
28677
28662
  "privacy": "public"
28678
28663
  }
28679
28664
  ],
@@ -28683,14 +28668,14 @@
28683
28668
  "name": "definition",
28684
28669
  "declaration": {
28685
28670
  "name": "definition",
28686
- "module": "src/accordion-item/accordion-item.definition-async.ts"
28671
+ "module": "src/avatar/avatar.definition-async.ts"
28687
28672
  }
28688
28673
  }
28689
28674
  ]
28690
28675
  },
28691
28676
  {
28692
28677
  "kind": "javascript-module",
28693
- "path": "src/accordion-item/define-async.ts",
28678
+ "path": "src/avatar/define-async.ts",
28694
28679
  "declarations": [],
28695
28680
  "exports": []
28696
28681
  },
@@ -1,8 +1,12 @@
1
+ :host([hidden]) {
2
+ display: none;
3
+ }
4
+ :host {
5
+ display: flex;
6
+ }
1
7
 
2
- :host([hidden]){display:none}:host{display:flex}
3
-
4
- :host {
5
- flex-direction: column;
6
- width: 100%;
7
- contain: content;
8
- }
8
+ :host {
9
+ flex-direction: column;
10
+ width: 100%;
11
+ contain: content;
12
+ }
@@ -1,5 +1,6 @@
1
1
  <f-template name="fluent-accordion" shadowrootmode="open">
2
- <template>{{styles}}
3
- <slot f-slotted="{slottedAccordionItems filter elements()}"></slot>
4
- </template>
2
+ <template>
3
+ {{styles}}
4
+ <slot f-slotted="{slottedAccordionItems filter elements()}"></slot>
5
+ </template>
5
6
  </f-template>
@@ -1,170 +1,174 @@
1
-
2
- :host([hidden]){display:none}:host{display:block}
3
-
4
- :host {
5
- max-width: fit-content;
6
- contain: content;
7
- }
8
-
9
- .heading {
10
- height: 44px;
11
- display: grid;
12
- position: relative;
13
- padding-inline: var(--spacingHorizontalM) var(--spacingHorizontalMNudge);
14
- border-radius: var(--borderRadiusMedium);
15
- font-family: var(--fontFamilyBase);
16
- font-size: var(--fontSizeBase300);
17
- font-weight: var(--fontWeightRegular);
18
- line-height: var(--lineHeightBase300);
19
- grid-template-columns: auto auto 1fr auto;
20
- }
21
-
22
- .button {
23
- appearance: none;
24
- background: var(--colorTransparentBackground);
25
- border: none;
26
- box-sizing: border-box;
27
- color: var(--colorNeutralForeground1);
28
- cursor: pointer;
29
- font: inherit;
30
- grid-column: auto / span 2;
31
- grid-row: 1;
32
- height: 44px;
33
- outline: none;
34
- padding: 0;
35
- text-align: start;
36
- }
37
-
38
- .button::before {
39
- content: '';
40
- position: absolute;
41
- inset: 0px;
42
- cursor: pointer;
43
- border-radius: var(--borderRadiusSmall);
44
- }
45
-
46
- :where(.default-marker-collapsed, .default-marker-expanded),
47
- ::slotted(:is([slot='marker-collapsed'], [slot='marker-expanded'])) {
48
- display: flex;
49
- align-items: center;
50
- justify-content: center;
51
- pointer-events: none;
52
- position: relative;
53
- height: 100%;
54
- padding-inline-end: var(--spacingHorizontalS);
55
- grid-column: 1 / span 1;
56
- grid-row: 1;
57
- }
58
-
59
- .content {
60
- margin: 0 var(--spacingHorizontalM);
61
- }
62
-
63
- ::slotted([slot='start']) {
64
- display: flex;
65
- justify-content: center;
66
- align-items: center;
67
- padding-right: var(--spacingHorizontalS);
68
- grid-column: 2 / span 1;
69
- grid-row: 1;
70
- }
71
-
72
- button:focus-visible::after {
73
- content: '';
74
- position: absolute;
75
- inset: 0px;
76
- cursor: pointer;
77
- border-radius: var(--borderRadiusSmall);
78
- outline: none;
79
- border: 2px solid var(--colorStrokeFocus1);
80
- box-shadow: inset 0 0 0 1px var(--colorStrokeFocus2);
81
- }
82
-
83
- /* --- Disabled attr styles --- */
84
-
85
- :host([disabled]) .button {
86
- color: var(--colorNeutralForegroundDisabled);
87
- }
88
-
89
- :host([disabled]) svg {
90
- filter: invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%);
91
- }
92
-
93
- /* --- Expanded attr styles --- */
94
-
95
- :host([expanded]) .content {
96
- display: block;
97
- }
98
-
99
- :host([expanded]) .default-marker-collapsed,
100
- :host([expanded]) ::slotted([slot='marker-collapsed']),
101
- :host(:not([expanded])) :is(.default-marker-expanded, .content),
102
- :host(:not([expanded])) ::slotted([slot='marker-expanded']) {
103
- display: none;
104
- }
105
-
106
- :host([expanded]) ::slotted([slot='marker-expanded']),
107
- :host(:not([expanded])) ::slotted([slot='marker-collapsed']) {
108
- display: flex;
109
- }
110
-
111
- /* --- Appearance attr styles --- */
112
-
113
- .heading {
114
- font-size: var(--fontSizeBase300);
115
- line-height: var(--lineHeightBase300);
116
- }
117
-
118
- :host([size='small']) .heading {
119
- font-size: var(--fontSizeBase200);
120
- line-height: var(--lineHeightBase200);
121
- }
122
-
123
- :host([size='large']) .heading {
124
- font-size: var(--fontSizeBase400);
125
- line-height: var(--lineHeightBase400);
126
- }
127
-
128
- :host([size='extra-large']) .heading {
129
- font-size: var(--fontSizeBase500);
130
- line-height: var(--lineHeightBase500);
131
- }
132
-
133
- /* --- marker-position attr styles --- */
134
-
135
- :host([marker-position='end']) ::slotted([slot='start']) {
136
- grid-column: 1 / span 1;
137
- }
138
-
139
- :host([marker-position='end']) :is(.default-marker-collapsed, .default-marker-expanded) {
140
- grid-column: 4 / span 1;
141
- padding-inline-start: var(--spacingHorizontalS);
142
- padding-inline-end: 0;
143
- }
144
-
145
- :host([marker-position='end']) .button {
146
- grid-column: 2 / span 3;
147
- }
148
-
149
- /* --- Block attr styles --- */
150
-
151
- :host([block]) {
152
- max-width: 100%;
153
- }
154
-
155
- :host([marker-position='end']) .heading {
156
- grid-template-columns: auto auto 28px;
157
- padding-inline: var(--spacingHorizontalM);
158
- }
159
-
160
- :host([marker-position='end']:has([slot='start'])) .heading {
161
- padding-inline: var(--spacingHorizontalMNudge) var(--spacingHorizontalM);
162
- }
163
-
164
- :host([block][marker-position='end']) .heading {
165
- grid-template-columns: auto 1fr;
166
- }
167
-
168
- :host([marker-position='end']) :is(.default-marker-collapsed, .default-marker-expanded) {
169
- grid-column: 5 / span 1;
170
- }
1
+ :host([hidden]) {
2
+ display: none;
3
+ }
4
+ :host {
5
+ display: block;
6
+ }
7
+
8
+ :host {
9
+ max-width: fit-content;
10
+ contain: content;
11
+ }
12
+
13
+ .heading {
14
+ height: 44px;
15
+ display: grid;
16
+ position: relative;
17
+ padding-inline: var(--spacingHorizontalM) var(--spacingHorizontalMNudge);
18
+ border-radius: var(--borderRadiusMedium);
19
+ font-family: var(--fontFamilyBase);
20
+ font-size: var(--fontSizeBase300);
21
+ font-weight: var(--fontWeightRegular);
22
+ line-height: var(--lineHeightBase300);
23
+ grid-template-columns: auto auto 1fr auto;
24
+ }
25
+
26
+ .button {
27
+ appearance: none;
28
+ background: var(--colorTransparentBackground);
29
+ border: none;
30
+ box-sizing: border-box;
31
+ color: var(--colorNeutralForeground1);
32
+ cursor: pointer;
33
+ font: inherit;
34
+ grid-column: auto / span 2;
35
+ grid-row: 1;
36
+ height: 44px;
37
+ outline: none;
38
+ padding: 0;
39
+ text-align: start;
40
+ }
41
+
42
+ .button::before {
43
+ content: '';
44
+ position: absolute;
45
+ inset: 0px;
46
+ cursor: pointer;
47
+ border-radius: var(--borderRadiusSmall);
48
+ }
49
+
50
+ :where(.default-marker-collapsed, .default-marker-expanded),
51
+ ::slotted(:is([slot='marker-collapsed'], [slot='marker-expanded'])) {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ pointer-events: none;
56
+ position: relative;
57
+ height: 100%;
58
+ padding-inline-end: var(--spacingHorizontalS);
59
+ grid-column: 1 / span 1;
60
+ grid-row: 1;
61
+ }
62
+
63
+ .content {
64
+ margin: 0 var(--spacingHorizontalM);
65
+ }
66
+
67
+ ::slotted([slot='start']) {
68
+ display: flex;
69
+ justify-content: center;
70
+ align-items: center;
71
+ padding-right: var(--spacingHorizontalS);
72
+ grid-column: 2 / span 1;
73
+ grid-row: 1;
74
+ }
75
+
76
+ button:focus-visible::after {
77
+ content: '';
78
+ position: absolute;
79
+ inset: 0px;
80
+ cursor: pointer;
81
+ border-radius: var(--borderRadiusSmall);
82
+ outline: none;
83
+ border: 2px solid var(--colorStrokeFocus1);
84
+ box-shadow: inset 0 0 0 1px var(--colorStrokeFocus2);
85
+ }
86
+
87
+ /* --- Disabled attr styles --- */
88
+
89
+ :host([disabled]) .button {
90
+ color: var(--colorNeutralForegroundDisabled);
91
+ }
92
+
93
+ :host([disabled]) svg {
94
+ filter: invert(89%) sepia(0%) saturate(569%) hue-rotate(155deg) brightness(88%) contrast(87%);
95
+ }
96
+
97
+ /* --- Expanded attr styles --- */
98
+
99
+ :host([expanded]) .content {
100
+ display: block;
101
+ }
102
+
103
+ :host([expanded]) .default-marker-collapsed,
104
+ :host([expanded]) ::slotted([slot='marker-collapsed']),
105
+ :host(:not([expanded])) :is(.default-marker-expanded, .content),
106
+ :host(:not([expanded])) ::slotted([slot='marker-expanded']) {
107
+ display: none;
108
+ }
109
+
110
+ :host([expanded]) ::slotted([slot='marker-expanded']),
111
+ :host(:not([expanded])) ::slotted([slot='marker-collapsed']) {
112
+ display: flex;
113
+ }
114
+
115
+ /* --- Appearance attr styles --- */
116
+
117
+ .heading {
118
+ font-size: var(--fontSizeBase300);
119
+ line-height: var(--lineHeightBase300);
120
+ }
121
+
122
+ :host([size='small']) .heading {
123
+ font-size: var(--fontSizeBase200);
124
+ line-height: var(--lineHeightBase200);
125
+ }
126
+
127
+ :host([size='large']) .heading {
128
+ font-size: var(--fontSizeBase400);
129
+ line-height: var(--lineHeightBase400);
130
+ }
131
+
132
+ :host([size='extra-large']) .heading {
133
+ font-size: var(--fontSizeBase500);
134
+ line-height: var(--lineHeightBase500);
135
+ }
136
+
137
+ /* --- marker-position attr styles --- */
138
+
139
+ :host([marker-position='end']) ::slotted([slot='start']) {
140
+ grid-column: 1 / span 1;
141
+ }
142
+
143
+ :host([marker-position='end']) :is(.default-marker-collapsed, .default-marker-expanded) {
144
+ grid-column: 4 / span 1;
145
+ padding-inline-start: var(--spacingHorizontalS);
146
+ padding-inline-end: 0;
147
+ }
148
+
149
+ :host([marker-position='end']) .button {
150
+ grid-column: 2 / span 3;
151
+ }
152
+
153
+ /* --- Block attr styles --- */
154
+
155
+ :host([block]) {
156
+ max-width: 100%;
157
+ }
158
+
159
+ :host([marker-position='end']) .heading {
160
+ grid-template-columns: auto auto 28px;
161
+ padding-inline: var(--spacingHorizontalM);
162
+ }
163
+
164
+ :host([marker-position='end']:has([slot='start'])) .heading {
165
+ padding-inline: var(--spacingHorizontalMNudge) var(--spacingHorizontalM);
166
+ }
167
+
168
+ :host([block][marker-position='end']) .heading {
169
+ grid-template-columns: auto 1fr;
170
+ }
171
+
172
+ :host([marker-position='end']) :is(.default-marker-collapsed, .default-marker-expanded) {
173
+ grid-column: 5 / span 1;
174
+ }