@gjsify/adwaita-web 0.45.0 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/adwaita-web.css +96 -96
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/elements/adw-entry-row.d.ts +2 -2
- package/lib/types/elements/adw-expander-row.d.ts +1 -1
- package/lib/types/elements/adw-split-button.d.ts +1 -1
- package/lib/types/elements/adw-switch-row.d.ts +1 -1
- package/lib/types/elements/adw-wrap-box.d.ts +1 -1
- package/lib/types/elements/{adw-checks.d.ts → checks.d.ts} +9 -2
- package/lib/types/elements/{adw-button.d.ts → gtk-button.d.ts} +1 -1
- package/lib/types/elements/{adw-drop-down.d.ts → gtk-drop-down.d.ts} +6 -6
- package/lib/types/elements/{adw-entry.d.ts → gtk-entry.d.ts} +1 -1
- package/lib/types/elements/{adw-icon.d.ts → gtk-image.d.ts} +2 -2
- package/lib/types/elements/{adw-menu-button.d.ts → gtk-menu-button.d.ts} +13 -4
- package/lib/types/elements/{adw-popover.d.ts → gtk-popover.d.ts} +9 -9
- package/lib/types/elements/{adw-progress-bar.d.ts → gtk-progress-bar.d.ts} +1 -1
- package/lib/types/elements/{adw-switch.d.ts → gtk-switch.d.ts} +2 -2
- package/lib/types/elements/view-switcher-dom.d.ts +4 -4
- package/lib/types/exported-elements.d.ts +10 -0
- package/lib/types/gtk-button.spec.d.ts +1 -0
- package/lib/types/gtk-drop-down.spec.d.ts +1 -0
- package/lib/types/gtk-entry.spec.d.ts +1 -0
- package/lib/types/gtk-image.spec.d.ts +1 -0
- package/lib/types/gtk-menu-button.spec.d.ts +1 -0
- package/lib/types/gtk-progress-bar.spec.d.ts +1 -0
- package/lib/types/gtk-switch.spec.d.ts +1 -0
- package/lib/types/icon-registry.d.ts +2 -2
- package/lib/types/index.d.ts +13 -51
- package/lib/types/namespace/adw.d.ts +44 -0
- package/lib/types/namespace/gtk.d.ts +9 -0
- package/lib/types/styles.generated.d.ts +1 -1
- package/package.json +6 -6
- package/scss/_about_dialog.scss +1 -1
- package/scss/_button.scss +4 -4
- package/scss/_checks.scss +6 -6
- package/scss/_drop_down.scss +3 -3
- package/scss/_entry.scss +3 -3
- package/scss/_expander_row.scss +1 -1
- package/scss/_icon.scss +4 -4
- package/scss/_menu_button.scss +3 -3
- package/scss/_popover.scss +2 -2
- package/scss/_progress_bar.scss +4 -4
- package/scss/_reset.scss +10 -8
- package/scss/_split_button.scss +1 -1
- package/scss/_style_classes.scss +9 -9
- package/scss/_switch.scss +2 -2
- package/scss/_switch_row.scss +1 -1
- package/scss/_toast.scss +1 -1
- package/scss/adwaita-skin.scss +2 -2
- package/src/adw-action-rows.spec.ts +2 -2
- package/src/adw-button-content.spec.ts +1 -1
- package/src/bottom-sheet.spec.ts +2 -2
- package/src/{adw-checks.spec.ts → checks.spec.ts} +11 -11
- package/src/chrome.spec.ts +2 -2
- package/src/connect-lifecycle.spec.ts +10 -7
- package/src/elements/adw-about-dialog.ts +6 -6
- package/src/elements/adw-avatar.ts +4 -4
- package/src/elements/adw-button-content.ts +6 -6
- package/src/elements/adw-button-row.ts +6 -6
- package/src/elements/adw-combo-row.ts +1 -1
- package/src/elements/adw-entry-row.ts +5 -5
- package/src/elements/adw-expander-row.ts +10 -10
- package/src/elements/adw-navigation-view.ts +1 -1
- package/src/elements/adw-password-entry-row.ts +3 -3
- package/src/elements/adw-sidebar.ts +4 -4
- package/src/elements/adw-split-button.ts +14 -14
- package/src/elements/adw-status-page.ts +4 -4
- package/src/elements/adw-switch-row.ts +8 -8
- package/src/elements/adw-tab-view.ts +7 -7
- package/src/elements/adw-toast-overlay.ts +2 -2
- package/src/elements/adw-toggle-group.ts +3 -3
- package/src/elements/adw-view-switcher-bar.ts +3 -3
- package/src/elements/adw-view-switcher.ts +3 -3
- package/src/elements/{adw-checks.ts → checks.ts} +13 -6
- package/src/elements/{adw-button.ts → gtk-button.ts} +6 -6
- package/src/elements/{adw-drop-down.ts → gtk-drop-down.ts} +18 -18
- package/src/elements/{adw-entry.ts → gtk-entry.ts} +4 -4
- package/src/elements/{adw-icon.ts → gtk-image.ts} +5 -5
- package/src/elements/{adw-menu-button.ts → gtk-menu-button.ts} +27 -18
- package/src/elements/{adw-popover.ts → gtk-popover.ts} +18 -18
- package/src/elements/{adw-progress-bar.ts → gtk-progress-bar.ts} +5 -5
- package/src/elements/{adw-switch.ts → gtk-switch.ts} +4 -4
- package/src/elements/view-switcher-dom.ts +5 -5
- package/src/exported-elements.ts +50 -0
- package/src/{adw-button.spec.ts → gtk-button.spec.ts} +6 -6
- package/src/{adw-drop-down.spec.ts → gtk-drop-down.spec.ts} +17 -17
- package/src/{adw-entry.spec.ts → gtk-entry.spec.ts} +8 -8
- package/src/{adw-icon.spec.ts → gtk-image.spec.ts} +21 -21
- package/src/{adw-menu-button.spec.ts → gtk-menu-button.spec.ts} +6 -6
- package/src/{adw-progress-bar.spec.ts → gtk-progress-bar.spec.ts} +12 -12
- package/src/{adw-switch.spec.ts → gtk-switch.spec.ts} +20 -20
- package/src/icon-registry.spec.ts +6 -6
- package/src/icon-registry.ts +6 -6
- package/src/index.ts +64 -63
- package/src/namespace/adw.ts +99 -0
- package/src/namespace/gtk.ts +22 -0
- package/src/preferences-search.ts +1 -1
- package/src/slotted-children.spec.ts +5 -3
- package/src/source-view/adw-source-view.ts +2 -2
- package/src/split-button.spec.ts +5 -5
- package/src/styles.generated.ts +1 -1
- package/src/test.browser.mts +15 -15
- package/lib/types/adw-button.spec.d.ts +0 -1
- package/lib/types/adw-drop-down.spec.d.ts +0 -1
- package/lib/types/adw-entry.spec.d.ts +0 -1
- package/lib/types/adw-icon.spec.d.ts +0 -1
- package/lib/types/adw-menu-button.spec.d.ts +0 -1
- package/lib/types/adw-progress-bar.spec.d.ts +0 -1
- package/lib/types/adw-switch.spec.d.ts +0 -1
- /package/lib/types/{adw-checks.spec.d.ts → checks.spec.d.ts} +0 -0
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
// Reference: refs/adwaita-web/adwaita-web/scss/_about_dialog.scss (web layout)
|
|
56
56
|
// Copyright (c) 2022-2024 GNOME Foundation Inc. / Purism SPC (libadwaita). LGPLv2.1+.
|
|
57
57
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
58
|
-
// icon nodes are <
|
|
58
|
+
// icon nodes are <gtk-image>; the derivations live in @gjsify/adwaita-core.
|
|
59
59
|
|
|
60
60
|
import {
|
|
61
61
|
ADW_ABOUT_DIALOG_LABELS,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
stripMnemonic,
|
|
68
68
|
} from '@gjsify/adwaita-core';
|
|
69
69
|
|
|
70
|
-
import {
|
|
70
|
+
import { createGtkImage } from './gtk-image.js';
|
|
71
71
|
import { AdwModalSurface } from './modal-surface.js';
|
|
72
72
|
|
|
73
73
|
/** A template label with its mnemonic marker removed — this renderer has no accelerator layer. */
|
|
@@ -440,7 +440,7 @@ export class AdwAboutDialog extends HTMLElement {
|
|
|
440
440
|
// `image-missing` rather than three stray classes; that is also what GTK draws for
|
|
441
441
|
// it on a machine without the app installed.
|
|
442
442
|
if (visibility.appIcon) {
|
|
443
|
-
body.appendChild(
|
|
443
|
+
body.appendChild(createGtkImage(this.applicationIcon, 'adw-about-dialog-icon'));
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
// No fallback: an unset name means no label.
|
|
@@ -518,7 +518,7 @@ export class AdwAboutDialog extends HTMLElement {
|
|
|
518
518
|
row.setAttribute('title', title);
|
|
519
519
|
row.setAttribute('activatable', '');
|
|
520
520
|
|
|
521
|
-
const chevron =
|
|
521
|
+
const chevron = createGtkImage('go-next', 'adw-about-dialog-chevron');
|
|
522
522
|
chevron.setAttribute('slot', 'suffix');
|
|
523
523
|
row.appendChild(chevron);
|
|
524
524
|
|
|
@@ -569,7 +569,7 @@ export class AdwAboutDialog extends HTMLElement {
|
|
|
569
569
|
row.setAttribute('activatable', '');
|
|
570
570
|
row.classList.add('adw-about-dialog-link-row');
|
|
571
571
|
|
|
572
|
-
const chevron =
|
|
572
|
+
const chevron = createGtkImage('go-next', 'adw-about-dialog-chevron');
|
|
573
573
|
chevron.setAttribute('slot', 'suffix');
|
|
574
574
|
row.appendChild(chevron);
|
|
575
575
|
|
|
@@ -603,7 +603,7 @@ export class AdwAboutDialog extends HTMLElement {
|
|
|
603
603
|
const uri = person.uri ?? '';
|
|
604
604
|
row.setAttribute('activatable', '');
|
|
605
605
|
row.classList.add('adw-about-dialog-link-row');
|
|
606
|
-
const chevron =
|
|
606
|
+
const chevron = createGtkImage('go-next', 'adw-about-dialog-chevron');
|
|
607
607
|
chevron.setAttribute('slot', 'suffix');
|
|
608
608
|
row.appendChild(chevron);
|
|
609
609
|
row.addEventListener('activated', () => this._activateLink(uri));
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// Reference: refs/adwaita-web/adwaita-web/scss/_avatar.scss
|
|
8
8
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
9
9
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
10
|
-
// fallback icon node is <
|
|
10
|
+
// fallback icon node is <gtk-image>.
|
|
11
11
|
//
|
|
12
12
|
// The two derivations — initials from the name, and the palette colour the name hashes to
|
|
13
13
|
// — are HEADLESS and live in `@gjsify/adwaita-core` (ADR 0004) as {@link avatarInitials} /
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
import { avatarColor, avatarFontSize, avatarInitials, avatarMaxFontSize, avatarMode } from '@gjsify/adwaita-core';
|
|
23
23
|
|
|
24
|
-
import { type
|
|
24
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
25
25
|
|
|
26
26
|
export class AdwAvatar extends HTMLElement {
|
|
27
27
|
private _textEl!: HTMLSpanElement;
|
|
28
|
-
private _iconEl!:
|
|
28
|
+
private _iconEl!: GtkImage;
|
|
29
29
|
private _imageEl!: HTMLImageElement;
|
|
30
30
|
private _initialized = false;
|
|
31
31
|
|
|
@@ -40,7 +40,7 @@ export class AdwAvatar extends HTMLElement {
|
|
|
40
40
|
this._textEl = document.createElement('span');
|
|
41
41
|
this._textEl.className = 'adw-avatar-text';
|
|
42
42
|
|
|
43
|
-
this._iconEl =
|
|
43
|
+
this._iconEl = createGtkImage(null, 'adw-avatar-icon');
|
|
44
44
|
|
|
45
45
|
this._imageEl = document.createElement('img');
|
|
46
46
|
this._imageEl.className = 'adw-avatar-custom-image';
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
// (image-text-button · the splitbutton override · buttoncontent)
|
|
21
21
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
22
22
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
23
|
-
// icon node is <
|
|
23
|
+
// icon node is <gtk-image>.
|
|
24
24
|
|
|
25
25
|
import { BUTTON_CONTENT_STYLE_CLASS, buttonContentIconName, buttonContentLabelText } from '@gjsify/adwaita-core';
|
|
26
26
|
|
|
27
|
-
import { type
|
|
27
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* What `gtk_widget_get_ancestor (…, GTK_TYPE_BUTTON)` looks like in the DOM: a native
|
|
31
|
-
* `<button>`, or anything wearing the Adwaita button class — `<
|
|
31
|
+
* `<button>`, or anything wearing the Adwaita button class — `<gtk-button>` renders an
|
|
32
32
|
* inner button with it, and the stories put it on plain ones.
|
|
33
33
|
*/
|
|
34
34
|
const BUTTON_SELECTOR = 'button, .adw-button';
|
|
@@ -38,7 +38,7 @@ const SPLIT_BUTTON_SELECTOR = 'adw-split-button, .adw-split-button';
|
|
|
38
38
|
|
|
39
39
|
export class AdwButtonContent extends HTMLElement {
|
|
40
40
|
private _boxEl!: HTMLDivElement;
|
|
41
|
-
private _iconEl!:
|
|
41
|
+
private _iconEl!: GtkImage;
|
|
42
42
|
private _labelEl!: HTMLSpanElement;
|
|
43
43
|
private _initialized = false;
|
|
44
44
|
/** The node currently carrying `image-text-button`, so unroot can find it. */
|
|
@@ -57,9 +57,9 @@ export class AdwButtonContent extends HTMLElement {
|
|
|
57
57
|
this._boxEl.className = 'adw-button-content-box';
|
|
58
58
|
|
|
59
59
|
// The image node is GTK_ACCESSIBLE_ROLE_PRESENTATION in libadwaita: decorative,
|
|
60
|
-
// with the label carrying the accessible name — what `<
|
|
60
|
+
// with the label carrying the accessible name — what `<gtk-image>`'s own
|
|
61
61
|
// `aria-hidden` already says.
|
|
62
|
-
this._iconEl =
|
|
62
|
+
this._iconEl = createGtkImage(null);
|
|
63
63
|
|
|
64
64
|
this._labelEl = document.createElement('span');
|
|
65
65
|
this._labelEl.className = 'adw-button-content-label';
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
|
|
22
22
|
import { BUTTON_ROW_ACTIVATABLE, ButtonRowState } from '@gjsify/adwaita-core';
|
|
23
23
|
|
|
24
|
-
import { type
|
|
24
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
25
25
|
import { attachRowActivation } from './row-activation.js';
|
|
26
26
|
|
|
27
27
|
export class AdwButtonRow extends HTMLElement {
|
|
28
28
|
private _contentsEl!: HTMLDivElement;
|
|
29
|
-
private _startIconEl!:
|
|
30
|
-
private _endIconEl!:
|
|
29
|
+
private _startIconEl!: GtkImage;
|
|
30
|
+
private _endIconEl!: GtkImage;
|
|
31
31
|
private _titleEl!: HTMLSpanElement;
|
|
32
32
|
/** The headless title + start/end icon state (ADR 0004). */
|
|
33
33
|
private readonly _state = new ButtonRowState();
|
|
@@ -43,12 +43,12 @@ export class AdwButtonRow extends HTMLElement {
|
|
|
43
43
|
this._contentsEl = document.createElement('div');
|
|
44
44
|
this._contentsEl.className = 'adw-button-row-contents';
|
|
45
45
|
|
|
46
|
-
this._startIconEl =
|
|
46
|
+
this._startIconEl = createGtkImage(null, 'start');
|
|
47
47
|
|
|
48
48
|
this._titleEl = document.createElement('span');
|
|
49
49
|
this._titleEl.className = 'adw-button-row-title';
|
|
50
50
|
|
|
51
|
-
this._endIconEl =
|
|
51
|
+
this._endIconEl = createGtkImage(null, 'end');
|
|
52
52
|
|
|
53
53
|
this._contentsEl.append(this._startIconEl, this._titleEl, this._endIconEl);
|
|
54
54
|
this.replaceChildren(this._contentsEl);
|
|
@@ -89,7 +89,7 @@ export class AdwButtonRow extends HTMLElement {
|
|
|
89
89
|
* The `start` / `end` position class is set once at construction — it is
|
|
90
90
|
* where the node sits, not what it draws — so only the name changes here.
|
|
91
91
|
*/
|
|
92
|
-
private _paintIcon(el:
|
|
92
|
+
private _paintIcon(el: GtkImage, iconName: string, visible: boolean) {
|
|
93
93
|
el.iconName = visible ? iconName : null;
|
|
94
94
|
el.hidden = !visible;
|
|
95
95
|
}
|
|
@@ -43,7 +43,7 @@ export class AdwComboRow extends HTMLElement {
|
|
|
43
43
|
const items: string[] = JSON.parse(this.getAttribute('items') || '[]');
|
|
44
44
|
// Seed the headless state BEFORE subscribing, so building the initial DOM below is
|
|
45
45
|
// not driven by a change notification. The string→descriptor mapping is core's, so
|
|
46
|
-
// this row and `<
|
|
46
|
+
// this row and `<gtk-drop-down>` accept one option vocabulary.
|
|
47
47
|
this._state.setOptions(normalizeComboOptions(items));
|
|
48
48
|
this._state.setSelectedIndex(parseInt(this.getAttribute('selected') || '0', 10));
|
|
49
49
|
const selectedIdx = this._state.selectedIndex;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// Reference: refs/libadwaita/src/stylesheet/widgets/_entries.scss
|
|
28
28
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
29
29
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
30
|
-
// edit icon node is <
|
|
30
|
+
// edit icon node is <gtk-image>.
|
|
31
31
|
|
|
32
32
|
import {
|
|
33
33
|
ENTRY_ROW_APPLY_ICON_NAME,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from '@gjsify/adwaita-core';
|
|
39
39
|
|
|
40
40
|
import { bindSlottedChildren, type AdwSlottedChildren } from '../slotted-children.js';
|
|
41
|
-
import { type
|
|
41
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Show/hide a rendered part. `hidden` carries the semantics and is what the conformance
|
|
@@ -66,7 +66,7 @@ export class AdwEntryRow extends HTMLElement {
|
|
|
66
66
|
protected _title!: HTMLSpanElement;
|
|
67
67
|
/** The `editable-area` gizmo: both titles plus the input. */
|
|
68
68
|
protected _area!: HTMLDivElement;
|
|
69
|
-
protected _editIcon!:
|
|
69
|
+
protected _editIcon!: GtkImage;
|
|
70
70
|
protected _indicator!: HTMLSpanElement;
|
|
71
71
|
protected _applyButton!: HTMLButtonElement;
|
|
72
72
|
protected _prefixes!: HTMLDivElement;
|
|
@@ -326,11 +326,11 @@ export class AdwEntryRow extends HTMLElement {
|
|
|
326
326
|
// The libadwaita name travels in `data-icon-name`; the drawn glyph is
|
|
327
327
|
// the curated @gjsify/adwaita-icons spelling of the same symbolic, which
|
|
328
328
|
// is a different string (`adw-entry-edit-symbolic` vs `document-edit`).
|
|
329
|
-
this._editIcon =
|
|
329
|
+
this._editIcon = createGtkImage('document-edit', 'adw-row-edit', `${prefix}-edit`);
|
|
330
330
|
this._editIcon.dataset.iconName = ENTRY_ROW_EDIT_ICON_NAME;
|
|
331
331
|
|
|
332
332
|
// Author-supplied light-DOM children are KEPT and stay LIVE: `replaceChildren` used
|
|
333
|
-
// to discard them silently, so `<adw-entry-row><
|
|
333
|
+
// to discard them silently, so `<adw-entry-row><gtk-button>Go</gtk-button>` rendered
|
|
334
334
|
// without its button, and the snapshot that fixed that was still a one-shot read — a
|
|
335
335
|
// suffix appended after connect sat outside the affordance box. ELEMENTS only, on
|
|
336
336
|
// both paths: GtkBuildable also only ever adopts widgets, and keeping stray
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
18
18
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
19
19
|
// disclosure state machine composed from @gjsify/adwaita-core, the enable
|
|
20
|
-
// switch from <
|
|
20
|
+
// switch from <gtk-switch> and the chevron from <gtk-image>.
|
|
21
21
|
|
|
22
22
|
import { ExpanderState, deriveRowLabels } from '@gjsify/adwaita-core';
|
|
23
23
|
|
|
@@ -25,22 +25,22 @@ import { bindEmptySections } from '../empty-sections.js';
|
|
|
25
25
|
import { bindSlottedChildren } from '../slotted-children.js';
|
|
26
26
|
|
|
27
27
|
// SIDE-EFFECT import, deliberately separate from the type import below: it guarantees
|
|
28
|
-
// `
|
|
28
|
+
// `gtk-switch` is defined before this module's `customElements.define` can upgrade a
|
|
29
29
|
// server-rendered `<adw-expander-row>` and build one. A combined
|
|
30
|
-
// `import {
|
|
30
|
+
// `import { GtkSwitch }` would NOT do it — the binding is only used in type position,
|
|
31
31
|
// and this package compiles without `verbatimModuleSyntax`, so TypeScript would elide
|
|
32
32
|
// the statement and take the registration with it.
|
|
33
|
-
import './
|
|
34
|
-
import type {
|
|
35
|
-
import { type
|
|
33
|
+
import './gtk-switch.js';
|
|
34
|
+
import type { GtkSwitch } from './gtk-switch.js';
|
|
35
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
36
36
|
import { attachRowActivation } from './row-activation.js';
|
|
37
37
|
|
|
38
38
|
export class AdwExpanderRow extends HTMLElement {
|
|
39
39
|
private _headerEl!: HTMLDivElement;
|
|
40
40
|
private _titleEl!: HTMLSpanElement;
|
|
41
41
|
private _subtitleEl!: HTMLSpanElement;
|
|
42
|
-
private _enableSwitch!:
|
|
43
|
-
private _chevronEl!:
|
|
42
|
+
private _enableSwitch!: GtkSwitch;
|
|
43
|
+
private _chevronEl!: GtkImage;
|
|
44
44
|
private _contentEl!: HTMLDivElement;
|
|
45
45
|
private _prefixEl!: HTMLDivElement;
|
|
46
46
|
private _suffixEl!: HTMLDivElement;
|
|
@@ -118,11 +118,11 @@ export class AdwExpanderRow extends HTMLElement {
|
|
|
118
118
|
textEl.append(this._titleEl, this._subtitleEl);
|
|
119
119
|
|
|
120
120
|
// Clicking the enable switch does NOT toggle the disclosure.
|
|
121
|
-
this._enableSwitch = document.createElement('
|
|
121
|
+
this._enableSwitch = document.createElement('gtk-switch') as GtkSwitch;
|
|
122
122
|
this._enableSwitch.classList.add('adw-expander-row-enable-switch');
|
|
123
123
|
this._enableSwitch.active = this.enableExpansion;
|
|
124
124
|
|
|
125
|
-
this._chevronEl =
|
|
125
|
+
this._chevronEl = createGtkImage('go-down', 'adw-expander-row-chevron');
|
|
126
126
|
|
|
127
127
|
this._prefixEl = document.createElement('div');
|
|
128
128
|
this._prefixEl.className = 'adw-expander-row-prefix';
|
|
@@ -457,7 +457,7 @@ export class AdwNavigationView extends HTMLElement {
|
|
|
457
457
|
const start = (headerBar as { startSection?: HTMLElement | null }).startSection ?? null;
|
|
458
458
|
if (!start) return;
|
|
459
459
|
|
|
460
|
-
const back = document.createElement('
|
|
460
|
+
const back = document.createElement('gtk-button');
|
|
461
461
|
back.classList.add('adw-navigation-back-button');
|
|
462
462
|
back.setAttribute('icon', 'go-previous');
|
|
463
463
|
back.setAttribute('flat', '');
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
import { PasswordEntryRowState, type PasswordEntryRowRenderState } from '@gjsify/adwaita-core';
|
|
24
24
|
|
|
25
|
-
import { type
|
|
25
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
26
26
|
|
|
27
27
|
import { AdwEntryRow } from './adw-entry-row.js';
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ export class AdwPasswordEntryRow extends AdwEntryRow {
|
|
|
30
30
|
/** The headless peek + caps-lock derivation, composing the parent row's state. */
|
|
31
31
|
private readonly _password = new PasswordEntryRowState(this._state);
|
|
32
32
|
private _toggle!: HTMLButtonElement;
|
|
33
|
-
private _toggleIcon!:
|
|
33
|
+
private _toggleIcon!: GtkImage;
|
|
34
34
|
|
|
35
35
|
static get observedAttributes(): string[] {
|
|
36
36
|
return [...AdwEntryRow.observedAttributes, 'revealed'];
|
|
@@ -73,7 +73,7 @@ export class AdwPasswordEntryRow extends AdwEntryRow {
|
|
|
73
73
|
this._toggle = document.createElement('button');
|
|
74
74
|
this._toggle.type = 'button';
|
|
75
75
|
this._toggle.className = `adw-button flat circular icon-only ${this._classPrefix}-toggle`;
|
|
76
|
-
this._toggleIcon =
|
|
76
|
+
this._toggleIcon = createGtkImage(null);
|
|
77
77
|
this._toggle.append(this._toggleIcon);
|
|
78
78
|
this._toggle.addEventListener('click', () => this._password.togglePeek());
|
|
79
79
|
// Installed through add_suffix as C does, so it is the FIRST suffix and a
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
// Reference: refs/libadwaita/src/stylesheet/widgets/_sidebars.scss (.navigation-sidebar, sidebar)
|
|
44
44
|
// Copyright (c) 2025 GNOME Foundation Inc. (libadwaita). LGPLv2.1+.
|
|
45
45
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
46
|
-
// icon nodes are <
|
|
46
|
+
// icon nodes are <gtk-image>.
|
|
47
47
|
|
|
48
48
|
import {
|
|
49
49
|
ADW_SIDEBAR_NO_SELECTION,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
type SidebarSelectionChange,
|
|
57
57
|
} from '@gjsify/adwaita-core';
|
|
58
58
|
|
|
59
|
-
import {
|
|
59
|
+
import { createGtkImage } from './gtk-image.js';
|
|
60
60
|
import { attachRovingFocus } from './roving-focus.js';
|
|
61
61
|
|
|
62
62
|
// The sidebar consumes its declared children and drops them from the tree, so a later
|
|
@@ -348,7 +348,7 @@ export class AdwSidebar extends HTMLElement {
|
|
|
348
348
|
row.hidden = item.visible === false;
|
|
349
349
|
row.disabled = item.enabled === false;
|
|
350
350
|
|
|
351
|
-
const iconEl =
|
|
351
|
+
const iconEl = createGtkImage(item.iconName ?? null, 'adw-sidebar-item-icon');
|
|
352
352
|
iconEl.hidden = !flat.iconVisible;
|
|
353
353
|
row.appendChild(iconEl);
|
|
354
354
|
|
|
@@ -371,7 +371,7 @@ export class AdwSidebar extends HTMLElement {
|
|
|
371
371
|
|
|
372
372
|
// Page mode adds a trailing chevron on every row, the way the boxed-list
|
|
373
373
|
// AdwActionRow carries a `go-next-symbolic` arrow.
|
|
374
|
-
row.appendChild(
|
|
374
|
+
row.appendChild(createGtkImage('go-next', 'adw-sidebar-item-arrow'));
|
|
375
375
|
|
|
376
376
|
row.addEventListener('click', () => this._activate(flat.index));
|
|
377
377
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
// into state calls, pinned to the C source by the shared vectors in
|
|
26
26
|
// `@gjsify/adwaita-core/conformance` (see `src/split-button.spec.ts`). Of the
|
|
27
27
|
// element's own former copies only the glyph→mask-class mapping is a renderer
|
|
28
|
-
// concern — see ARROW_MASK_CLASSES. The menu surface is `<
|
|
28
|
+
// concern — see ARROW_MASK_CLASSES. The menu surface is `<gtk-popover>`, which is
|
|
29
29
|
// what brings the 15px radius, Escape dismissal and arrow-key navigation; do not
|
|
30
30
|
// hand-roll a surface here instead.
|
|
31
31
|
//
|
|
@@ -47,16 +47,16 @@ import {
|
|
|
47
47
|
import type { AdwArrowIcon, AdwMenuEntry, SplitButtonChange, SplitButtonDirection } from '@gjsify/adwaita-core';
|
|
48
48
|
|
|
49
49
|
// SIDE-EFFECT import, deliberately separate from the type import below: it is
|
|
50
|
-
// what guarantees `
|
|
50
|
+
// what guarantees `gtk-popover` is defined before this module's own
|
|
51
51
|
// `customElements.define` can upgrade a server-rendered `<adw-split-button>` and
|
|
52
|
-
// build one. A combined `import {
|
|
52
|
+
// build one. A combined `import { GtkPopover }` would NOT do it — the binding is
|
|
53
53
|
// only ever used in type position here, and this package compiles without
|
|
54
54
|
// `verbatimModuleSyntax`, so TypeScript would elide the whole statement and take
|
|
55
55
|
// the registration with it.
|
|
56
|
-
import './
|
|
57
|
-
import type {
|
|
56
|
+
import './gtk-popover.js';
|
|
57
|
+
import type { GtkPopover } from './gtk-popover.js';
|
|
58
58
|
|
|
59
|
-
import { type
|
|
59
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
60
60
|
|
|
61
61
|
const VARIANT_CLASSES: Record<string, string> = {
|
|
62
62
|
flat: 'flat',
|
|
@@ -87,11 +87,11 @@ const ARROW_MASK_CLASSES: Readonly<Record<AdwArrowIcon, string>> = {
|
|
|
87
87
|
};
|
|
88
88
|
|
|
89
89
|
// The `-symbolic` strip and the single-CSS-token guard belong to `normalizeIconName`,
|
|
90
|
-
// applied by <
|
|
90
|
+
// applied by <gtk-image>: never rebuild the mask class by hand, which is how five sites
|
|
91
91
|
// in this package shipped without the guard.
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* Direction → the CSS axis `<
|
|
94
|
+
* Direction → the CSS axis `<gtk-popover>` places the surface on. WHICH
|
|
95
95
|
* direction applies is not decided here — {@link splitButtonPopupDirection}
|
|
96
96
|
* folds `none` onto `down` (GtkMenuButton's rule, not the split button's), and
|
|
97
97
|
* this table is keyed by its output for the same reason ARROW_MASK_CLASSES is.
|
|
@@ -107,8 +107,8 @@ export class AdwSplitButton extends HTMLElement {
|
|
|
107
107
|
private readonly _state = new SplitButtonState();
|
|
108
108
|
private _actionEl!: HTMLButtonElement;
|
|
109
109
|
private _dropdownEl!: HTMLButtonElement;
|
|
110
|
-
private _arrowEl!:
|
|
111
|
-
private _menuEl!:
|
|
110
|
+
private _arrowEl!: GtkImage;
|
|
111
|
+
private _menuEl!: GtkPopover;
|
|
112
112
|
/** Inline text content, captured before we take over the subtree. */
|
|
113
113
|
private _inlineLabel = '';
|
|
114
114
|
/** Last `open` value reflected as `notify::active`, so the event fires once per flip. */
|
|
@@ -226,10 +226,10 @@ export class AdwSplitButton extends HTMLElement {
|
|
|
226
226
|
this._dropdownEl.type = 'button';
|
|
227
227
|
this._dropdownEl.className = 'adw-split-button-dropdown';
|
|
228
228
|
this._dropdownEl.setAttribute('aria-haspopup', 'menu');
|
|
229
|
-
this._arrowEl =
|
|
229
|
+
this._arrowEl = createGtkImage(null);
|
|
230
230
|
this._dropdownEl.appendChild(this._arrowEl);
|
|
231
231
|
|
|
232
|
-
this._menuEl = document.createElement('
|
|
232
|
+
this._menuEl = document.createElement('gtk-popover') as GtkPopover;
|
|
233
233
|
this._menuEl.classList.add('adw-split-button-menu');
|
|
234
234
|
this._menuEl.setAttribute('role', 'menu');
|
|
235
235
|
// The dropdown half IS a GtkMenuButton (the C passes straight through to
|
|
@@ -376,7 +376,7 @@ export class AdwSplitButton extends HTMLElement {
|
|
|
376
376
|
this._actionEl.classList.toggle('icon-only', mode === 'icon');
|
|
377
377
|
|
|
378
378
|
if (mode === 'icon' && iconName !== null) {
|
|
379
|
-
this._actionEl.appendChild(
|
|
379
|
+
this._actionEl.appendChild(createGtkImage(iconName));
|
|
380
380
|
} else if (mode === 'label' && label !== null) {
|
|
381
381
|
// Never trimmed: two spaces are a valid label and render as one.
|
|
382
382
|
this._actionEl.appendChild(document.createTextNode(label));
|
|
@@ -430,7 +430,7 @@ export class AdwSplitButton extends HTMLElement {
|
|
|
430
430
|
const item = document.createElement('button');
|
|
431
431
|
item.type = 'button';
|
|
432
432
|
// `.adw-popover-item` is what makes the row navigable: it is the selector
|
|
433
|
-
// `<
|
|
433
|
+
// `<gtk-popover>` walks for arrow/Home/End/Enter.
|
|
434
434
|
item.className = 'adw-popover-item adw-split-button-menu-item';
|
|
435
435
|
item.setAttribute('role', 'menuitem');
|
|
436
436
|
item.tabIndex = -1;
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
// Reference: refs/libadwaita/src/stylesheet/widgets/_misc.scss (AdwStatusPage)
|
|
6
6
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
7
7
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
8
|
-
// icon node is <
|
|
8
|
+
// icon node is <gtk-image>.
|
|
9
9
|
|
|
10
10
|
import { stringIsNotEmpty } from '@gjsify/adwaita-core';
|
|
11
11
|
|
|
12
12
|
import { bindEmptySections } from '../empty-sections.js';
|
|
13
13
|
import { bindSlottedChildren } from '../slotted-children.js';
|
|
14
|
-
import { type
|
|
14
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
15
15
|
|
|
16
16
|
export class AdwStatusPage extends HTMLElement {
|
|
17
|
-
private _iconEl!:
|
|
17
|
+
private _iconEl!: GtkImage;
|
|
18
18
|
private _titleEl!: HTMLSpanElement;
|
|
19
19
|
private _descEl!: HTMLSpanElement;
|
|
20
20
|
private _childEl!: HTMLDivElement;
|
|
@@ -28,7 +28,7 @@ export class AdwStatusPage extends HTMLElement {
|
|
|
28
28
|
if (this._initialized) return;
|
|
29
29
|
this._initialized = true;
|
|
30
30
|
|
|
31
|
-
this._iconEl =
|
|
31
|
+
this._iconEl = createGtkImage(null, 'adw-status-page-icon');
|
|
32
32
|
|
|
33
33
|
this._titleEl = document.createElement('span');
|
|
34
34
|
this._titleEl.className = 'adw-status-page-title';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// <adw-switch-row> — row with a title/subtitle and a trailing `<
|
|
1
|
+
// <adw-switch-row> — row with a title/subtitle and a trailing `<gtk-switch>`.
|
|
2
2
|
//
|
|
3
3
|
// The ACTIVE flag, its notify rule and the toggle-on-row-activation are HEADLESS and live
|
|
4
4
|
// in `@gjsify/adwaita-core` (ADR 0004) as {@link SwitchRowState}; this element keeps only
|
|
@@ -14,22 +14,22 @@
|
|
|
14
14
|
// Copyright (c) 2025 csm. MIT License.
|
|
15
15
|
// Modifications: Reimplemented as Web Component for @gjsify/adwaita-web;
|
|
16
16
|
// title/subtitle text column added to match Adw.SwitchRow; the active state
|
|
17
|
-
// composed from @gjsify/adwaita-core; the toggle markup from <
|
|
17
|
+
// composed from @gjsify/adwaita-core; the toggle markup from <gtk-switch>.
|
|
18
18
|
|
|
19
19
|
import { SwitchRowState, deriveRowLabels } from '@gjsify/adwaita-core';
|
|
20
20
|
|
|
21
21
|
// SIDE-EFFECT import, deliberately separate from the type import below: it guarantees
|
|
22
|
-
// `
|
|
23
|
-
// server-rendered `<adw-switch-row>` and build one. A combined `import {
|
|
22
|
+
// `gtk-switch` is defined before this module's `customElements.define` can upgrade a
|
|
23
|
+
// server-rendered `<adw-switch-row>` and build one. A combined `import { GtkSwitch }`
|
|
24
24
|
// would NOT do it — the binding is only used in type position, and this package compiles
|
|
25
25
|
// without `verbatimModuleSyntax`, so TypeScript would elide the statement and take the
|
|
26
26
|
// registration with it.
|
|
27
|
-
import './
|
|
27
|
+
import './gtk-switch.js';
|
|
28
28
|
import { attachRowActivation } from './row-activation.js';
|
|
29
|
-
import type {
|
|
29
|
+
import type { GtkSwitch } from './gtk-switch.js';
|
|
30
30
|
|
|
31
31
|
export class AdwSwitchRow extends HTMLElement {
|
|
32
|
-
private _switchEl!:
|
|
32
|
+
private _switchEl!: GtkSwitch;
|
|
33
33
|
private _titleEl!: HTMLSpanElement;
|
|
34
34
|
private _subtitleEl!: HTMLSpanElement;
|
|
35
35
|
/** The headless active flag + its notify rule (ADR 0004). */
|
|
@@ -62,7 +62,7 @@ export class AdwSwitchRow extends HTMLElement {
|
|
|
62
62
|
this._subtitleEl.className = 'adw-row-subtitle';
|
|
63
63
|
text.append(this._titleEl, this._subtitleEl);
|
|
64
64
|
|
|
65
|
-
this._switchEl = document.createElement('
|
|
65
|
+
this._switchEl = document.createElement('gtk-switch') as GtkSwitch;
|
|
66
66
|
// adw-switch-row.c:159 — the slider is not a focus target; the ROW is.
|
|
67
67
|
this._switchEl.unfocusable = true;
|
|
68
68
|
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
// Reference: packages/nativescript-bridge/adwaita/src/widgets/adw-tab-view.ts (NS twin)
|
|
44
44
|
// Copyright (c) 2020-2022 Purism SPC / GNOME contributors (libadwaita). LGPLv2.1+.
|
|
45
45
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
46
|
-
// tab icon + indicator nodes are <
|
|
46
|
+
// tab icon + indicator nodes are <gtk-image>.
|
|
47
47
|
|
|
48
48
|
import { TabViewState, tabCloseVisible, tabIconState, tabTooltip, tabsRevealed } from '@gjsify/adwaita-core';
|
|
49
49
|
import type { AdwTabPageSpec, AdwTabPageState, TabViewPagesChange, TabViewSelectionChange } from '@gjsify/adwaita-core';
|
|
50
50
|
|
|
51
|
-
import { type
|
|
51
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
52
52
|
|
|
53
53
|
export type AdwTabViewPage = AdwTabPageState<HTMLElement>;
|
|
54
54
|
|
|
@@ -491,10 +491,10 @@ export class AdwTabView extends HTMLElement {
|
|
|
491
491
|
tab.setAttribute('role', 'tab');
|
|
492
492
|
tab.dataset.pageId = page.id;
|
|
493
493
|
|
|
494
|
-
// Decorative mask-image nodes — <
|
|
494
|
+
// Decorative mask-image nodes — <gtk-image> carries the convention, including the
|
|
495
495
|
// `-symbolic` strip, which is ours and not C's: there the name reaches
|
|
496
496
|
// `GtkImage` untouched.
|
|
497
|
-
const icon =
|
|
497
|
+
const icon = createGtkImage(null, 'adw-tab-icon');
|
|
498
498
|
tab.appendChild(icon);
|
|
499
499
|
|
|
500
500
|
// `AdwTabPage:loading` swaps the icon image for an `AdwSpinnerPaintable` — the
|
|
@@ -511,7 +511,7 @@ export class AdwTabView extends HTMLElement {
|
|
|
511
511
|
label.className = 'adw-tab-title';
|
|
512
512
|
tab.appendChild(label);
|
|
513
513
|
|
|
514
|
-
tab.appendChild(
|
|
514
|
+
tab.appendChild(createGtkImage(null, 'adw-tab-indicator'));
|
|
515
515
|
|
|
516
516
|
// Close affordance — a small flat button drawn with a CSS "×" glyph. NOT because
|
|
517
517
|
// the glyph is unavailable: `window-close` is in the ICONS map and has a mask class
|
|
@@ -581,7 +581,7 @@ export class AdwTabView extends HTMLElement {
|
|
|
581
581
|
tab.classList.toggle('closing', page.closing);
|
|
582
582
|
|
|
583
583
|
const icons = tabIconState(page, this.getAttribute('default-icon'));
|
|
584
|
-
const icon = tab.querySelector('.adw-tab-icon') as
|
|
584
|
+
const icon = tab.querySelector('.adw-tab-icon') as GtkImage | null;
|
|
585
585
|
if (icon) {
|
|
586
586
|
icon.iconName = icons.icon;
|
|
587
587
|
// The two occupy the same slot and are never both visible: C
|
|
@@ -592,7 +592,7 @@ export class AdwTabView extends HTMLElement {
|
|
|
592
592
|
// The spinner is mounted only while it spins, so an idle tab holds no
|
|
593
593
|
// element in the shared rAF ticker.
|
|
594
594
|
if (spinner) spinner.hidden = !(icons.spinner && icons.iconVisible);
|
|
595
|
-
const indicator = tab.querySelector('.adw-tab-indicator') as
|
|
595
|
+
const indicator = tab.querySelector('.adw-tab-indicator') as GtkImage | null;
|
|
596
596
|
if (indicator) {
|
|
597
597
|
indicator.iconName = page.indicatorIcon;
|
|
598
598
|
indicator.hidden = !icons.indicatorVisible;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
import { AdwToast, AdwToastQueue } from '@gjsify/adwaita-core';
|
|
21
21
|
|
|
22
22
|
import { bindSlottedChildren } from '../slotted-children.js';
|
|
23
|
-
import {
|
|
23
|
+
import { createGtkImage } from './gtk-image.js';
|
|
24
24
|
import type { ToastScheduler, ToastTimerHandle } from '@gjsify/adwaita-core';
|
|
25
25
|
|
|
26
26
|
// The timing seam is re-exported so a consumer can type a custom scheduler for
|
|
@@ -196,7 +196,7 @@ export class AdwToastOverlay extends HTMLElement {
|
|
|
196
196
|
close.type = 'button';
|
|
197
197
|
close.className = 'adw-toast-close-button';
|
|
198
198
|
close.setAttribute('aria-label', 'Close');
|
|
199
|
-
close.appendChild(
|
|
199
|
+
close.appendChild(createGtkImage('window-close'));
|
|
200
200
|
close.addEventListener('click', () => this._queue.dismiss());
|
|
201
201
|
el.appendChild(close);
|
|
202
202
|
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
53
53
|
// Modifications: Implemented as a Web Component for @gjsify/adwaita-web; the
|
|
54
54
|
// selection state machine composed from @gjsify/adwaita-core, the icon node
|
|
55
|
-
// from <
|
|
55
|
+
// from <gtk-image>.
|
|
56
56
|
|
|
57
57
|
import { ToggleGroupState } from '@gjsify/adwaita-core';
|
|
58
58
|
|
|
59
|
-
import {
|
|
59
|
+
import { createGtkImage } from './gtk-image.js';
|
|
60
60
|
import { attachRovingFocus } from './roving-focus.js';
|
|
61
61
|
|
|
62
62
|
/** A single toggle. Children of <adw-toggle-group>; consumed at connect time. */
|
|
@@ -141,7 +141,7 @@ export class AdwToggleGroup extends HTMLElement {
|
|
|
141
141
|
|
|
142
142
|
const label = toggle.getAttribute('label') ?? '';
|
|
143
143
|
const icon = toggle.getAttribute('icon-name') ?? '';
|
|
144
|
-
if (icon) btn.appendChild(
|
|
144
|
+
if (icon) btn.appendChild(createGtkImage(icon));
|
|
145
145
|
if (label) btn.appendChild(document.createTextNode(label));
|
|
146
146
|
|
|
147
147
|
// An icon-only toggle has no text — give it an accessible name.
|
|
@@ -23,13 +23,13 @@ import { ViewSwitcherBarState, buildViewSwitcherButtons, viewSwitcherPagesFromSt
|
|
|
23
23
|
|
|
24
24
|
import type { AdwViewStack } from './adw-view-stack.js';
|
|
25
25
|
import { applyDescription, applyIndicator, applySwitcherIcon } from './view-switcher-dom.js';
|
|
26
|
-
import { type
|
|
26
|
+
import { type GtkImage, createGtkImage } from './gtk-image.js';
|
|
27
27
|
import { attachRovingFocus } from './roving-focus.js';
|
|
28
28
|
|
|
29
29
|
/** The DOM nodes one bar button owns — the bar paints the derived model onto them. */
|
|
30
30
|
interface BarButtonNodes {
|
|
31
31
|
button: HTMLButtonElement;
|
|
32
|
-
icon:
|
|
32
|
+
icon: GtkImage;
|
|
33
33
|
label: HTMLSpanElement;
|
|
34
34
|
indicator: HTMLSpanElement;
|
|
35
35
|
}
|
|
@@ -227,7 +227,7 @@ export class AdwViewSwitcherBar extends HTMLElement {
|
|
|
227
227
|
// recomputing the mapping — the spelling `<adw-inline-view-switcher>` uses.
|
|
228
228
|
button.dataset.pageIndex = String(pageIndex);
|
|
229
229
|
|
|
230
|
-
const icon =
|
|
230
|
+
const icon = createGtkImage(null, 'adw-view-switcher-bar-icon');
|
|
231
231
|
|
|
232
232
|
const label = document.createElement('span');
|
|
233
233
|
label.className = 'adw-view-switcher-bar-label';
|