chrome-devtools-frontend 1.0.1549484 → 1.0.1550444

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 (196) hide show
  1. package/docs/styleguide/ux/components.md +53 -12
  2. package/docs/styleguide/ux/images/cards.png +0 -0
  3. package/docs/ui_engineering.md +2 -2
  4. package/front_end/core/sdk/NetworkManager.ts +12 -10
  5. package/front_end/core/sdk/PageResourceLoader.ts +8 -1
  6. package/front_end/core/sdk/SourceMapManager.ts +12 -6
  7. package/front_end/entrypoints/main/MainImpl.ts +0 -9
  8. package/front_end/foundation/Universe.ts +7 -0
  9. package/front_end/generated/InspectorBackendCommands.ts +5 -2
  10. package/front_end/generated/protocol-mapping.d.ts +8 -0
  11. package/front_end/generated/protocol-proxy-api.d.ts +6 -0
  12. package/front_end/generated/protocol.ts +76 -0
  13. package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
  14. package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
  15. package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
  16. package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
  17. package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
  18. package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
  19. package/front_end/models/issues_manager/CookieIssue.ts +27 -30
  20. package/front_end/models/issues_manager/CorsIssue.ts +8 -17
  21. package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
  22. package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
  23. package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
  24. package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
  25. package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
  26. package/front_end/models/issues_manager/GenericIssue.ts +11 -16
  27. package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
  28. package/front_end/models/issues_manager/Issue.ts +12 -4
  29. package/front_end/models/issues_manager/IssueAggregator.ts +8 -2
  30. package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
  31. package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
  32. package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
  33. package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
  34. package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
  35. package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
  36. package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
  37. package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
  38. package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
  39. package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
  40. package/front_end/models/javascript_metadata/NativeFunctions.js +0 -13
  41. package/front_end/panels/application/AppManifestView.ts +4 -4
  42. package/front_end/panels/application/ApplicationPanelSidebar.ts +21 -21
  43. package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
  44. package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
  45. package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
  46. package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
  47. package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
  48. package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
  49. package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
  50. package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
  51. package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
  52. package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
  53. package/front_end/panels/application/StorageView.ts +2 -2
  54. package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
  55. package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
  56. package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
  57. package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
  58. package/front_end/panels/application/components/TrustTokensView.ts +1 -1
  59. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
  60. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +1 -1
  61. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
  62. package/front_end/panels/changes/ChangesSidebar.ts +2 -0
  63. package/front_end/panels/changes/CombinedDiffView.ts +2 -0
  64. package/front_end/panels/common/AnnotationManager.ts +71 -0
  65. package/front_end/panels/common/PersistenceUtils.ts +6 -7
  66. package/front_end/panels/common/common.ts +1 -0
  67. package/front_end/panels/console/ConsolePrompt.ts +4 -4
  68. package/front_end/panels/console/ConsoleView.ts +2 -2
  69. package/front_end/panels/console/ConsoleViewMessage.ts +10 -11
  70. package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
  71. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
  72. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
  73. package/front_end/panels/elements/ElementsPanel.ts +49 -0
  74. package/front_end/panels/elements/ElementsTreeElement.ts +156 -108
  75. package/front_end/panels/elements/ElementsTreeOutline.ts +9 -2
  76. package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
  77. package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
  78. package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
  79. package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
  80. package/front_end/panels/elements/TopLayerContainer.ts +2 -2
  81. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  82. package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
  83. package/front_end/panels/elements/components/QueryContainer.ts +1 -1
  84. package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -1
  85. package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
  86. package/front_end/panels/explain/components/ConsoleInsight.ts +6 -4
  87. package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
  88. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
  89. package/front_end/panels/issues/IssueKindView.ts +2 -2
  90. package/front_end/panels/issues/IssueView.ts +4 -4
  91. package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
  92. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
  93. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
  94. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
  95. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
  96. package/front_end/panels/media/PlayerListView.ts +1 -1
  97. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
  98. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +2 -3
  99. package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
  100. package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
  101. package/front_end/panels/network/NetworkItemView.ts +4 -4
  102. package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
  103. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  104. package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
  105. package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
  106. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
  107. package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
  108. package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
  109. package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
  110. package/front_end/panels/recorder/components/CreateRecordingView.ts +1 -1
  111. package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
  112. package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
  113. package/front_end/panels/recorder/components/RecordingView.ts +1 -1
  114. package/front_end/panels/recorder/components/StepView.ts +1 -1
  115. package/front_end/panels/screencast/ScreencastView.ts +8 -8
  116. package/front_end/panels/search/SearchView.ts +1 -1
  117. package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
  118. package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
  119. package/front_end/panels/security/SecurityPanel.ts +5 -5
  120. package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
  121. package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -4
  122. package/front_end/panels/settings/SettingsScreen.ts +2 -3
  123. package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -8
  124. package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
  125. package/front_end/panels/sources/BreakpointsView.ts +1 -1
  126. package/front_end/panels/sources/CSSPlugin.ts +3 -3
  127. package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
  128. package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
  129. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +39 -30
  130. package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -7
  131. package/front_end/panels/sources/NavigatorView.ts +2 -2
  132. package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -15
  133. package/front_end/panels/sources/OutlineQuickOpen.ts +23 -26
  134. package/front_end/panels/sources/SourcesView.ts +2 -2
  135. package/front_end/panels/sources/TabbedEditorContainer.ts +4 -5
  136. package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
  137. package/front_end/panels/sources/UISourceCodeFrame.ts +5 -5
  138. package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
  139. package/front_end/panels/timeline/TimelinePanel.ts +14 -9
  140. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
  141. package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
  142. package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
  143. package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
  144. package/front_end/panels/timeline/components/OriginMap.ts +1 -1
  145. package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
  146. package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -1
  147. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -1
  148. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
  149. package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
  150. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
  151. package/front_end/panels/timeline/timeline-meta.ts +3 -2
  152. package/front_end/panels/utils/utils.ts +1 -0
  153. package/front_end/third_party/chromium/README.chromium +1 -1
  154. package/front_end/ui/components/adorners/Adorner.ts +20 -0
  155. package/front_end/ui/components/annotations/AnnotationRepository.ts +1 -1
  156. package/front_end/ui/components/buttons/Button.ts +1 -1
  157. package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
  158. package/front_end/ui/components/highlighting/HighlightElement.ts +15 -2
  159. package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
  160. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  161. package/front_end/ui/components/icon_button/icon_button.ts +0 -2
  162. package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
  163. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
  164. package/front_end/ui/components/markdown_view/MarkdownImage.ts +3 -3
  165. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  166. package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
  167. package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
  168. package/front_end/ui/components/text_editor/config.ts +2 -2
  169. package/front_end/ui/kit/cards/Card.docs.ts +43 -0
  170. package/front_end/ui/{components/icon_button → kit/icons}/Icon.docs.ts +3 -4
  171. package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +4 -4
  172. package/front_end/ui/kit/kit.ts +1 -0
  173. package/front_end/ui/legacy/Infobar.ts +3 -3
  174. package/front_end/ui/legacy/InspectorView.ts +3 -3
  175. package/front_end/ui/legacy/SearchableView.ts +2 -2
  176. package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
  177. package/front_end/ui/legacy/SoftDropDown.ts +2 -2
  178. package/front_end/ui/legacy/TabbedPane.ts +9 -9
  179. package/front_end/ui/legacy/Toolbar.ts +3 -3
  180. package/front_end/ui/legacy/Treeoutline.ts +2 -2
  181. package/front_end/ui/legacy/UIUtils.ts +4 -4
  182. package/front_end/ui/legacy/ViewManager.ts +4 -4
  183. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
  184. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
  185. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +4 -4
  186. package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
  187. package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
  188. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
  189. package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
  190. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +22 -29
  191. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -15
  192. package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -14
  193. package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
  194. package/mcp/mcp.ts +1 -0
  195. package/package.json +1 -1
  196. /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
