@gjsify/adwaita-web 0.10.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,154 @@
|
|
|
1
|
+
// _preferences_dialog.scss — adw-preferences-dialog styling (scrim + dialog box).
|
|
2
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_dialogs.scss (floating-sheet
|
|
3
|
+
// scrim/dimming + sheet radius + box-shadow + outline)
|
|
4
|
+
// Reference: refs/libadwaita/src/adw-preferences-dialog.ui (flat header + title)
|
|
5
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
6
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
7
|
+
|
|
8
|
+
adw-preferences-dialog {
|
|
9
|
+
// Hidden until presented (the `open` class is toggled by the component). The
|
|
10
|
+
// element itself contributes nothing to layout while closed.
|
|
11
|
+
display: none;
|
|
12
|
+
|
|
13
|
+
&.open {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Full-cover scrim — a fixed dimming layer behind the dialog box. Adwaita
|
|
18
|
+
// dims with `--shade-color` at double alpha (see _dialogs.scss `floating-sheet
|
|
19
|
+
// > dimming`); --shade-color isn't in the adwaita-web token subset, so use the
|
|
20
|
+
// equivalent neutral wash.
|
|
21
|
+
.adw-preferences-dialog-scrim {
|
|
22
|
+
position: fixed;
|
|
23
|
+
inset: 0;
|
|
24
|
+
z-index: 1000;
|
|
25
|
+
background-color: rgba(0, 0, 6, 0.32);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// The centred floating dialog box. Mirrors `floating-sheet > sheet`: the
|
|
29
|
+
// dialog radius (= --window-radius in Adwaita), the layered drop shadow and a
|
|
30
|
+
// 1px window outline.
|
|
31
|
+
.adw-preferences-dialog-box {
|
|
32
|
+
position: fixed;
|
|
33
|
+
top: 50%;
|
|
34
|
+
left: 50%;
|
|
35
|
+
transform: translate(-50%, -50%);
|
|
36
|
+
z-index: 1001;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
width: min(var(--adw-dialog-content-width, 640px), calc(100vw - 48px));
|
|
40
|
+
max-height: calc(100vh - 48px);
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
background-color: var(--window-bg-color);
|
|
43
|
+
color: var(--window-fg-color);
|
|
44
|
+
border-radius: var(--window-radius);
|
|
45
|
+
outline: 1px solid var(--separator-color);
|
|
46
|
+
outline-offset: -1px;
|
|
47
|
+
box-shadow:
|
|
48
|
+
0 0 0 1px rgba(0, 0, 0, 0.05),
|
|
49
|
+
0 0 5px 2px rgba(0, 0, 6, 0.1),
|
|
50
|
+
0 0 14px 2px rgba(0, 0, 6, 0.03);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Flat header bar — transparent over the window background (Adw's preferences
|
|
54
|
+
// dialog header uses a flat AdwHeaderBar), title centred against the trailing
|
|
55
|
+
// close button.
|
|
56
|
+
.adw-preferences-dialog-header {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
min-height: 47px;
|
|
60
|
+
padding: 0 6px;
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Equal-width sides keep the title optically centred (strict centering).
|
|
65
|
+
.adw-preferences-dialog-header-side {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
flex: 1 1 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.adw-preferences-dialog-header-side--end {
|
|
73
|
+
justify-content: flex-end;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.adw-preferences-dialog-title {
|
|
77
|
+
flex: 0 0 auto;
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
font-size: var(--font-size-base);
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
padding: 0 6px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Round flat close button drawing a CSS "×" glyph (no symbolic close icon
|
|
87
|
+
// ships in @gjsify/adwaita-icons — same approach as <adw-tab-view>).
|
|
88
|
+
.adw-preferences-dialog-close {
|
|
89
|
+
appearance: none;
|
|
90
|
+
border: none;
|
|
91
|
+
margin: 0;
|
|
92
|
+
width: 28px;
|
|
93
|
+
height: 28px;
|
|
94
|
+
padding: 0;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
background-color: transparent;
|
|
97
|
+
color: var(--window-fg-color);
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
position: relative;
|
|
100
|
+
transition: background-color 0.1s ease;
|
|
101
|
+
|
|
102
|
+
&::before,
|
|
103
|
+
&::after {
|
|
104
|
+
content: '';
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 50%;
|
|
107
|
+
left: 50%;
|
|
108
|
+
width: 12px;
|
|
109
|
+
height: 1.5px;
|
|
110
|
+
background-color: currentColor;
|
|
111
|
+
border-radius: 1px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&::before {
|
|
115
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&::after {
|
|
119
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background-color: var(--button-hover-color);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:active {
|
|
127
|
+
background-color: var(--button-active-color);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&.locked {
|
|
131
|
+
opacity: var(--dim-opacity);
|
|
132
|
+
cursor: default;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Scrolled body holding the stacked pages. Adwaita preferences pages sit on
|
|
137
|
+
// the window background (the boxed-list groups carry their own card surface).
|
|
138
|
+
.adw-preferences-dialog-body {
|
|
139
|
+
flex: 1 1 auto;
|
|
140
|
+
min-height: 0;
|
|
141
|
+
overflow-y: auto;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Clamped column of preferences groups — Adw.PreferencesPage clamps content to
|
|
145
|
+
// a comfortable reading width and stacks groups with generous spacing.
|
|
146
|
+
.adw-preferences-dialog-pages {
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
gap: var(--spacing-xl);
|
|
150
|
+
max-width: 600px;
|
|
151
|
+
margin: 0 auto;
|
|
152
|
+
padding: var(--spacing-xl) var(--spacing-m);
|
|
153
|
+
}
|
|
154
|
+
}
|
package/scss/_row.scss
CHANGED
|
@@ -20,6 +20,37 @@ adw-combo-row {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
// Shared title/subtitle text column used by every row type (action/switch/
|
|
24
|
+
// combo/spin). The title is the primary label; the subtitle is dimmed and
|
|
25
|
+
// hidden when empty.
|
|
26
|
+
.adw-row-text {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
flex: 1 1 auto;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.adw-row-subtitle {
|
|
35
|
+
font-size: var(--font-size-small);
|
|
36
|
+
opacity: var(--dim-opacity);
|
|
37
|
+
color: var(--card-fg-color);
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Trailing edit pencil shared by editable rows (entry/password) — the
|
|
44
|
+
// Adw.EntryRow edit affordance. Dimmed; clicking focuses the entry.
|
|
45
|
+
.adw-row-edit {
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
width: 16px;
|
|
48
|
+
height: 16px;
|
|
49
|
+
color: var(--card-fg-color);
|
|
50
|
+
opacity: 0.55;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
23
54
|
// Utility separator (used by content layouts)
|
|
24
55
|
.adw-separator-vertical {
|
|
25
56
|
width: 1px;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
// _sidebar.scss — adw-sidebar styling (a selectable navigation sidebar built
|
|
2
|
+
// from titled sections of icon + title + subtitle items). In sidebar mode it
|
|
3
|
+
// renders as the flat AdwSidebar navigation list (`.navigation-sidebar`); in
|
|
4
|
+
// page mode it renders as boxed lists with a trailing chevron on each row (the
|
|
5
|
+
// AdwPreferencesPage look the native widget switches to when collapsed).
|
|
6
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_sidebars.scss (.navigation-sidebar, sidebar)
|
|
7
|
+
// Reference: refs/libadwaita/src/adw-sidebar.c (row/header/section structure)
|
|
8
|
+
// Copyright (c) 2025 GNOME Foundation Inc. (libadwaita). LGPLv2.1+.
|
|
9
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
10
|
+
|
|
11
|
+
adw-sidebar {
|
|
12
|
+
display: block;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
background-color: var(--sidebar-bg-color, var(--window-bg-color));
|
|
16
|
+
color: var(--sidebar-fg-color, var(--window-fg-color));
|
|
17
|
+
|
|
18
|
+
.adw-sidebar-list {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
// libadwaita's menu margins around the navigation list.
|
|
23
|
+
padding: var(--spacing-xs) 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.adw-sidebar-section {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// --- Section headers (heading or separator) ---
|
|
32
|
+
.adw-sidebar-section-header {
|
|
33
|
+
&[hidden] {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Untitled section → a horizontal separator before its rows (the way the
|
|
38
|
+
// AdwSidebar header stack shows its "separator" child).
|
|
39
|
+
&.separator {
|
|
40
|
+
height: 1px;
|
|
41
|
+
margin: var(--spacing-xs) var(--spacing-s);
|
|
42
|
+
background-color: var(--separator-color, var(--card-shade-color));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.has-title {
|
|
46
|
+
padding: var(--spacing-s) calc(var(--spacing-s) + 6px) var(--spacing-xs);
|
|
47
|
+
|
|
48
|
+
// The first header sits flush with the top (mirrors `.header.first`).
|
|
49
|
+
&.first {
|
|
50
|
+
padding-top: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.adw-sidebar-section-heading {
|
|
56
|
+
font-size: var(--font-size-small);
|
|
57
|
+
font-weight: 700;
|
|
58
|
+
opacity: var(--dim-opacity);
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// --- A single item row ---
|
|
65
|
+
.adw-sidebar-item {
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
gap: var(--spacing-m);
|
|
70
|
+
width: 100%;
|
|
71
|
+
min-height: 36px;
|
|
72
|
+
// The native row has a context menu, so padding lives on the inner box and
|
|
73
|
+
// the row itself carries the menu margin + radius.
|
|
74
|
+
margin: 0 var(--spacing-xs) 2px;
|
|
75
|
+
padding: 3px 14px;
|
|
76
|
+
border: none;
|
|
77
|
+
border-radius: var(--button-radius, 6px);
|
|
78
|
+
background-color: transparent;
|
|
79
|
+
color: inherit;
|
|
80
|
+
font-family: var(--font-family);
|
|
81
|
+
font-size: var(--font-size-base);
|
|
82
|
+
text-align: start;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
user-select: none;
|
|
85
|
+
-webkit-user-select: none;
|
|
86
|
+
transition:
|
|
87
|
+
background-color 150ms ease-in-out,
|
|
88
|
+
color 150ms ease-in-out;
|
|
89
|
+
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: var(--button-hover-color);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:active {
|
|
95
|
+
background-color: var(--button-active-color, var(--button-hover-color));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:focus-visible {
|
|
99
|
+
outline: 2px solid var(--accent-color);
|
|
100
|
+
outline-offset: -2px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Selected row — a neutral filled highlight; libadwaita's AdwSidebar
|
|
104
|
+
// selection is a subtle fill with the normal foreground, not accent.
|
|
105
|
+
&.selected {
|
|
106
|
+
background-color: var(--button-active-color);
|
|
107
|
+
color: var(--window-fg-color);
|
|
108
|
+
|
|
109
|
+
&:hover,
|
|
110
|
+
&:active {
|
|
111
|
+
background-color: var(--button-active-color);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.adw-sidebar-item-icon {
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
|
|
119
|
+
&[hidden] {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.adw-sidebar-item-text {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
flex: 1 1 auto;
|
|
129
|
+
min-width: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.adw-sidebar-item-title {
|
|
133
|
+
font-size: var(--font-size-base);
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
text-overflow: ellipsis;
|
|
137
|
+
|
|
138
|
+
&[hidden] {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.adw-sidebar-item-subtitle {
|
|
144
|
+
font-size: var(--font-size-small);
|
|
145
|
+
opacity: var(--dim-opacity);
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
|
|
150
|
+
&[hidden] {
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// The trailing chevron is only drawn in page (boxed-list) mode.
|
|
156
|
+
.adw-sidebar-item-arrow {
|
|
157
|
+
flex-shrink: 0;
|
|
158
|
+
opacity: var(--dim-opacity);
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// --- Page mode (boxed lists) ---
|
|
163
|
+
// Sections become bordered, rounded cards (the AdwPreferencesGroup look) and
|
|
164
|
+
// each row gains its trailing chevron; selection no longer fills the row with
|
|
165
|
+
// the accent color, matching how the native widget drops the list selection
|
|
166
|
+
// in page mode.
|
|
167
|
+
&.page {
|
|
168
|
+
.adw-sidebar-list {
|
|
169
|
+
padding: var(--spacing-m);
|
|
170
|
+
gap: var(--spacing-xs);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.adw-sidebar-section {
|
|
174
|
+
border: 1px solid var(--card-shade-color);
|
|
175
|
+
border-radius: var(--card-radius, 12px);
|
|
176
|
+
background-color: var(--card-bg-color);
|
|
177
|
+
color: var(--card-fg-color);
|
|
178
|
+
overflow: hidden;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.adw-sidebar-section-header.has-title {
|
|
182
|
+
padding: var(--spacing-m) var(--spacing-xs) var(--spacing-xs);
|
|
183
|
+
|
|
184
|
+
&.first {
|
|
185
|
+
padding-top: var(--spacing-m);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.adw-sidebar-item {
|
|
190
|
+
margin: 0;
|
|
191
|
+
padding: var(--spacing-s) var(--spacing-m);
|
|
192
|
+
border-radius: 0;
|
|
193
|
+
border-bottom: 1px solid var(--card-shade-color);
|
|
194
|
+
|
|
195
|
+
&:last-child {
|
|
196
|
+
border-bottom: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.selected {
|
|
200
|
+
background-color: transparent;
|
|
201
|
+
color: var(--card-fg-color);
|
|
202
|
+
|
|
203
|
+
&:hover {
|
|
204
|
+
background-color: var(--button-hover-color);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.adw-sidebar-item-arrow {
|
|
210
|
+
display: inline-block;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
package/scss/_spin_row.scss
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// _spinner.scss — adw-spinner styling (ring with a spinning arc).
|
|
2
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_spinner.scss
|
|
3
|
+
// Reference: refs/libadwaita (Adw.Spinner)
|
|
4
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
5
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
6
|
+
|
|
7
|
+
adw-spinner {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
width: 24px;
|
|
11
|
+
height: 24px;
|
|
12
|
+
// Neutral arc (currentColor, theme-aware) over a faint track — Adw.Spinner
|
|
13
|
+
// is a neutral indicator, NOT accent-coloured.
|
|
14
|
+
border: 3px solid rgba(127, 127, 127, 0.25);
|
|
15
|
+
border-top-color: currentColor;
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
animation: adw-spinner-spin 0.8s linear infinite;
|
|
18
|
+
|
|
19
|
+
@media (prefers-reduced-motion: reduce) {
|
|
20
|
+
animation: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes adw-spinner-spin {
|
|
25
|
+
to {
|
|
26
|
+
transform: rotate(360deg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// _split_button.scss — adw-split-button styling: a primary action button fused
|
|
2
|
+
// with a dropdown that opens a menu of related actions, split by a thin divider.
|
|
3
|
+
// The suggested/destructive/flat style classes recolor the whole control like
|
|
4
|
+
// the matching Adwaita button variants.
|
|
5
|
+
// Reference: refs/libadwaita/src/adw-split-button.c (splitbutton CSS node)
|
|
6
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_split_button.scss
|
|
7
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
8
|
+
// Copyright (c) 2025 csm (adwaita-web). MIT License.
|
|
9
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
10
|
+
|
|
11
|
+
.adw-split-button {
|
|
12
|
+
position: relative;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: stretch;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
min-height: 34px;
|
|
18
|
+
border-radius: var(--button-radius);
|
|
19
|
+
background-color: var(--button-bg-color);
|
|
20
|
+
color: var(--window-fg-color);
|
|
21
|
+
font-family: var(--font-family);
|
|
22
|
+
font-size: var(--font-size-base);
|
|
23
|
+
user-select: none;
|
|
24
|
+
-webkit-user-select: none;
|
|
25
|
+
|
|
26
|
+
&:focus-within {
|
|
27
|
+
outline: 2px solid var(--accent-color);
|
|
28
|
+
outline-offset: 1px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Primary action half — fills the available width, rounded on the leading
|
|
32
|
+
// side only so it meets the dropdown flush.
|
|
33
|
+
.adw-split-button-action {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
gap: 6px;
|
|
39
|
+
flex-grow: 1;
|
|
40
|
+
min-height: 34px;
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 4px 14px;
|
|
43
|
+
border: none;
|
|
44
|
+
border-radius: var(--button-radius) 0 0 var(--button-radius);
|
|
45
|
+
background-color: transparent;
|
|
46
|
+
color: inherit;
|
|
47
|
+
font: inherit;
|
|
48
|
+
font-weight: 700;
|
|
49
|
+
line-height: 1;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
transition: background-color 0.1s ease;
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
background-color: var(--button-hover-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:active {
|
|
58
|
+
background-color: var(--button-active-color);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:focus,
|
|
62
|
+
&:focus-visible {
|
|
63
|
+
outline: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Icon-only action half — square, no horizontal text padding.
|
|
67
|
+
&.icon-only {
|
|
68
|
+
padding: 0;
|
|
69
|
+
width: 34px;
|
|
70
|
+
flex-grow: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Thin divider between the two halves (the splitbutton `separator` node).
|
|
75
|
+
.adw-split-button-dropdown {
|
|
76
|
+
position: relative;
|
|
77
|
+
box-sizing: border-box;
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
min-height: 34px;
|
|
82
|
+
width: 28px;
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0 var(--spacing-xs);
|
|
85
|
+
border: none;
|
|
86
|
+
border-left: 1px solid var(--separator-color);
|
|
87
|
+
border-radius: 0 var(--button-radius) var(--button-radius) 0;
|
|
88
|
+
background-color: transparent;
|
|
89
|
+
color: inherit;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
transition: background-color 0.1s ease;
|
|
92
|
+
|
|
93
|
+
.adw-icon {
|
|
94
|
+
width: 14px;
|
|
95
|
+
height: 14px;
|
|
96
|
+
mask-size: 14px;
|
|
97
|
+
-webkit-mask-size: 14px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:hover {
|
|
101
|
+
background-color: var(--button-hover-color);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:active {
|
|
105
|
+
background-color: var(--button-active-color);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:focus,
|
|
109
|
+
&:focus-visible {
|
|
110
|
+
outline: none;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// --- Dropdown menu (popover) ---
|
|
115
|
+
.adw-split-button-menu {
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: calc(100% + 4px);
|
|
118
|
+
right: 0;
|
|
119
|
+
z-index: 10;
|
|
120
|
+
display: flex;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
min-width: 160px;
|
|
123
|
+
padding: var(--spacing-xs);
|
|
124
|
+
border-radius: var(--button-radius);
|
|
125
|
+
background-color: var(--popover-bg-color, var(--window-bg-color, #fff));
|
|
126
|
+
color: var(--window-fg-color);
|
|
127
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--separator-color);
|
|
128
|
+
|
|
129
|
+
&[hidden] {
|
|
130
|
+
display: none;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.adw-split-button-menu-item {
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
width: 100%;
|
|
139
|
+
min-height: 32px;
|
|
140
|
+
margin: 0;
|
|
141
|
+
padding: var(--spacing-xs) var(--spacing-s);
|
|
142
|
+
border: none;
|
|
143
|
+
border-radius: calc(var(--button-radius) - 2px);
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
color: inherit;
|
|
146
|
+
font: inherit;
|
|
147
|
+
text-align: start;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
transition: background-color 0.1s ease;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
background-color: var(--button-hover-color);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:active {
|
|
156
|
+
background-color: var(--button-active-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:focus-visible {
|
|
160
|
+
outline: 2px solid var(--accent-color);
|
|
161
|
+
outline-offset: -2px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// --- Suggested action — accent-coloured whole control ---
|
|
166
|
+
&.suggested-action {
|
|
167
|
+
background-color: var(--accent-bg-color);
|
|
168
|
+
color: var(--accent-fg-color);
|
|
169
|
+
|
|
170
|
+
.adw-split-button-dropdown {
|
|
171
|
+
border-left-color: rgba(255, 255, 255, 0.3);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.adw-split-button-action:hover,
|
|
175
|
+
.adw-split-button-dropdown:hover {
|
|
176
|
+
background-color: var(--accent-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.adw-split-button-action:active,
|
|
180
|
+
.adw-split-button-dropdown:active {
|
|
181
|
+
background-color: var(--accent-color);
|
|
182
|
+
filter: brightness(0.92);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// --- Destructive action — red whole control ---
|
|
187
|
+
&.destructive-action {
|
|
188
|
+
background-color: var(--destructive-bg-color);
|
|
189
|
+
color: var(--destructive-fg-color);
|
|
190
|
+
|
|
191
|
+
.adw-split-button-dropdown {
|
|
192
|
+
border-left-color: rgba(255, 255, 255, 0.3);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.adw-split-button-action:hover,
|
|
196
|
+
.adw-split-button-dropdown:hover {
|
|
197
|
+
filter: brightness(1.06);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.adw-split-button-action:active,
|
|
201
|
+
.adw-split-button-dropdown:active {
|
|
202
|
+
filter: brightness(0.9);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// --- Flat — no resting background; only reacts on hover/active ---
|
|
207
|
+
&.flat {
|
|
208
|
+
background-color: transparent;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// --- Disabled ---
|
|
212
|
+
&.disabled {
|
|
213
|
+
opacity: 0.45;
|
|
214
|
+
cursor: default;
|
|
215
|
+
|
|
216
|
+
.adw-split-button-action,
|
|
217
|
+
.adw-split-button-dropdown {
|
|
218
|
+
cursor: default;
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// _status_page.scss — adw-status-page styling (centered empty state).
|
|
2
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_status_page.scss
|
|
3
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_status-page.scss
|
|
4
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
5
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
6
|
+
|
|
7
|
+
adw-status-page {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
text-align: center;
|
|
13
|
+
gap: var(--spacing-m);
|
|
14
|
+
padding: var(--spacing-xl);
|
|
15
|
+
color: var(--window-fg-color);
|
|
16
|
+
|
|
17
|
+
.adw-status-page-icon {
|
|
18
|
+
width: 96px;
|
|
19
|
+
height: 96px;
|
|
20
|
+
background-color: currentColor;
|
|
21
|
+
opacity: 0.45;
|
|
22
|
+
-webkit-mask-size: contain;
|
|
23
|
+
mask-size: contain;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.adw-status-page-title {
|
|
27
|
+
font-size: 18pt;
|
|
28
|
+
font-weight: 800;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.adw-status-page-description {
|
|
32
|
+
font-size: var(--font-size-base);
|
|
33
|
+
opacity: var(--dim-opacity);
|
|
34
|
+
max-width: 32ch;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.adw-status-page-child {
|
|
38
|
+
margin-top: var(--spacing-s);
|
|
39
|
+
}
|
|
40
|
+
}
|