@gjsify/adwaita-web 0.11.0 → 0.12.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 +5 -5
- package/dist/adwaita-web.css +2742 -263
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/elements/adw-about-dialog.d.ts +77 -0
- package/lib/types/elements/adw-action-row.d.ts +15 -0
- package/lib/types/elements/adw-alert-dialog.d.ts +80 -0
- package/lib/types/elements/adw-avatar.d.ts +9 -0
- package/lib/types/elements/adw-banner.d.ts +9 -0
- package/lib/types/elements/adw-bottom-sheet.d.ts +35 -0
- package/lib/types/elements/adw-button-content.d.ts +10 -0
- package/lib/types/elements/adw-button-row.d.ts +11 -0
- package/lib/types/elements/adw-button.d.ts +11 -0
- package/lib/types/elements/adw-carousel.d.ts +64 -0
- package/lib/types/elements/adw-clamp.d.ts +6 -0
- package/lib/types/elements/adw-combo-row.d.ts +3 -0
- package/lib/types/elements/adw-entry-row.d.ts +10 -0
- package/lib/types/elements/adw-entry.d.ts +11 -0
- package/lib/types/elements/adw-expander-row.d.ts +26 -0
- package/lib/types/elements/adw-header-bar.d.ts +4 -0
- package/lib/types/elements/adw-inline-view-switcher.d.ts +30 -0
- package/lib/types/elements/adw-navigation-split-view.d.ts +15 -0
- package/lib/types/elements/adw-navigation-view.d.ts +66 -0
- package/lib/types/elements/adw-password-entry-row.d.ts +16 -0
- package/lib/types/elements/adw-preferences-dialog.d.ts +36 -0
- package/lib/types/elements/adw-preferences-group.d.ts +8 -0
- package/lib/types/elements/adw-sidebar.d.ts +29 -0
- package/lib/types/elements/adw-spin-row.d.ts +3 -0
- package/lib/types/elements/adw-spinner.d.ts +6 -0
- package/lib/types/elements/adw-split-button.d.ts +18 -0
- package/lib/types/elements/adw-status-page.d.ts +11 -0
- package/lib/types/elements/adw-switch-row.d.ts +3 -0
- package/lib/types/elements/adw-tab-view.d.ts +24 -0
- package/lib/types/elements/adw-toast-overlay.d.ts +19 -4
- package/lib/types/elements/adw-toggle-group.d.ts +19 -0
- package/lib/types/elements/adw-toolbar-view.d.ts +13 -0
- package/lib/types/elements/adw-view-switcher.d.ts +29 -0
- package/lib/types/elements/adw-window-title.d.ts +9 -0
- package/lib/types/elements/adw-wrap-box.d.ts +13 -0
- package/lib/types/index.d.ts +29 -0
- package/lib/types/styles.generated.d.ts +1 -0
- package/package.json +5 -5
- package/scss/_about_dialog.scss +257 -0
- package/scss/_action_row.scss +65 -0
- package/scss/_alert_dialog.scss +151 -0
- package/scss/_avatar.scss +31 -0
- package/scss/_banner.scss +46 -0
- package/scss/_bottom_sheet.scss +113 -0
- package/scss/_button.scss +168 -0
- package/scss/_button_content.scss +48 -0
- package/scss/_button_row.scss +100 -0
- package/scss/_carousel.scss +130 -0
- package/scss/_clamp.scss +11 -0
- package/scss/_entry.scss +49 -0
- package/scss/_entry_row.scss +54 -0
- package/scss/_expander_row.scss +150 -0
- package/scss/_headerbar.scss +1 -1
- package/scss/_inline_view_switcher.scss +174 -0
- package/scss/_navigation_split_view.scss +48 -0
- package/scss/_navigation_view.scss +80 -0
- package/scss/_overlay_split_view.scss +19 -0
- package/scss/_password_entry_row.scss +67 -0
- package/scss/_preferences.scss +26 -3
- package/scss/_preferences_dialog.scss +154 -0
- package/scss/_row.scss +31 -0
- package/scss/_sidebar.scss +213 -0
- package/scss/_spin_row.scss +0 -1
- package/scss/_spinner.scss +28 -0
- package/scss/_split_button.scss +222 -0
- package/scss/_status_page.scss +40 -0
- package/scss/_switch_row.scss +0 -1
- package/scss/_tab_view.scss +193 -0
- package/scss/_theme.scss +12 -0
- package/scss/_toast.scss +122 -12
- package/scss/_toggle_group.scss +124 -0
- package/scss/_toolbar_view.scss +31 -0
- package/scss/_variables.scss +19 -0
- package/scss/_view_switcher.scss +133 -0
- package/scss/_window_title.scss +33 -0
- package/scss/_wrap_box.scss +20 -0
- package/scss/adwaita-skin.scss +38 -0
- package/src/elements/adw-about-dialog.ts +629 -0
- package/src/elements/adw-action-row.ts +82 -0
- package/src/elements/adw-alert-dialog.ts +385 -0
- package/src/elements/adw-avatar.ts +108 -0
- package/src/elements/adw-banner.ts +57 -0
- package/src/elements/adw-bottom-sheet.ts +205 -0
- package/src/elements/adw-button-content.ts +69 -0
- package/src/elements/adw-button-row.ts +75 -0
- package/src/elements/adw-button.ts +81 -0
- package/src/elements/adw-carousel.ts +321 -0
- package/src/elements/adw-clamp.ts +28 -0
- package/src/elements/adw-combo-row.ts +32 -20
- package/src/elements/adw-entry-row.ts +69 -0
- package/src/elements/adw-entry.ts +61 -0
- package/src/elements/adw-expander-row.ts +167 -0
- package/src/elements/adw-header-bar.ts +21 -8
- package/src/elements/adw-inline-view-switcher.ts +222 -0
- package/src/elements/adw-navigation-split-view.ts +89 -0
- package/src/elements/adw-navigation-view.ts +344 -0
- package/src/elements/adw-password-entry-row.ts +121 -0
- package/src/elements/adw-preferences-dialog.ts +240 -0
- package/src/elements/adw-preferences-group.ts +79 -12
- package/src/elements/adw-sidebar.ts +238 -0
- package/src/elements/adw-spin-row.ts +28 -14
- package/src/elements/adw-spinner.ts +31 -0
- package/src/elements/adw-split-button.ts +206 -0
- package/src/elements/adw-status-page.ts +66 -0
- package/src/elements/adw-switch-row.ts +29 -23
- package/src/elements/adw-tab-view.ts +184 -0
- package/src/elements/adw-toast-overlay.ts +98 -19
- package/src/elements/adw-toggle-group.ts +126 -0
- package/src/elements/adw-toolbar-view.ts +60 -0
- package/src/elements/adw-view-switcher.ts +200 -0
- package/src/elements/adw-window-title.ts +48 -0
- package/src/elements/adw-wrap-box.ts +139 -0
- package/src/index.js +1 -1
- package/src/index.ts +46 -3
- package/src/styles.generated.js +2976 -0
- package/src/styles2.generated.js +2976 -0
- package/style.css.d.ts +17 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class AdwActionRow extends HTMLElement {
|
|
2
|
+
private _titleEl;
|
|
3
|
+
private _subtitleEl;
|
|
4
|
+
private _suffixEl;
|
|
5
|
+
private _prefixEl;
|
|
6
|
+
private _initialized;
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
/** The end (suffix) section — append controls here imperatively. */
|
|
9
|
+
get suffixSection(): HTMLDivElement;
|
|
10
|
+
/** The start (prefix) section — append icons/widgets here imperatively. */
|
|
11
|
+
get prefixSection(): HTMLDivElement;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
attributeChangedCallback(): void;
|
|
14
|
+
private _render;
|
|
15
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** Response button appearance — mirrors Adw.ResponseAppearance. */
|
|
2
|
+
export type AdwResponseAppearance = 'default' | 'suggested' | 'destructive';
|
|
3
|
+
/**
|
|
4
|
+
* A single response declared in markup. Child of <adw-alert-dialog>; its `id`
|
|
5
|
+
* attribute is the response ID, its text content the label. Optional
|
|
6
|
+
* `appearance="suggested|destructive"` and `enabled="false"` mirror the
|
|
7
|
+
* GtkBuildable `<response>` element attributes. Consumed at connect time.
|
|
8
|
+
*/
|
|
9
|
+
export declare class AdwAlertResponse extends HTMLElement {
|
|
10
|
+
static get observedAttributes(): string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class AdwAlertDialog extends HTMLElement {
|
|
13
|
+
private _initialized;
|
|
14
|
+
private _scrimEl;
|
|
15
|
+
private _dialogEl;
|
|
16
|
+
private _headingEl;
|
|
17
|
+
private _bodyEl;
|
|
18
|
+
private _childEl;
|
|
19
|
+
private _responseAreaEl;
|
|
20
|
+
private _responses;
|
|
21
|
+
private _byId;
|
|
22
|
+
private _defaultResponse;
|
|
23
|
+
private _closeResponse;
|
|
24
|
+
private _blockCloseResponse;
|
|
25
|
+
static get observedAttributes(): string[];
|
|
26
|
+
/** The heading of the dialog. */
|
|
27
|
+
get heading(): string;
|
|
28
|
+
set heading(value: string);
|
|
29
|
+
/** The body text of the dialog. */
|
|
30
|
+
get body(): string;
|
|
31
|
+
set body(value: string);
|
|
32
|
+
/** Whether the dialog is currently shown. */
|
|
33
|
+
get open(): boolean;
|
|
34
|
+
set open(value: boolean);
|
|
35
|
+
/** Whether to prefer horizontal button layout when the buttons fit. */
|
|
36
|
+
get preferWideLayout(): boolean;
|
|
37
|
+
set preferWideLayout(value: boolean);
|
|
38
|
+
/** The ID of the default response (its button is highlighted). */
|
|
39
|
+
get defaultResponse(): string | null;
|
|
40
|
+
set defaultResponse(value: string | null);
|
|
41
|
+
/** The ID passed to `response` when the dialog is dismissed. */
|
|
42
|
+
get closeResponse(): string;
|
|
43
|
+
set closeResponse(value: string);
|
|
44
|
+
connectedCallback(): void;
|
|
45
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
46
|
+
/** Present the dialog. `parent` is accepted for API parity; unused. */
|
|
47
|
+
present(_parent?: unknown): void;
|
|
48
|
+
/** Adds a response button with the given ID and label. */
|
|
49
|
+
addResponse(id: string, label: string): void;
|
|
50
|
+
/** Adds multiple responses at once — id/label pairs (Adw.add_responses parity). */
|
|
51
|
+
addResponses(...idLabelPairs: string[]): void;
|
|
52
|
+
/** Removes a response. */
|
|
53
|
+
removeResponse(id: string): void;
|
|
54
|
+
/** Whether a response with the given ID exists. */
|
|
55
|
+
hasResponse(id: string): boolean;
|
|
56
|
+
/** Gets a response's label. */
|
|
57
|
+
getResponseLabel(id: string): string | null;
|
|
58
|
+
/** Sets a response's label. */
|
|
59
|
+
setResponseLabel(id: string, label: string): void;
|
|
60
|
+
/** Gets a response's appearance. */
|
|
61
|
+
getResponseAppearance(id: string): AdwResponseAppearance | null;
|
|
62
|
+
/** Sets a response's appearance (default / suggested / destructive). */
|
|
63
|
+
setResponseAppearance(id: string, appearance: AdwResponseAppearance): void;
|
|
64
|
+
/** Gets whether a response is enabled. */
|
|
65
|
+
getResponseEnabled(id: string): boolean;
|
|
66
|
+
/** Sets whether a response is enabled (disabled buttons can't be activated). */
|
|
67
|
+
setResponseEnabled(id: string, enabled: boolean): void;
|
|
68
|
+
/** Sets the default response — its button is highlighted as the suggested one. */
|
|
69
|
+
setDefaultResponse(id: string | null): void;
|
|
70
|
+
/** Sets the close response — emitted on dismissal (Escape / scrim click). */
|
|
71
|
+
setCloseResponse(id: string): void;
|
|
72
|
+
/** A response button was activated: close, then emit `response`. */
|
|
73
|
+
private _activateResponse;
|
|
74
|
+
/** Dismissal (Escape / scrim) — close, then emit the close-response. */
|
|
75
|
+
private _dismiss;
|
|
76
|
+
private _emitResponse;
|
|
77
|
+
/** Move focus to the default response button (or the first enabled one). */
|
|
78
|
+
private _focusInitial;
|
|
79
|
+
private _render;
|
|
80
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** The persistent content. Child of <adw-bottom-sheet>; consumed at connect time. */
|
|
2
|
+
export declare class AdwBottomSheetContent extends HTMLElement {
|
|
3
|
+
}
|
|
4
|
+
/** The slide-up sheet. Child of <adw-bottom-sheet>; consumed at connect time. */
|
|
5
|
+
export declare class AdwBottomSheetSheet extends HTMLElement {
|
|
6
|
+
}
|
|
7
|
+
export declare class AdwBottomSheet extends HTMLElement {
|
|
8
|
+
private _initialized;
|
|
9
|
+
private _contentEl;
|
|
10
|
+
private _dimmingEl;
|
|
11
|
+
private _sheetEl;
|
|
12
|
+
private _dragHandleEl;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
/** Whether the sheet is revealed. */
|
|
15
|
+
get open(): boolean;
|
|
16
|
+
set open(value: boolean);
|
|
17
|
+
/** Whether the content is dimmed + blocked while the sheet is open. */
|
|
18
|
+
get modal(): boolean;
|
|
19
|
+
set modal(value: boolean);
|
|
20
|
+
/** Whether the user can dismiss the sheet (handle / dimming / Escape). */
|
|
21
|
+
get canClose(): boolean;
|
|
22
|
+
set canClose(value: boolean);
|
|
23
|
+
/** Whether the overlaid drag handle is shown. */
|
|
24
|
+
get showDragHandle(): boolean;
|
|
25
|
+
set showDragHandle(value: boolean);
|
|
26
|
+
connectedCallback(): void;
|
|
27
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
28
|
+
private _attemptClose;
|
|
29
|
+
private _render;
|
|
30
|
+
/** Read a boolean attribute that defaults to `true` when absent. */
|
|
31
|
+
private _boolAttr;
|
|
32
|
+
private _setBoolAttr;
|
|
33
|
+
/** Move declared slot children out of the light-DOM tree into a list. */
|
|
34
|
+
private _collectSlot;
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class AdwButtonContent extends HTMLElement {
|
|
2
|
+
private _boxEl;
|
|
3
|
+
private _iconEl;
|
|
4
|
+
private _labelEl;
|
|
5
|
+
private _initialized;
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
attributeChangedCallback(name: string): void;
|
|
9
|
+
private _render;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class AdwButtonRow extends HTMLElement {
|
|
2
|
+
private _contentsEl;
|
|
3
|
+
private _startIconEl;
|
|
4
|
+
private _titleEl;
|
|
5
|
+
private _initialized;
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
attributeChangedCallback(): void;
|
|
9
|
+
private _isActivatable;
|
|
10
|
+
private _render;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class AdwButton extends HTMLElement {
|
|
2
|
+
private _button;
|
|
3
|
+
private _label;
|
|
4
|
+
private _initialized;
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
/** The inner native button (for focus/imperative access). */
|
|
7
|
+
get button(): HTMLButtonElement;
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
attributeChangedCallback(): void;
|
|
10
|
+
private _render;
|
|
11
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Common surface an indicator binds to. The concrete element is AdwCarousel. */
|
|
2
|
+
interface CarouselHost extends HTMLElement {
|
|
3
|
+
readonly nPages: number;
|
|
4
|
+
readonly position: number;
|
|
5
|
+
scrollToPage(index: number): void;
|
|
6
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject): void;
|
|
7
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class AdwCarousel extends HTMLElement implements CarouselHost {
|
|
10
|
+
private _trackEl;
|
|
11
|
+
private _pages;
|
|
12
|
+
private _position;
|
|
13
|
+
private _scrollRaf;
|
|
14
|
+
private _wheelAccum;
|
|
15
|
+
private _initialized;
|
|
16
|
+
static get observedAttributes(): string[];
|
|
17
|
+
/** Number of pages in the carousel. */
|
|
18
|
+
get nPages(): number;
|
|
19
|
+
/** Fractional scroll position (0 = first page, 1 = second, …). */
|
|
20
|
+
get position(): number;
|
|
21
|
+
set position(value: number);
|
|
22
|
+
/** Whether the scroll wheel navigates between pages. */
|
|
23
|
+
get allowScrollWheel(): boolean;
|
|
24
|
+
set allowScrollWheel(value: boolean);
|
|
25
|
+
/** Whether a single flick can skip more than one page. */
|
|
26
|
+
get allowLongSwipes(): boolean;
|
|
27
|
+
set allowLongSwipes(value: boolean);
|
|
28
|
+
connectedCallback(): void;
|
|
29
|
+
attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
30
|
+
/** Scroll (snap) to the page at `index`, clamped to the valid range. */
|
|
31
|
+
scrollToPage(index: number): void;
|
|
32
|
+
private _onScroll;
|
|
33
|
+
private _onWheel;
|
|
34
|
+
private _updatePositionFromScroll;
|
|
35
|
+
private _slotWidth;
|
|
36
|
+
private _emitPosition;
|
|
37
|
+
}
|
|
38
|
+
/** Shared base for the dot / line indicator elements. */
|
|
39
|
+
declare abstract class AdwCarouselIndicator extends HTMLElement {
|
|
40
|
+
protected _carousel: CarouselHost | null;
|
|
41
|
+
protected _initialized: boolean;
|
|
42
|
+
static get observedAttributes(): string[];
|
|
43
|
+
/** The bound carousel. Mirrors AdwCarouselIndicator*'s `carousel` property. */
|
|
44
|
+
get carousel(): CarouselHost | null;
|
|
45
|
+
set carousel(value: CarouselHost | null);
|
|
46
|
+
connectedCallback(): void;
|
|
47
|
+
disconnectedCallback(): void;
|
|
48
|
+
attributeChangedCallback(name: string): void;
|
|
49
|
+
private _resolveForAttr;
|
|
50
|
+
private _attach;
|
|
51
|
+
private _detach;
|
|
52
|
+
private _onChange;
|
|
53
|
+
protected nPages(): number;
|
|
54
|
+
protected position(): number;
|
|
55
|
+
protected goTo(index: number): void;
|
|
56
|
+
protected abstract _render(): void;
|
|
57
|
+
}
|
|
58
|
+
export declare class AdwCarouselIndicatorDots extends AdwCarouselIndicator {
|
|
59
|
+
protected _render(): void;
|
|
60
|
+
}
|
|
61
|
+
export declare class AdwCarouselIndicatorLines extends AdwCarouselIndicator {
|
|
62
|
+
protected _render(): void;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare class AdwComboRow extends HTMLElement {
|
|
2
2
|
private _select;
|
|
3
3
|
private _valueEl;
|
|
4
|
+
private _titleEl;
|
|
5
|
+
private _subtitleEl;
|
|
4
6
|
private _items;
|
|
5
7
|
private _initialized;
|
|
6
8
|
static get observedAttributes(): string[];
|
|
@@ -8,4 +10,5 @@ export declare class AdwComboRow extends HTMLElement {
|
|
|
8
10
|
set selected(value: number);
|
|
9
11
|
connectedCallback(): void;
|
|
10
12
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
13
|
+
private _renderText;
|
|
11
14
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class AdwEntryRow extends HTMLElement {
|
|
2
|
+
private _input;
|
|
3
|
+
private _titleEl;
|
|
4
|
+
private _initialized;
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
get text(): string;
|
|
7
|
+
set text(value: string);
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class AdwEntry extends HTMLElement {
|
|
2
|
+
private _input;
|
|
3
|
+
private _initialized;
|
|
4
|
+
static get observedAttributes(): string[];
|
|
5
|
+
get value(): string;
|
|
6
|
+
set value(v: string);
|
|
7
|
+
/** The inner native input (for focus/selection). */
|
|
8
|
+
get input(): HTMLInputElement;
|
|
9
|
+
connectedCallback(): void;
|
|
10
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare class AdwExpanderRow extends HTMLElement {
|
|
2
|
+
private _headerEl;
|
|
3
|
+
private _titleEl;
|
|
4
|
+
private _subtitleEl;
|
|
5
|
+
private _enableSwitch;
|
|
6
|
+
private _enableLabel;
|
|
7
|
+
private _chevronEl;
|
|
8
|
+
private _contentEl;
|
|
9
|
+
private _prefixEl;
|
|
10
|
+
private _suffixEl;
|
|
11
|
+
private _initialized;
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
get expanded(): boolean;
|
|
14
|
+
set expanded(value: boolean);
|
|
15
|
+
get enableExpansion(): boolean;
|
|
16
|
+
set enableExpansion(value: boolean);
|
|
17
|
+
/** The disclosed content section — append nested rows here imperatively. */
|
|
18
|
+
get contentSection(): HTMLDivElement;
|
|
19
|
+
/** The header suffix section — append controls here imperatively. */
|
|
20
|
+
get suffixSection(): HTMLDivElement;
|
|
21
|
+
/** The header prefix section — append icons/widgets here imperatively. */
|
|
22
|
+
get prefixSection(): HTMLDivElement;
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
attributeChangedCallback(): void;
|
|
25
|
+
private _render;
|
|
26
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
export declare class AdwHeaderBar extends HTMLElement {
|
|
2
2
|
private _initialized;
|
|
3
3
|
private _startEl;
|
|
4
|
+
private _centerEl;
|
|
4
5
|
private _endEl;
|
|
5
6
|
/** The start (left) section container — append buttons/widgets here. */
|
|
6
7
|
get startSection(): HTMLDivElement | null;
|
|
8
|
+
/** The center (title) section — holds the `title` text or any `slot="center"`
|
|
9
|
+
* widget (the equivalent of Adw.HeaderBar's title-widget, e.g. a URL entry). */
|
|
10
|
+
get centerSection(): HTMLDivElement | null;
|
|
7
11
|
/** The end (right) section container — append buttons/widgets here. */
|
|
8
12
|
get endSection(): HTMLDivElement | null;
|
|
9
13
|
connectedCallback(): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** The three display modes, mirroring AdwInlineViewSwitcherDisplayMode. */
|
|
2
|
+
declare const DISPLAY_MODES: readonly ["labels", "icons", "both"];
|
|
3
|
+
type DisplayMode = (typeof DISPLAY_MODES)[number];
|
|
4
|
+
/** A single page. Children of <adw-inline-view-switcher>; consumed at connect time. */
|
|
5
|
+
export declare class AdwViewStackPage extends HTMLElement {
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
}
|
|
8
|
+
export declare class AdwInlineViewSwitcher extends HTMLElement {
|
|
9
|
+
private _groupEl;
|
|
10
|
+
private _pagesEl;
|
|
11
|
+
private _toggles;
|
|
12
|
+
private _pages;
|
|
13
|
+
private _active;
|
|
14
|
+
private _displayMode;
|
|
15
|
+
private _initialized;
|
|
16
|
+
static get observedAttributes(): string[];
|
|
17
|
+
/** Zero-based index of the visible page. */
|
|
18
|
+
get active(): number;
|
|
19
|
+
set active(value: number);
|
|
20
|
+
/** What the toggles display: 'labels', 'icons' or 'both'. */
|
|
21
|
+
get displayMode(): DisplayMode;
|
|
22
|
+
set displayMode(value: DisplayMode);
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
attributeChangedCallback(name: string): void;
|
|
25
|
+
private _readActiveAttr;
|
|
26
|
+
private _readDisplayModeAttr;
|
|
27
|
+
private _selectIndex;
|
|
28
|
+
private _render;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class AdwNavigationSplitView extends HTMLElement {
|
|
2
|
+
private _sidebarEl;
|
|
3
|
+
private _contentEl;
|
|
4
|
+
private _initialized;
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
get collapsed(): boolean;
|
|
7
|
+
set collapsed(v: boolean);
|
|
8
|
+
/** When collapsed, whether the content pane (true) or sidebar (false) shows. */
|
|
9
|
+
get showContent(): boolean;
|
|
10
|
+
set showContent(v: boolean);
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
attributeChangedCallback(name: string): void;
|
|
13
|
+
private _syncWidth;
|
|
14
|
+
private _syncClasses;
|
|
15
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** A single navigation page. Children of <adw-navigation-view>. */
|
|
2
|
+
export declare class AdwNavigationPage extends HTMLElement {
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
get title(): string;
|
|
5
|
+
set title(value: string);
|
|
6
|
+
get tag(): string | null;
|
|
7
|
+
set tag(value: string | null);
|
|
8
|
+
/** Whether the page can be popped (and thus shows a back button). */
|
|
9
|
+
get canPop(): boolean;
|
|
10
|
+
set canPop(value: boolean);
|
|
11
|
+
}
|
|
12
|
+
export declare class AdwNavigationView extends HTMLElement {
|
|
13
|
+
private _pagesEl;
|
|
14
|
+
private _pages;
|
|
15
|
+
private _stack;
|
|
16
|
+
private _dynamic;
|
|
17
|
+
private _backButtons;
|
|
18
|
+
private _initialized;
|
|
19
|
+
static get observedAttributes(): string[];
|
|
20
|
+
/** Whether push/pop transitions are animated. */
|
|
21
|
+
get animateTransitions(): boolean;
|
|
22
|
+
set animateTransitions(value: boolean);
|
|
23
|
+
/** The currently-visible page (top of the stack), or null when empty. */
|
|
24
|
+
get visiblePage(): AdwNavigationPage | null;
|
|
25
|
+
/** The tag of the visible page, or null. */
|
|
26
|
+
get visiblePageTag(): string | null;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
attributeChangedCallback(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Add a static page without pushing it (mirrors AdwNavigationView.add). The
|
|
31
|
+
* view keeps a reference; the page becomes reachable via push-by-tag. Named
|
|
32
|
+
* `addPage` rather than `add` to avoid clashing with any DOM method.
|
|
33
|
+
*/
|
|
34
|
+
addPage(page: AdwNavigationPage): void;
|
|
35
|
+
/**
|
|
36
|
+
* Remove a static page (mirrors AdwNavigationView.remove). Named `removePage`
|
|
37
|
+
* to avoid overriding HTMLElement.remove() (which takes no arguments).
|
|
38
|
+
*/
|
|
39
|
+
removePage(page: AdwNavigationPage): void;
|
|
40
|
+
/**
|
|
41
|
+
* Push a page onto the navigation stack (mirrors AdwNavigationView.push).
|
|
42
|
+
* Accepts a page element or, when given a string, the tag of a known page
|
|
43
|
+
* (push-by-tag, mirrors AdwNavigationView.push_by_tag). A page that is not
|
|
44
|
+
* already known is added dynamically and destroyed when it is popped.
|
|
45
|
+
*/
|
|
46
|
+
push(pageOrTag: AdwNavigationPage | string): void;
|
|
47
|
+
/**
|
|
48
|
+
* Pop the visible page off the stack (mirrors AdwNavigationView.pop).
|
|
49
|
+
* Returns true when a page was popped. A dynamically-pushed page is removed
|
|
50
|
+
* from the DOM. The root page cannot be popped.
|
|
51
|
+
*/
|
|
52
|
+
pop(): boolean;
|
|
53
|
+
/** Pop every page down to (and including pushing) the given tag's page. */
|
|
54
|
+
popToTag(tag: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Replace the whole navigation stack with the given pages (mirrors
|
|
57
|
+
* AdwNavigationView.replace). The last page becomes visible.
|
|
58
|
+
*/
|
|
59
|
+
replace(pages: Array<AdwNavigationPage | string>): void;
|
|
60
|
+
private _resolvePage;
|
|
61
|
+
private _syncClasses;
|
|
62
|
+
private _render;
|
|
63
|
+
/** Inject (or remove) the automatic back button on the visible page. */
|
|
64
|
+
private _syncBackButton;
|
|
65
|
+
private _removeBackButton;
|
|
66
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class AdwPasswordEntryRow extends HTMLElement {
|
|
2
|
+
private _input;
|
|
3
|
+
private _titleEl;
|
|
4
|
+
private _toggle;
|
|
5
|
+
private _toggleIcon;
|
|
6
|
+
private _initialized;
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
get text(): string;
|
|
9
|
+
set text(value: string);
|
|
10
|
+
/** Whether the contents are shown in clear text (peek toggle is engaged). */
|
|
11
|
+
get revealed(): boolean;
|
|
12
|
+
set revealed(value: boolean);
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
15
|
+
private _renderRevealed;
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single preferences page. Child of <adw-preferences-dialog>; consumed at
|
|
3
|
+
* connect time. Carries optional `title` / `icon-name` attributes and any
|
|
4
|
+
* <adw-preferences-group> content — mirrors Adw.PreferencesPage.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AdwPreferencesPage extends HTMLElement {
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
}
|
|
9
|
+
export declare class AdwPreferencesDialog extends HTMLElement {
|
|
10
|
+
private _initialized;
|
|
11
|
+
private _scrimEl;
|
|
12
|
+
private _dialogEl;
|
|
13
|
+
private _titleEl;
|
|
14
|
+
private _bodyEl;
|
|
15
|
+
private _closeBtn;
|
|
16
|
+
static get observedAttributes(): string[];
|
|
17
|
+
/** Whether the dialog is revealed. */
|
|
18
|
+
get open(): boolean;
|
|
19
|
+
set open(value: boolean);
|
|
20
|
+
/** Whether the user can dismiss the dialog (scrim / Escape / close button). */
|
|
21
|
+
get canClose(): boolean;
|
|
22
|
+
set canClose(value: boolean);
|
|
23
|
+
/** The dialog's preferred content width in px (Adw.Dialog:content-width). */
|
|
24
|
+
get contentWidth(): number;
|
|
25
|
+
set contentWidth(value: number);
|
|
26
|
+
/** Reveal the dialog (mirrors Adw.Dialog.present). */
|
|
27
|
+
present(): void;
|
|
28
|
+
/** Dismiss the dialog, respecting `can-close` (mirrors Adw.Dialog.close). */
|
|
29
|
+
close(): void;
|
|
30
|
+
/** Dismiss the dialog regardless of `can-close` (mirrors Adw.Dialog.force_close). */
|
|
31
|
+
forceClose(): void;
|
|
32
|
+
connectedCallback(): void;
|
|
33
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
34
|
+
private _attemptClose;
|
|
35
|
+
private _render;
|
|
36
|
+
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare class AdwPreferencesGroup extends HTMLElement {
|
|
2
|
+
private _titleEl;
|
|
3
|
+
private _descriptionEl;
|
|
4
|
+
private _suffixEl;
|
|
2
5
|
private _initialized;
|
|
6
|
+
static get observedAttributes(): string[];
|
|
7
|
+
get description(): string;
|
|
8
|
+
set description(value: string);
|
|
3
9
|
connectedCallback(): void;
|
|
10
|
+
attributeChangedCallback(): void;
|
|
11
|
+
private _renderHeader;
|
|
4
12
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** A single sidebar item. Child of <adw-sidebar-section>; consumed at connect time. */
|
|
2
|
+
export declare class AdwSidebarItem extends HTMLElement {
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
}
|
|
5
|
+
/** A titled group of items. Child of <adw-sidebar>; consumed at connect time. */
|
|
6
|
+
export declare class AdwSidebarSection extends HTMLElement {
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
}
|
|
9
|
+
export declare class AdwSidebar extends HTMLElement {
|
|
10
|
+
private _listEl;
|
|
11
|
+
private _rows;
|
|
12
|
+
private _selected;
|
|
13
|
+
private _mode;
|
|
14
|
+
private _initialized;
|
|
15
|
+
static get observedAttributes(): string[];
|
|
16
|
+
/** Zero-based flat index of the selected item, or -1 for no selection. */
|
|
17
|
+
get selected(): number;
|
|
18
|
+
set selected(value: number);
|
|
19
|
+
/** 'sidebar' (flat navigation list) or 'page' (boxed lists). */
|
|
20
|
+
get mode(): 'sidebar' | 'page';
|
|
21
|
+
set mode(value: 'sidebar' | 'page');
|
|
22
|
+
connectedCallback(): void;
|
|
23
|
+
attributeChangedCallback(name: string): void;
|
|
24
|
+
private _readModeAttr;
|
|
25
|
+
private _readSelectedAttr;
|
|
26
|
+
/** Click handler — selects the row (if changed) and always emits `activated`. */
|
|
27
|
+
private _activateIndex;
|
|
28
|
+
private _render;
|
|
29
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare class AdwSpinRow extends HTMLElement {
|
|
2
2
|
private _input;
|
|
3
|
+
private _titleEl;
|
|
4
|
+
private _subtitleEl;
|
|
3
5
|
private _min;
|
|
4
6
|
private _max;
|
|
5
7
|
private _step;
|
|
@@ -10,6 +12,7 @@ export declare class AdwSpinRow extends HTMLElement {
|
|
|
10
12
|
set value(v: number);
|
|
11
13
|
connectedCallback(): void;
|
|
12
14
|
attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
|
|
15
|
+
private _renderText;
|
|
13
16
|
private _adjust;
|
|
14
17
|
private _emitChange;
|
|
15
18
|
private _countDecimals;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class AdwSplitButton extends HTMLElement {
|
|
2
|
+
private _actionEl;
|
|
3
|
+
private _dropdownEl;
|
|
4
|
+
private _menuEl;
|
|
5
|
+
private _label;
|
|
6
|
+
private _active;
|
|
7
|
+
private _initialized;
|
|
8
|
+
private _onDocumentPointerDown;
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
/** Whether the dropdown menu is currently open. */
|
|
11
|
+
get active(): boolean;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
disconnectedCallback(): void;
|
|
14
|
+
attributeChangedCallback(): void;
|
|
15
|
+
private _setActive;
|
|
16
|
+
private _parseMenu;
|
|
17
|
+
private _render;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class AdwStatusPage extends HTMLElement {
|
|
2
|
+
private _iconEl;
|
|
3
|
+
private _titleEl;
|
|
4
|
+
private _descEl;
|
|
5
|
+
private _childEl;
|
|
6
|
+
private _initialized;
|
|
7
|
+
static get observedAttributes(): string[];
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
attributeChangedCallback(): void;
|
|
10
|
+
private _render;
|
|
11
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export declare class AdwSwitchRow extends HTMLElement {
|
|
2
2
|
private _checkbox;
|
|
3
|
+
private _titleEl;
|
|
4
|
+
private _subtitleEl;
|
|
3
5
|
private _initialized;
|
|
4
6
|
static get observedAttributes(): string[];
|
|
5
7
|
get active(): boolean;
|
|
6
8
|
set active(value: boolean);
|
|
7
9
|
connectedCallback(): void;
|
|
8
10
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
11
|
+
private _renderText;
|
|
9
12
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** A single page. Children of <adw-tab-view>; consumed at connect time. */
|
|
2
|
+
export declare class AdwTabPage extends HTMLElement {
|
|
3
|
+
static get observedAttributes(): string[];
|
|
4
|
+
}
|
|
5
|
+
export declare class AdwTabView extends HTMLElement {
|
|
6
|
+
private _barEl;
|
|
7
|
+
private _pagesEl;
|
|
8
|
+
private _tabs;
|
|
9
|
+
private _pages;
|
|
10
|
+
private _selected;
|
|
11
|
+
private _initialized;
|
|
12
|
+
static get observedAttributes(): string[];
|
|
13
|
+
/** Zero-based index of the visible page. */
|
|
14
|
+
get selected(): number;
|
|
15
|
+
set selected(value: number);
|
|
16
|
+
/** Whether the tab bar hides itself when only one page remains. */
|
|
17
|
+
get autohide(): boolean;
|
|
18
|
+
set autohide(value: boolean);
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
attributeChangedCallback(name: string): void;
|
|
21
|
+
private _readSelectedAttr;
|
|
22
|
+
private _selectIndex;
|
|
23
|
+
private _render;
|
|
24
|
+
}
|