@@ -8,10 +8,10 @@ import type * as Host from '../../../core/host/host.js';
8
8
  import * as i18n from '../../../core/i18n/i18n.js';
9
9
  import * as TextUtils from '../../../models/text_utils/text_utils.js';
10
10
  import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
11
+ import {Icon} from '../../kit/kit.js';
11
12
  import * as UI from '../../legacy/legacy.js';
12
13
  import * as VisualLogging from '../../visual_logging/visual_logging.js';
13
14
  import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
14
- import * as Icon from '../icon_button/icon_button.js';
15
15
 
16
16
  import {editorTheme} from './theme.js';
17
17
 
@@ -200,7 +200,7 @@ export const codeFolding = DynamicSetting.bool('text-editor-code-folding', [
200
200
  CM.foldGutter({
201
201
  markerDOM(open: boolean): HTMLElement {
202
202
  const iconName = open ? 'triangle-down' : 'triangle-right';
203
- const icon = new Icon.Icon.Icon();
203
+ const icon = new Icon();
204
204
  icon.setAttribute('class', open ? 'cm-foldGutterElement' : 'cm-foldGutterElement cm-foldGutterElement-folded');
205
205
  icon.setAttribute('jslog', `${VisualLogging.expand().track({click: true})}`);
206
206
  icon.name = iconName;
@@ -0,0 +1,43 @@
1
+ // Copyright 2025 The Chromium Authors
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import '../kit.js';
6
+
7
+ import * as Lit from '../../lit/lit.js';
8
+
9
+ const {html} = Lit;
10
+
11
+ export function render(container: HTMLElement): void {
12
+ Lit.render(
13
+ html`
14
+ <style>
15
+ devtools-card {
16
+ margin: 1em;
17
+ }
18
+ .content {
19
+ padding: 1em;
20
+ }
21
+ span {
22
+ align-self: center;
23
+ }
24
+ </style>
25
+ <h2>Basic card with heading</h2>
26
+ <devtools-card heading="Simple card">
27
+ <div class="content">This is a simple card.</div>
28
+ </devtools-card>
29
+
30
+ <h2>Card without a heading</h2>
31
+ <devtools-card>
32
+ <div class="content">This is a card without a heading.</div>
33
+ </devtools-card>
34
+
35
+ <h2>Card with rich heading</h2>
36
+ <devtools-card heading="Card with rich heading">
37
+ <span slot="heading-prefix">Slotted heading prefix</span>
38
+ <span slot="heading-suffix">Slotted heading suffix</span>
39
+ <div class="content">This is a card with a rich heading.</div>
40
+ </devtools-card>
41
+ `,
42
+ container);
43
+ }
@@ -3,8 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Lit from '../../lit/lit.js';
6
-
7
- import {Icon} from './icon_button.js';
6
+ import {createIcon} from '../kit.js';
8
7
 
9
8
  const {html} = Lit;
10
9
 
@@ -26,7 +25,7 @@ export function render(container: HTMLElement): void {
26
25
  iconDescription1.textContent = 'Programmatically created with default size and color';
27
26
  row1.appendChild(iconDescription1);
28
27
 
29
- const icon = Icon.create('select-element');
28
+ const icon = createIcon('select-element');
30
29
  const icon1 = document.createElement('td');
31
30
  icon1.appendChild(icon);
32
31
  row1.appendChild(icon1);
@@ -38,7 +37,7 @@ export function render(container: HTMLElement): void {
38
37
  iconDescription2.textContent = 'Programmatically created with custom size and color';
39
38
  row2.appendChild(iconDescription2);
40
39
 
41
- const otherIcon = Icon.create('issue-exclamation-filled');
40
+ const otherIcon = createIcon('issue-exclamation-filled');
42
41
  otherIcon.classList.toggle('custom-size-and-color');
43
42
  const icon2 = document.createElement('td');
44
43
  icon2.appendChild(otherIcon);
@@ -1,7 +1,7 @@
1
1
  // Copyright 2020 The Chromium Authors
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
- /* eslint-disable @devtools/no-imperative-dom-api, @devtools/enforce-custom-element-definitions-location */
4
+ /* eslint-disable @devtools/no-imperative-dom-api */
5
5
 
6
6
  import '../../../Images/Images.js';
7
7
 
@@ -35,8 +35,8 @@ export type IconData = IconWithName|{
35
35
  *
36
36
  * ```js
37
37
  * // Instantiate programmatically via the `create()` helper:
38
- * const icon = IconButton.Icon.create('bin');
39
- * const iconWithClassName = IconButton.Icon.create('bin', 'delete-icon');
38
+ * const icon = createIcon('bin');
39
+ * const iconWithClassName = createIcon('bin', 'delete-icon');
40
40
  *
41
41
  * // Use within a template:
42
42
  * Lit.html`
@@ -167,7 +167,7 @@ export class Icon extends HTMLElement {
167
167
  * @param className optional CSS class name(s) to put onto the element.
168
168
  * @returns the newly created `Icon` instance.
169
169
  */
170
- export const create = (name: string, className?: string): Icon => {
170
+ export const createIcon = (name: string, className?: string): Icon => {
171
171
  const icon = new Icon();
172
172
  icon.name = name;
173
173
  if (className !== undefined) {
@@ -3,3 +3,4 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  export * from './cards/Card.js';
6
+ export * from './icons/Icon.js';
@@ -7,7 +7,7 @@ import type * as Common from '../../core/common/common.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as Buttons from '../../ui/components/buttons/buttons.js';
9
9
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
10
- import * as IconButton from '../components/icon_button/icon_button.js';
10
+ import {createIcon} from '../kit/kit.js';
11
11
 
12
12
  import * as ARIAUtils from './ARIAUtils.js';
13
13
  import infobarStyles from './infobar.css.js';
@@ -55,7 +55,7 @@ export class Infobar {
55
55
  this.shadowRoot = createShadowRootWithCoreStyles(this.element, {cssFile: infobarStyles});
56
56
 
57
57
  this.contentElement = this.shadowRoot.createChild('div', 'infobar infobar-' + type);
58
- const icon = IconButton.Icon.create(TYPE_TO_ICON[type], type + '-icon');
58
+ const icon = createIcon(TYPE_TO_ICON[type], type + '-icon');
59
59
  this.contentElement.createChild('div', 'icon-container').appendChild(icon);
60
60
 
61
61
  this.mainRow = this.contentElement.createChild('div', 'infobar-main-row');
@@ -180,7 +180,7 @@ export class Infobar {
180
180
  if (!this.detailsRows) {
181
181
  const details = document.createElement('details');
182
182
  const summary = details.createChild('summary');
183
- const triangleIcon = IconButton.Icon.create('arrow-drop-down');
183
+ const triangleIcon = createIcon('arrow-drop-down');
184
184
  summary.createChild('div', 'icon-container').appendChild(triangleIcon);
185
185
  this.contentElement.insertBefore(details, this.mainRow);
186
186
  summary.appendChild(this.mainRow);
@@ -9,7 +9,7 @@ import * as i18n from '../../core/i18n/i18n.js';
9
9
  import * as Root from '../../core/root/root.js';
10
10
  import * as SDK from '../../core/sdk/sdk.js';
11
11
  import * as Buttons from '../../ui/components/buttons/buttons.js';
12
- import * as IconButton from '../components/icon_button/icon_button.js';
12
+ import {createIcon, type Icon} from '../kit/kit.js';
13
13
  import * as VisualLogging from '../visual_logging/visual_logging.js';
14
14
 
15
15
  import type {ActionDelegate as ActionDelegateInterface} from './ActionRegistration.js';
@@ -429,10 +429,10 @@ export class InspectorView extends VBox implements ViewLocationResolver {
429
429
  // Find the tabbed location where the panel lives
430
430
  const tabbedPane = this.getTabbedPaneForTabId(tabId);
431
431
  if (tabbedPane) {
432
- let icon: IconButton.Icon.Icon|null = null;
432
+ let icon: Icon|null = null;
433
433
  if (warnings.length !== 0) {
434
434
  const warning = warnings.length === 1 ? warnings[0] : '· ' + warnings.join('\n· ');
435
- icon = IconButton.Icon.create('warning-filled', 'small');
435
+ icon = createIcon('warning-filled', 'small');
436
436
  icon.classList.add('warning');
437
437
  Tooltip.install(icon, warning);
438
438
  }
@@ -41,7 +41,7 @@ import * as i18n from '../../core/i18n/i18n.js';
41
41
  import * as Platform from '../../core/platform/platform.js';
42
42
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
43
43
  import * as Buttons from '../components/buttons/buttons.js';
44
- import * as IconButton from '../components/icon_button/icon_button.js';
44
+ import {createIcon} from '../kit/kit.js';
45
45
 
46
46
  import * as ARIAUtils from './ARIAUtils.js';
47
47
  import {InspectorView} from './InspectorView.js';
@@ -189,7 +189,7 @@ export class SearchableView extends VBox {
189
189
  // Elements within `searchInputElements` are added according to their expected tab order.
190
190
  const searchInputElements = this.footerElement.createChild('div', 'search-inputs');
191
191
  const iconAndInput = searchInputElements.createChild('div', 'icon-and-input');
192
- const searchIcon = IconButton.Icon.create('search');
192
+ const searchIcon = createIcon('search');
193
193
  iconAndInput.appendChild(searchIcon);
194
194
 
195
195
  this.searchInputElement = createHistoryInput('search', 'search-replace search');
@@ -6,7 +6,7 @@
6
6
 
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import type * as Platform from '../../core/platform/platform.js';
9
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
9
+ import {createIcon} from '../../ui/kit/kit.js';
10
10
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
11
11
 
12
12
  import * as ARIAUtils from './ARIAUtils.js';
@@ -218,7 +218,7 @@ export class SoftContextMenu {
218
218
 
219
219
  // If the menu contains a checkbox, add checkbox space in front of the label to align the items
220
220
  if (menuContainsCheckbox) {
221
- const checkMarkElement = IconButton.Icon.create('checkmark', 'checkmark');
221
+ const checkMarkElement = createIcon('checkmark', 'checkmark');
222
222
  menuItemElement.appendChild(checkMarkElement);
223
223
  }
224
224
  if (item.tooltip) {
@@ -293,7 +293,7 @@ export class SoftContextMenu {
293
293
  ARIAUtils.setLabel(menuItemElement, accessibleName);
294
294
 
295
295
  if (item.isExperimentalFeature) {
296
- const experimentIcon = IconButton.Icon.create('experiment');
296
+ const experimentIcon = createIcon('experiment');
297
297
  menuItemElement.appendChild(experimentIcon);
298
298
  }
299
299
 
@@ -317,14 +317,14 @@ export class SoftContextMenu {
317
317
 
318
318
  // If the menu contains a checkbox, add checkbox space in front of the label to align the items
319
319
  if (menuContainsCheckbox) {
320
- const checkMarkElement = IconButton.Icon.create('checkmark', 'checkmark soft-context-menu-item-checkmark');
320
+ const checkMarkElement = createIcon('checkmark', 'checkmark soft-context-menu-item-checkmark');
321
321
  menuItemElement.appendChild(checkMarkElement);
322
322
  }
323
323
 
324
324
  createTextChild(menuItemElement, item.label || '');
325
325
  ARIAUtils.setExpanded(menuItemElement, false);
326
326
 
327
- const subMenuArrowElement = IconButton.Icon.create('keyboard-arrow-right', 'soft-context-menu-item-submenu-arrow');
327
+ const subMenuArrowElement = createIcon('keyboard-arrow-right', 'soft-context-menu-item-submenu-arrow');
328
328
  menuItemElement.appendChild(subMenuArrowElement);
329
329
 
330
330
  menuItemElement.addEventListener('mousedown', this.menuItemMouseDown.bind(this), false);
@@ -6,7 +6,7 @@
6
6
  import type * as Common from '../../core/common/common.js';
7
7
  import * as i18n from '../../core/i18n/i18n.js';
8
8
  import * as Geometry from '../../models/geometry/geometry.js';
9
- import * as IconButton from '../components/icon_button/icon_button.js';
9
+ import {createIcon} from '../kit/kit.js';
10
10
  import * as VisualLogging from '../visual_logging/visual_logging.js';
11
11
 
12
12
  import * as ARIAUtils from './ARIAUtils.js';
@@ -56,7 +56,7 @@ export class SoftDropDown<T> implements ListDelegate<T> {
56
56
  this.element.classList.add('soft-dropdown');
57
57
  appendStyle(this.element, softDropDownButtonStyles);
58
58
  this.titleElement = this.element.createChild('span', 'title');
59
- const dropdownArrowIcon = IconButton.Icon.create('triangle-down');
59
+ const dropdownArrowIcon = createIcon('triangle-down');
60
60
  this.element.appendChild(dropdownArrowIcon);
61
61
  ARIAUtils.setExpanded(this.element, false);
62
62
 
@@ -13,7 +13,7 @@ import * as Geometry from '../../models/geometry/geometry.js';
13
13
  import * as Annotations from '../../ui/components/annotations/annotations.js';
14
14
  import * as Buttons from '../../ui/components/buttons/buttons.js';
15
15
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
16
- import * as IconButton from '../components/icon_button/icon_button.js';
16
+ import {createIcon, Icon} from '../kit/kit.js';
17
17
 
18
18
  import * as ARIAUtils from './ARIAUtils.js';
19
19
  import {ContextMenu} from './ContextMenu.js';
@@ -402,7 +402,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
402
402
  return this.tabsHistory.slice(0, tabsCount).map(tabToTabId);
403
403
  }
404
404
 
405
- setTabIcon(id: string, icon: IconButton.Icon.Icon|null): void {
405
+ setTabIcon(id: string, icon: Icon|null): void {
406
406
  const tab = this.tabsById.get(id);
407
407
  if (!tab) {
408
408
  return;
@@ -411,7 +411,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
411
411
  this.requestUpdate();
412
412
  }
413
413
 
414
- setTrailingTabIcon(id: string, icon: IconButton.Icon.Icon|null): void {
414
+ setTrailingTabIcon(id: string, icon: Icon|null): void {
415
415
  const tab = this.tabsById.get(id);
416
416
  if (!tab) {
417
417
  return;
@@ -662,7 +662,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
662
662
  const dropDownContainer = document.createElement('div');
663
663
  dropDownContainer.classList.add('tabbed-pane-header-tabs-drop-down-container');
664
664
  dropDownContainer.setAttribute('jslog', `${VisualLogging.dropDown('more-tabs').track({click: true})}`);
665
- const chevronIcon = IconButton.Icon.create('chevron-double-right', 'chevron-icon');
665
+ const chevronIcon = createIcon('chevron-double-right', 'chevron-icon');
666
666
  const moreTabsString = i18nString(UIStrings.moreTabs);
667
667
  dropDownContainer.title = moreTabsString;
668
668
  ARIAUtils.markAsMenuButton(dropDownContainer);
@@ -1070,7 +1070,7 @@ export class TabbedPaneTab {
1070
1070
  shown: boolean;
1071
1071
  measuredWidth!: number|undefined;
1072
1072
  #tabElement!: HTMLElement|undefined;
1073
- private icon: IconButton.Icon.Icon|null = null;
1073
+ private icon: Icon|null = null;
1074
1074
  private suffixElement: HTMLElement|null = null;
1075
1075
  #width?: number;
1076
1076
  private delegate?: TabbedPaneTabDelegate;
@@ -1147,7 +1147,7 @@ export class TabbedPaneTab {
1147
1147
  return this.closeable;
1148
1148
  }
1149
1149
 
1150
- setIcon(icon: IconButton.Icon.Icon|null): void {
1150
+ setIcon(icon: Icon|null): void {
1151
1151
  this.icon = icon;
1152
1152
  if (this.#tabElement && this.titleElement) {
1153
1153
  this.createIconElement(this.#tabElement, this.titleElement, false);
@@ -1250,7 +1250,7 @@ export class TabbedPaneTab {
1250
1250
  tabSuffixElements.set(tabElement, suffixElementContainer);
1251
1251
  }
1252
1252
 
1253
- private createMeasureClone(original: IconButton.Icon.Icon): Element {
1253
+ private createMeasureClone(original: Icon): Element {
1254
1254
  // Cloning doesn't work for the icon component because the shadow
1255
1255
  // root isn't copied, but it is sufficient to create a div styled
1256
1256
  // to be the same size.
@@ -1319,7 +1319,7 @@ export class TabbedPaneTab {
1319
1319
  // TODO(finnur): Replace the ai-icon with the squiggly svg once it becomes available.
1320
1320
  const iconContainer = document.createElement('div');
1321
1321
  iconContainer.classList.add('ai-icon');
1322
- const tabAnnotationIcon = new IconButton.Icon.Icon();
1322
+ const tabAnnotationIcon = new Icon();
1323
1323
  tabAnnotationIcon.name = 'smart-assistant';
1324
1324
  tabAnnotationIcon.classList.add('small');
1325
1325
  iconContainer.appendChild(tabAnnotationIcon);
@@ -1346,7 +1346,7 @@ export class TabbedPaneTab {
1346
1346
  private createPreviewIcon(): HTMLDivElement {
1347
1347
  const iconContainer = document.createElement('div');
1348
1348
  iconContainer.classList.add('preview-icon');
1349
- const previewIcon = new IconButton.Icon.Icon();
1349
+ const previewIcon = new Icon();
1350
1350
  previewIcon.name = 'experiment';
1351
1351
  previewIcon.classList.add('small');
1352
1352
  iconContainer.appendChild(previewIcon);
@@ -10,7 +10,7 @@ import * as Platform from '../../core/platform/platform.js';
10
10
  import * as Root from '../../core/root/root.js';
11
11
  import * as Buttons from '../../ui/components/buttons/buttons.js';
12
12
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
13
- import * as IconButton from '../components/icon_button/icon_button.js';
13
+ import {createIcon} from '../kit/kit.js';
14
14
 
15
15
  import {type Action, Events as ActionEvents} from './ActionRegistration.js';
16
16
  import {ActionRegistry} from './ActionRegistry.js';
@@ -824,7 +824,7 @@ export class ToolbarFilter extends ToolbarInput {
824
824
  filterPlaceholder, filterPlaceholder, growFactor, shrinkFactor, tooltip, completions, dynamicCompletions,
825
825
  jslogContext || 'filter', element);
826
826
 
827
- const filterIcon = IconButton.Icon.create('filter');
827
+ const filterIcon = createIcon('filter');
828
828
  this.element.prepend(filterIcon);
829
829
  this.element.classList.add('toolbar-filter');
830
830
  }
@@ -997,7 +997,7 @@ export class ToolbarMenuButton extends ToolbarItem<ToolbarButton.EventTypes> {
997
997
  this.title = '';
998
998
  if (!isIconDropdown) {
999
999
  this.element.classList.add('toolbar-has-dropdown');
1000
- const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');
1000
+ const dropdownArrowIcon = createIcon('triangle-down', 'toolbar-dropdown-arrow');
1001
1001
  this.element.appendChild(dropdownArrowIcon);
1002
1002
  }
1003
1003
  if (jslogContext) {
@@ -40,7 +40,7 @@ import * as SDK from '../../core/sdk/sdk.js';
40
40
  import type * as TextUtils from '../../models/text_utils/text_utils.js';
41
41
  import type * as Buttons from '../components/buttons/buttons.js';
42
42
  import * as Highlighting from '../components/highlighting/highlighting.js';
43
- import type * as IconButton from '../components/icon_button/icon_button.js';
43
+ import type {Icon} from '../kit/kit.js';
44
44
  import * as Lit from '../lit/lit.js';
45
45
  import * as VisualLogging from '../visual_logging/visual_logging.js';
46
46
 
@@ -810,7 +810,7 @@ export class TreeElement {
810
810
  }
811
811
  }
812
812
 
813
- setLeadingIcons(icons: IconButton.Icon.Icon[]|Lit.TemplateResult[]): void {
813
+ setLeadingIcons(icons: Icon[]|Lit.TemplateResult[]): void {
814
814
  if (!this.leadingIconsElement && !icons.length) {
815
815
  return;
816
816
  }
@@ -42,7 +42,7 @@ import * as i18n from '../../core/i18n/i18n.js';
42
42
  import * as Platform from '../../core/platform/platform.js';
43
43
  import * as Geometry from '../../models/geometry/geometry.js';
44
44
  import * as Buttons from '../components/buttons/buttons.js';
45
- import * as IconButton from '../components/icon_button/icon_button.js';
45
+ import {Icon, type IconData} from '../kit/kit.js';
46
46
  import * as Lit from '../lit/lit.js';
47
47
  import * as VisualLogging from '../visual_logging/visual_logging.js';
48
48
 
@@ -1281,19 +1281,19 @@ export class CheckboxLabel extends HTMLElement {
1281
1281
  customElements.define('devtools-checkbox', CheckboxLabel);
1282
1282
 
1283
1283
  export class DevToolsIconLabel extends HTMLElement {
1284
- readonly #icon: IconButton.Icon.Icon;
1284
+ readonly #icon: Icon;
1285
1285
 
1286
1286
  constructor() {
1287
1287
  super();
1288
1288
  const root = createShadowRootWithCoreStyles(this);
1289
- this.#icon = new IconButton.Icon.Icon();
1289
+ this.#icon = new Icon();
1290
1290
  this.#icon.style.setProperty('margin-right', '4px');
1291
1291
  this.#icon.style.setProperty('vertical-align', 'baseline');
1292
1292
  root.appendChild(this.#icon);
1293
1293
  root.createChild('slot');
1294
1294
  }
1295
1295
 
1296
- set data(data: IconButton.Icon.IconData) {
1296
+ set data(data: IconData) {
1297
1297
  this.#icon.data = data;
1298
1298
  // TODO(crbug.com/1427397): Clean this up. This was necessary so `DevToolsIconLabel` can use Lit icon
1299
1299
  // while being backwards-compatible with the legacy Icon while working for both small and large icons.
@@ -11,7 +11,7 @@ import * as i18n from '../../core/i18n/i18n.js';
11
11
  import * as Platform from '../../core/platform/platform.js';
12
12
  import * as Root from '../../core/root/root.js';
13
13
  import type * as Foundation from '../../foundation/foundation.js';
14
- import * as IconButton from '../components/icon_button/icon_button.js';
14
+ import {createIcon, type Icon} from '../kit/kit.js';
15
15
  import * as VisualLogging from '../visual_logging/visual_logging.js';
16
16
 
17
17
  import * as ARIAUtils from './ARIAUtils.js';
@@ -472,7 +472,7 @@ export class ContainerWidget extends VBox {
472
472
 
473
473
  class ExpandableContainerWidget extends VBox {
474
474
  private titleElement: HTMLDivElement;
475
- private readonly titleExpandIcon: IconButton.Icon.Icon;
475
+ private readonly titleExpandIcon: Icon;
476
476
  private readonly view: View;
477
477
  private widget?: Widget;
478
478
  private materializePromise?: Promise<void>;
@@ -489,7 +489,7 @@ class ExpandableContainerWidget extends VBox {
489
489
  keydown: 'Enter|Space|ArrowLeft|ArrowRight',
490
490
  })}`);
491
491
  ARIAUtils.markAsTreeitem(this.titleElement);
492
- this.titleExpandIcon = IconButton.Icon.create('triangle-right', 'title-expand-icon');
492
+ this.titleExpandIcon = createIcon('triangle-right', 'title-expand-icon');
493
493
  this.titleElement.appendChild(this.titleExpandIcon);
494
494
  const titleText = view.title();
495
495
  createTextChild(this.titleElement, titleText);
@@ -809,7 +809,7 @@ class TabbedLocation extends Location implements TabbedViewLocation {
809
809
  view.isCloseable() || view.isTransient(), view.isPreviewFeature(), index);
810
810
  const iconName = view.iconName();
811
811
  if (iconName) {
812
- const icon = IconButton.Icon.create(iconName);
812
+ const icon = createIcon(iconName);
813
813
  this.#tabbedPane.setTabIcon(view.viewId(), icon);
814
814
  }
815
815
  }
@@ -10,7 +10,7 @@ import * as Host from '../../../../core/host/host.js';
10
10
  import * as i18n from '../../../../core/i18n/i18n.js';
11
11
  import * as Platform from '../../../../core/platform/platform.js';
12
12
  import * as Root from '../../../../core/root/root.js';
13
- import * as IconButton from '../../../../ui/components/icon_button/icon_button.js';
13
+ import {createIcon, Icon} from '../../../../ui/kit/kit.js';
14
14
  import * as UIHelpers from '../../../helpers/helpers.js';
15
15
  import * as UI from '../../legacy.js';
16
16
 
@@ -134,9 +134,9 @@ export class ContrastDetails extends Common.ObjectWrapper.ObjectWrapper<EventTyp
134
134
  this.contrastValueBubble = contrastValueRowContents.createChild('span', 'contrast-details-value');
135
135
  this.contrastValue = this.contrastValueBubble.createChild('span');
136
136
  this.contrastValueBubbleIcons = [];
137
- this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(IconButton.Icon.create('checkmark')));
138
- this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(IconButton.Icon.create('check-double')));
139
- this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(IconButton.Icon.create('clear')));
137
+ this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(createIcon('checkmark')));
138
+ this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(createIcon('check-double')));
139
+ this.contrastValueBubbleIcons.push(this.contrastValueBubble.appendChild(createIcon('clear')));
140
140
  this.contrastValueBubbleIcons.forEach(button => button.addEventListener('click', (event: Event) => {
141
141
  ContrastDetails.showHelp();
142
142
  event.consume(false);
@@ -492,8 +492,8 @@ export class Swatch {
492
492
  }
493
493
  }
494
494
 
495
- function createIconCheckmark(): IconButton.Icon.Icon {
496
- const icon = new IconButton.Icon.Icon();
495
+ function createIconCheckmark(): Icon {
496
+ const icon = new Icon();
497
497
  icon.name = 'checkmark';
498
498
  icon.style.color = 'var(--icon-checkmark-green)';
499
499
  icon.style.width = 'var(--sys-size-9)';
@@ -501,8 +501,8 @@ function createIconCheckmark(): IconButton.Icon.Icon {
501
501
  return icon;
502
502
  }
503
503
 
504
- function createIconNo(): IconButton.Icon.Icon {
505
- const icon = new IconButton.Icon.Icon();
504
+ function createIconNo(): Icon {
505
+ const icon = new Icon();
506
506
  icon.name = 'clear';
507
507
  icon.style.color = 'var(--icon-error)';
508
508
  icon.classList.add('small');
@@ -39,8 +39,8 @@ import * as i18n from '../../../../core/i18n/i18n.js';
39
39
  import * as Platform from '../../../../core/platform/platform.js';
40
40
  import * as SDK from '../../../../core/sdk/sdk.js';
41
41
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
42
- import * as IconButton from '../../../components/icon_button/icon_button.js';
43
42
  import * as SrgbOverlay from '../../../components/srgb_overlay/srgb_overlay.js';
43
+ import {createIcon, Icon} from '../../../kit/kit.js';
44
44
  import * as VisualLogging from '../../../visual_logging/visual_logging.js';
45
45
  import * as UI from '../../legacy.js';
46
46
 
@@ -563,7 +563,7 @@ export class Spectrum extends Common.ObjectWrapper.eventMixin<EventTypes, typeof
563
563
  }
564
564
 
565
565
  function appendSwitcherIcon(parentElement: Element): void {
566
- const switcherIcon = new IconButton.Icon.Icon();
566
+ const switcherIcon = new Icon();
567
567
  switcherIcon.name = 'fold-more';
568
568
  switcherIcon.classList.add('medium');
569
569
  parentElement.appendChild(switcherIcon);
@@ -1650,7 +1650,7 @@ export class Swatch {
1650
1650
  private colorString!: string|null;
1651
1651
  private swatchInnerElement: HTMLElement;
1652
1652
  private swatchOverlayElement: HTMLElement;
1653
- private readonly swatchCopyIcon: IconButton.Icon.Icon;
1653
+ private readonly swatchCopyIcon: Icon;
1654
1654
  constructor(parentElement: HTMLElement) {
1655
1655
  const swatchElement = parentElement.createChild('span', 'swatch');
1656
1656
  swatchElement.setAttribute('jslog', `${VisualLogging.action('copy-color').track({click: true})}`);
@@ -1662,7 +1662,7 @@ export class Swatch {
1662
1662
  self.onInvokeElement(this.swatchOverlayElement, this.onCopyText.bind(this));
1663
1663
  this.swatchOverlayElement.addEventListener('mouseout', this.onCopyIconMouseout.bind(this));
1664
1664
  this.swatchOverlayElement.addEventListener('blur', this.onCopyIconMouseout.bind(this));
1665
- this.swatchCopyIcon = IconButton.Icon.create('copy', 'copy-color-icon');
1665
+ this.swatchCopyIcon = createIcon('copy', 'copy-color-icon');
1666
1666
  UI.Tooltip.Tooltip.install(this.swatchCopyIcon, i18nString(UIStrings.copyColorToClipboard));
1667
1667
  this.swatchOverlayElement.appendChild(this.swatchCopyIcon);
1668
1668
  UI.ARIAUtils.setLabel(this.swatchOverlayElement, this.swatchCopyIcon.title);
@@ -42,7 +42,7 @@ import * as SDK from '../../../../core/sdk/sdk.js';
42
42
  import type * as Protocol from '../../../../generated/protocol.js';
43
43
  import * as IssuesManager from '../../../../models/issues_manager/issues_manager.js';
44
44
  import * as NetworkForward from '../../../../panels/network/forward/forward.js';
45
- import * as IconButton from '../../../components/icon_button/icon_button.js';
45
+ import {Icon} from '../../../kit/kit.js';
46
46
  import {Directives, html, render} from '../../../lit/lit.js';
47
47
  import * as UI from '../../legacy.js';
48
48
 
@@ -72,7 +72,7 @@ type CookieData = Partial<Record<SDK.Cookie.Attribute, string>>&{
72
72
  }&{
73
73
  key?: string,
74
74
  flagged?: boolean,
75
- icons?: Partial<Record<AttributeWithIcon, IconButton.Icon.Icon>>,
75
+ icons?: Partial<Record<AttributeWithIcon, Icon>>,
76
76
  priorityValue?: number,
77
77
  expiresTooltip?: string,
78
78
  dirty?: boolean,
@@ -513,7 +513,7 @@ export class CookiesTable extends UI.Widget.VBox {
513
513
  const attribute = (blockedReason.attribute || SDK.Cookie.Attribute.NAME) as AttributeWithIcon;
514
514
  data.icons = data.icons || {};
515
515
  if (!(attribute in data.icons)) {
516
- data.icons[attribute] = new IconButton.Icon.Icon();
516
+ data.icons[attribute] = new Icon();
517
517
  if (attribute === SDK.Cookie.Attribute.NAME &&
518
518
  IssuesManager.RelatedIssue.hasThirdPartyPhaseoutCookieIssue(cookie)) {
519
519
  data.icons[attribute].name = 'warning-filled';
@@ -532,7 +532,7 @@ export class CookiesTable extends UI.Widget.VBox {
532
532
  if (exemptionReason) {
533
533
  data.icons = data.icons || {};
534
534
  data.flagged = true;
535
- data.icons.name = new IconButton.Icon.Icon();
535
+ data.icons.name = new Icon();
536
536
  data.icons.name.name = 'info';
537
537
  data.icons.name.classList.add('small');
538
538
  data.icons.name.title = exemptionReason;
@@ -8,7 +8,7 @@ import '../../legacy.js';
8
8
  import * as Common from '../../../../core/common/common.js';
9
9
  import * as i18n from '../../../../core/i18n/i18n.js';
10
10
  import * as Platform from '../../../../core/platform/platform.js';
11
- import * as IconButton from '../../../components/icon_button/icon_button.js';
11
+ import {Icon} from '../../../kit/kit.js';
12
12
  import * as VisualLogging from '../../../visual_logging/visual_logging.js';
13
13
  import * as UI from '../../legacy.js';
14
14
 
@@ -733,7 +733,7 @@ class FontPropertyInputs {
733
733
 
734
734
  private createTypeToggle(field: Element, jslogContext: string): void {
735
735
  const displaySwitcher = field.createChild('div', 'spectrum-switcher');
736
- const icon = new IconButton.Icon.Icon();
736
+ const icon = new Icon();
737
737
  icon.name = 'fold-more';
738
738
  icon.classList.add('medium');
739
739
  displaySwitcher.appendChild(icon);
@@ -3,16 +3,16 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import '../../../components/icon_button/icon_button.js';
6
+ import '../../../kit/kit.js';
7
7
 
8
- import type * as IconButton from '../../../components/icon_button/icon_button.js';
8
+ import type {Icon} from '../../../kit/kit.js';
9
9
  import {html, render} from '../../../lit/lit.js';
10
10
 
11
11
  import type {CSSShadowModel} from './CSSShadowEditor.js';
12
12
  import cssShadowSwatchStyles from './cssShadowSwatch.css.js';
13
13
 
14
14
  export class CSSShadowSwatch extends HTMLElement {
15
- readonly #icon: IconButton.Icon.Icon;
15
+ readonly #icon: Icon;
16
16
  readonly #model: CSSShadowModel;
17
17
 
18
18
  constructor(model: CSSShadowModel) {
@@ -26,14 +26,14 @@ export class CSSShadowSwatch extends HTMLElement {
26
26
  this, {host: this});
27
27
  // clang-format on
28
28
 
29
- this.#icon = this.querySelector('devtools-icon') as IconButton.Icon.Icon;
29
+ this.#icon = this.querySelector('devtools-icon') as Icon;
30
30
  }
31
31
 
32
32
  model(): CSSShadowModel {
33
33
  return this.#model;
34
34
  }
35
35
 
36
- iconElement(): IconButton.Icon.Icon {
36
+ iconElement(): Icon {
37
37
  return this.#icon;
38
38
  }
39
39
  }