@gjsify/adwaita-web 0.36.0 → 0.38.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/dist/adwaita-web.css +504 -34
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/accent.d.ts +28 -0
- package/lib/types/adw-accent.spec.d.ts +2 -0
- package/lib/types/adw-shortcut-label.spec.d.ts +2 -0
- package/lib/types/breakpoints.d.ts +10 -12
- package/lib/types/elements/adw-about-dialog.d.ts +19 -36
- package/lib/types/elements/adw-action-row.d.ts +9 -12
- package/lib/types/elements/adw-alert-dialog.d.ts +0 -12
- package/lib/types/elements/adw-avatar.d.ts +1 -0
- package/lib/types/elements/adw-bottom-sheet.d.ts +7 -12
- package/lib/types/elements/adw-button-content.d.ts +3 -4
- package/lib/types/elements/adw-button-row.d.ts +1 -1
- package/lib/types/elements/adw-carousel.d.ts +28 -49
- package/lib/types/elements/adw-checks.d.ts +2 -8
- package/lib/types/elements/adw-combo-row.d.ts +6 -6
- package/lib/types/elements/adw-data-grid.d.ts +5 -10
- package/lib/types/elements/adw-drop-down.d.ts +3 -11
- package/lib/types/elements/adw-entry-row.d.ts +20 -23
- package/lib/types/elements/adw-icon.d.ts +2 -4
- package/lib/types/elements/adw-inline-view-switcher.d.ts +18 -31
- package/lib/types/elements/adw-navigation-split-view.d.ts +7 -12
- package/lib/types/elements/adw-navigation-view.d.ts +2 -10
- package/lib/types/elements/adw-overlay-split-view.d.ts +28 -52
- package/lib/types/elements/adw-password-entry-row.d.ts +4 -5
- package/lib/types/elements/adw-popover.d.ts +2 -7
- package/lib/types/elements/adw-preferences-dialog.d.ts +21 -34
- package/lib/types/elements/adw-preferences-group.d.ts +12 -14
- package/lib/types/elements/adw-progress-bar.d.ts +3 -4
- package/lib/types/elements/adw-shortcut-label.d.ts +20 -0
- package/lib/types/elements/adw-sidebar.d.ts +5 -10
- package/lib/types/elements/adw-spinner.d.ts +3 -5
- package/lib/types/elements/adw-split-button.d.ts +6 -16
- package/lib/types/elements/adw-switch-row.d.ts +3 -3
- package/lib/types/elements/adw-tab-view.d.ts +16 -26
- package/lib/types/elements/adw-toast-overlay.d.ts +8 -13
- package/lib/types/elements/adw-view-stack.d.ts +7 -17
- package/lib/types/elements/adw-view-switcher-bar.d.ts +4 -8
- package/lib/types/elements/adw-view-switcher.d.ts +18 -38
- package/lib/types/elements/adw-wrap-box.d.ts +7 -17
- package/lib/types/elements/view-switcher-dom.d.ts +10 -13
- package/lib/types/index.d.ts +3 -0
- package/lib/types/source-view/hex.d.ts +7 -13
- package/lib/types/style-classes.spec.d.ts +11 -0
- package/lib/types/styles.generated.d.ts +1 -1
- package/package.json +18 -7
- package/scss/_about_dialog.scss +3 -2
- package/scss/_action_row.scss +33 -0
- package/scss/_avatar.scss +12 -0
- package/scss/_button.scss +44 -22
- package/scss/_card.scss +11 -8
- package/scss/_checks.scss +2 -4
- package/scss/_dialog.scss +3 -2
- package/scss/_headerbar.scss +23 -0
- package/scss/_popover.scss +8 -4
- package/scss/_preferences.scss +7 -7
- package/scss/_progress_bar.scss +9 -6
- package/scss/_reset.scss +1 -1
- package/scss/_shortcut_label.scss +80 -0
- package/scss/_sidebar.scss +57 -0
- package/scss/_status_page.scss +20 -0
- package/scss/_style_classes.scss +407 -0
- package/scss/_switch.scss +4 -3
- package/scss/_theme.scss +20 -2
- package/scss/_variables.scss +34 -1
- package/scss/adwaita-skin.scss +12 -0
- package/src/accent.ts +74 -0
- package/src/adw-about-dialog.spec.ts +34 -49
- package/src/adw-accent.spec.ts +105 -0
- package/src/adw-action-rows.spec.ts +25 -33
- package/src/adw-avatar.spec.ts +51 -20
- package/src/adw-banner.spec.ts +5 -8
- package/src/adw-button-content.spec.ts +9 -12
- package/src/adw-button-row.spec.ts +2 -4
- package/src/adw-carousel.spec.ts +40 -53
- package/src/adw-checks.spec.ts +36 -47
- package/src/adw-drop-down.spec.ts +25 -32
- package/src/adw-header-bar.spec.ts +5 -7
- package/src/adw-icon.spec.ts +23 -32
- package/src/adw-progress-bar.spec.ts +10 -12
- package/src/adw-row-state.spec.ts +9 -10
- package/src/adw-shortcut-label.spec.ts +112 -0
- package/src/adw-sidebar.spec.ts +17 -24
- package/src/adw-switch.spec.ts +11 -17
- package/src/adw-tab-view.spec.ts +7 -10
- package/src/adw-toast-overlay.spec.ts +7 -11
- package/src/adw-view-switcher-bar.spec.ts +10 -14
- package/src/adw-wrap-box.spec.ts +25 -36
- package/src/bottom-sheet.spec.ts +30 -36
- package/src/breakpoints.ts +15 -18
- package/src/chrome.spec.ts +13 -21
- package/src/elements/adw-about-dialog.ts +71 -114
- package/src/elements/adw-action-row.ts +22 -37
- package/src/elements/adw-alert-dialog.ts +25 -50
- package/src/elements/adw-avatar.ts +40 -15
- package/src/elements/adw-banner.ts +14 -18
- package/src/elements/adw-bottom-sheet.ts +31 -52
- package/src/elements/adw-button-content.ts +30 -37
- package/src/elements/adw-button-row.ts +14 -24
- package/src/elements/adw-carousel.ts +87 -148
- package/src/elements/adw-checks.ts +43 -56
- package/src/elements/adw-clamp.ts +8 -9
- package/src/elements/adw-combo-row.ts +17 -25
- package/src/elements/adw-data-grid.ts +26 -38
- package/src/elements/adw-dialog.ts +25 -56
- package/src/elements/adw-drop-down.ts +31 -51
- package/src/elements/adw-entry-row.ts +39 -46
- package/src/elements/adw-expander-row.ts +30 -53
- package/src/elements/adw-icon.ts +30 -53
- package/src/elements/adw-inline-view-switcher.ts +38 -67
- package/src/elements/adw-menu-button.ts +28 -58
- package/src/elements/adw-navigation-split-view.ts +35 -47
- package/src/elements/adw-navigation-view.ts +12 -28
- package/src/elements/adw-overlay-split-view.ts +100 -175
- package/src/elements/adw-password-entry-row.ts +18 -28
- package/src/elements/adw-popover.ts +28 -44
- package/src/elements/adw-preferences-dialog.ts +41 -66
- package/src/elements/adw-preferences-group.ts +33 -46
- package/src/elements/adw-progress-bar.ts +27 -47
- package/src/elements/adw-shortcut-label.ts +138 -0
- package/src/elements/adw-sidebar.ts +31 -39
- package/src/elements/adw-spin-row.ts +7 -14
- package/src/elements/adw-spinner.ts +31 -43
- package/src/elements/adw-split-button.ts +45 -75
- package/src/elements/adw-switch-row.ts +29 -46
- package/src/elements/adw-switch.ts +28 -47
- package/src/elements/adw-tab-view.ts +62 -103
- package/src/elements/adw-toast-overlay.ts +28 -35
- package/src/elements/adw-toggle-group.ts +9 -16
- package/src/elements/adw-view-stack.ts +32 -51
- package/src/elements/adw-view-switcher-bar.ts +26 -50
- package/src/elements/adw-view-switcher.ts +60 -110
- package/src/elements/adw-window-title.ts +4 -4
- package/src/elements/adw-wrap-box.ts +33 -59
- package/src/elements/view-switcher-dom.ts +15 -22
- package/src/entry-rows.spec.ts +18 -24
- package/src/index.ts +24 -15
- package/src/navigation-view.spec.ts +7 -10
- package/src/preferences-search.ts +11 -15
- package/src/preferences.spec.ts +13 -15
- package/src/source-view/adw-source-view.ts +6 -19
- package/src/source-view/hex.ts +7 -13
- package/src/split-button.spec.ts +32 -44
- package/src/split-views.spec.ts +83 -149
- package/src/style-classes.spec.ts +181 -0
- package/src/style-isolation.spec.ts +3 -6
- package/src/styles.generated.ts +1 -1
- package/src/tab-view.spec.ts +26 -35
- package/src/test.browser.mts +6 -0
- package/src/view-stack.spec.ts +23 -34
- package/src/view-switcher.spec.ts +56 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Adwaita/Libadwaita web components for browser targets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@codemirror/language": "^6.12.4",
|
|
42
42
|
"@codemirror/state": "^6.7.0",
|
|
43
43
|
"@codemirror/view": "^6.43.4",
|
|
44
|
-
"@gjsify/adwaita-core": "^0.
|
|
45
|
-
"@gjsify/adwaita-fonts": "^0.
|
|
46
|
-
"@gjsify/adwaita-icons": "^0.
|
|
44
|
+
"@gjsify/adwaita-core": "^0.38.0",
|
|
45
|
+
"@gjsify/adwaita-fonts": "^0.38.0",
|
|
46
|
+
"@gjsify/adwaita-icons": "^0.38.0",
|
|
47
47
|
"@lezer/highlight": "^1.2.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@gjsify/cli": "^0.
|
|
51
|
-
"@gjsify/unit": "^0.
|
|
50
|
+
"@gjsify/cli": "^0.38.0",
|
|
51
|
+
"@gjsify/unit": "^0.38.0",
|
|
52
52
|
"sass": "^1.101.0",
|
|
53
53
|
"typescript": "^6.0.3"
|
|
54
54
|
},
|
|
@@ -60,7 +60,18 @@
|
|
|
60
60
|
"browser": "polyfill",
|
|
61
61
|
"nativescript": "none"
|
|
62
62
|
},
|
|
63
|
-
"tier": 2
|
|
63
|
+
"tier": 2,
|
|
64
|
+
"nodeScript": {
|
|
65
|
+
"excludeGlobals": [
|
|
66
|
+
"document",
|
|
67
|
+
"HTMLElement",
|
|
68
|
+
"HTMLCanvasElement",
|
|
69
|
+
"Path2D",
|
|
70
|
+
"MutationObserver",
|
|
71
|
+
"navigator",
|
|
72
|
+
"process"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
64
75
|
},
|
|
65
76
|
"license": "MIT",
|
|
66
77
|
"repository": {
|
package/scss/_about_dialog.scss
CHANGED
|
@@ -89,8 +89,9 @@ adw-about-dialog {
|
|
|
89
89
|
min-height: 47px;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
// The close button — a flat circular button drawing a "×" glyph
|
|
93
|
-
//
|
|
92
|
+
// The close button — a flat circular button drawing a "×" glyph: the generated
|
|
93
|
+
// `.adw-icon--<name>` mask classes come from the ICONS map in scripts/build-scss.mjs,
|
|
94
|
+
// which has no window-close entry (the SVG itself does exist in @gjsify/adwaita-icons).
|
|
94
95
|
.adw-about-dialog-close {
|
|
95
96
|
width: 34px;
|
|
96
97
|
height: 34px;
|
package/scss/_action_row.scss
CHANGED
|
@@ -63,3 +63,36 @@ adw-action-row {
|
|
|
63
63
|
text-overflow: ellipsis;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
// `.property` SWAPS the emphasis of a row: the title becomes the small dimmed
|
|
68
|
+
// label and the subtitle carries the value at full weight — a read-only property
|
|
69
|
+
// rather than an action (style-classes.md "Property Rows", `_lists.scss:426-455`).
|
|
70
|
+
//
|
|
71
|
+
// It is written against the shared `.adw-row-title` / `.adw-row-subtitle` nodes,
|
|
72
|
+
// so it works on every row type that renders them (action, expander header,
|
|
73
|
+
// entry, switch), which is the same reach upstream gives it.
|
|
74
|
+
adw-action-row.property,
|
|
75
|
+
adw-expander-row.property {
|
|
76
|
+
.adw-row-title {
|
|
77
|
+
font-size: var(--font-size-small);
|
|
78
|
+
opacity: var(--dim-opacity);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.adw-row-subtitle {
|
|
82
|
+
font-size: var(--font-size-base);
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// `.monospace` on a property row monospaces the VALUE only — the label and any
|
|
87
|
+
// suffix widget stay in the UI font (`_lists.scss:445-455`). Put `.monospace`
|
|
88
|
+
// on the list instead to get all of it.
|
|
89
|
+
&.monospace {
|
|
90
|
+
font-family: inherit;
|
|
91
|
+
font-size: inherit;
|
|
92
|
+
|
|
93
|
+
.adw-row-subtitle {
|
|
94
|
+
font-family: var(--monospace-font-family);
|
|
95
|
+
font-size: var(--monospace-font-size);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
package/scss/_avatar.scss
CHANGED
|
@@ -28,4 +28,16 @@ adw-avatar {
|
|
|
28
28
|
-webkit-mask-size: contain;
|
|
29
29
|
mask-size: contain;
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
// `custom-image`. The avatar's own `border-radius: 50%` + `overflow: hidden`
|
|
33
|
+
// already clip it, so the image only has to FILL the box — `cover`, not
|
|
34
|
+
// `contain`, because GTK scales the paintable to the widget and crops inside a
|
|
35
|
+
// rounded clip, where `contain` would letterbox a non-square photo inside the
|
|
36
|
+
// circle.
|
|
37
|
+
.adw-avatar-custom-image {
|
|
38
|
+
display: block;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
object-fit: cover;
|
|
42
|
+
}
|
|
31
43
|
}
|
package/scss/_button.scss
CHANGED
|
@@ -112,34 +112,56 @@ adw-button {
|
|
|
112
112
|
padding: 6px 20px;
|
|
113
113
|
border-radius: 9999px;
|
|
114
114
|
}
|
|
115
|
-
}
|
|
116
115
|
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
//
|
|
116
|
+
// Raised — the documented opt-OUT of the automatic flat appearance a button
|
|
117
|
+
// gets inside a `.toolbar` or a header bar (style-classes.md "Raised"). It is
|
|
118
|
+
// the default look, stated explicitly, so it must also beat `.flat` when both
|
|
119
|
+
// are present, the way `_toolbars.scss` treats it.
|
|
120
|
+
&.raised {
|
|
121
|
+
background-color: var(--button-bg-color);
|
|
120
122
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
&:hover {
|
|
124
|
+
background-color: var(--button-hover-color);
|
|
125
|
+
}
|
|
124
126
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
&:active {
|
|
128
|
+
background-color: var(--button-active-color);
|
|
129
|
+
}
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
// OSD — a standalone button overlapping content (style-classes.md "OSD ›
|
|
133
|
+
// Overlay Buttons"). `_common.scss:44` excludes buttons from the generic OSD
|
|
134
|
+
// surface precisely so this can define what `.osd` means for one:
|
|
135
|
+
// `_buttons.scss:111-135` gives it a dark translucent background whose hover
|
|
136
|
+
// and active states mix TOWARDS the foreground rather than changing alpha, so
|
|
137
|
+
// it stays readable over any content. It composes with `.circular` / `.pill`.
|
|
138
|
+
&.osd {
|
|
139
|
+
min-height: 32px;
|
|
140
|
+
min-width: 32px;
|
|
141
|
+
color: rgb(255 255 255 / 90%);
|
|
142
|
+
background-color: rgb(0 0 0 / 65%);
|
|
143
|
+
|
|
144
|
+
@media (prefers-contrast: more) {
|
|
145
|
+
box-shadow: 0 0 0 1px currentColor;
|
|
146
|
+
}
|
|
135
147
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
148
|
+
&:hover {
|
|
149
|
+
color: #ffffff;
|
|
150
|
+
background-color: color-mix(in srgb, black calc(0.85 * 65%), currentColor calc(0.15 * 65%));
|
|
151
|
+
}
|
|
141
152
|
|
|
142
|
-
|
|
143
|
-
|
|
153
|
+
&:active {
|
|
154
|
+
color: #ffffff;
|
|
155
|
+
background-color: color-mix(in srgb, black calc(0.75 * 65%), currentColor calc(0.25 * 65%));
|
|
156
|
+
}
|
|
144
157
|
}
|
|
145
158
|
}
|
|
159
|
+
|
|
160
|
+
// The symbolic icon (`.adw-icon`) used to be declared here, because the first
|
|
161
|
+
// widget that needed one was the button. It is `scss/_icon.scss` now — every
|
|
162
|
+
// other widget needs one too, and `<adw-icon>` is an element.
|
|
163
|
+
|
|
164
|
+
// The linked group is `scss/_style_classes.scss` now, under libadwaita's own
|
|
165
|
+
// `.linked` name (with `.adw-linked` kept as an alias): the documented class is
|
|
166
|
+
// what a consumer reading style-classes.md reaches for, and it applies to
|
|
167
|
+
// entries and drop-downs too, not only to buttons.
|
package/scss/_card.scss
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
// _card.scss — adw-card styling.
|
|
2
|
+
//
|
|
3
|
+
// The card SURFACE (colours, radius, elevation) is `%card` in
|
|
4
|
+
// `_style_classes.scss`, shared with the documented `.card` class and with
|
|
5
|
+
// `.boxed-list`; this element adds only what makes it an element: a block box
|
|
6
|
+
// and the padding a bare `.card` deliberately does not have.
|
|
7
|
+
//
|
|
2
8
|
// Reference: refs/adwaita-web/adwaita-web/scss/_card.scss
|
|
3
|
-
// Reference: refs/libadwaita/src/stylesheet/widgets/_misc.scss
|
|
9
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_misc.scss:197-236
|
|
4
10
|
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
5
11
|
// Copyright (c) 2025 csm (adwaita-web). MIT License.
|
|
6
12
|
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
7
13
|
|
|
14
|
+
@use 'style_classes';
|
|
15
|
+
|
|
8
16
|
adw-card,
|
|
9
17
|
.adw-card {
|
|
18
|
+
@extend %card;
|
|
19
|
+
|
|
10
20
|
display: block;
|
|
11
|
-
background-color: var(--card-bg-color);
|
|
12
|
-
color: var(--card-fg-color);
|
|
13
|
-
border-radius: var(--card-radius);
|
|
14
21
|
padding: var(--spacing-l);
|
|
15
|
-
box-shadow:
|
|
16
|
-
0 0 0 1px rgb(0 0 6 / 3%),
|
|
17
|
-
0 1px 3px 1px rgb(0 0 6 / 7%),
|
|
18
|
-
0 2px 6px 2px rgb(0 0 6 / 3%);
|
|
19
22
|
overflow: hidden;
|
|
20
23
|
}
|
package/scss/_checks.scss
CHANGED
|
@@ -161,12 +161,10 @@ adw-radio {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
// `&:disabled { filter: Opacity(var(--disabled-opacity)) }` (:62-64).
|
|
165
|
-
// package defines no `--disabled-opacity`, so `--dim-opacity` stands in — the
|
|
166
|
-
// same substitution `_switch.scss` documents.
|
|
164
|
+
// `&:disabled { filter: Opacity(var(--disabled-opacity)) }` (:62-64).
|
|
167
165
|
&[disabled] {
|
|
168
166
|
cursor: not-allowed;
|
|
169
|
-
opacity: var(--
|
|
167
|
+
opacity: var(--disabled-opacity);
|
|
170
168
|
}
|
|
171
169
|
|
|
172
170
|
// `@include focus-ring()` on `checkbutton` (:8). The ring follows the real
|
package/scss/_dialog.scss
CHANGED
|
@@ -108,8 +108,9 @@ adw-dialog {
|
|
|
108
108
|
padding: 0 6px;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
// Round flat close button drawing a CSS "×" glyph
|
|
112
|
-
//
|
|
111
|
+
// Round flat close button drawing a CSS "×" glyph: `windowCloseSymbolic` exists in
|
|
112
|
+
// @gjsify/adwaita-icons, but the generated `.adw-icon--<name>` mask classes come from
|
|
113
|
+
// the ICONS map in scripts/build-scss.mjs, which has no window-close entry.
|
|
113
114
|
.adw-dialog-close {
|
|
114
115
|
appearance: none;
|
|
115
116
|
border: none;
|
package/scss/_headerbar.scss
CHANGED
|
@@ -76,3 +76,26 @@ adw-header-bar {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
// `.devel` on the WINDOW gives every header bar inside it a striped background —
|
|
81
|
+
// the marker for a nightly or unstable build (style-classes.md "Development
|
|
82
|
+
// Window", `_toolbars.scss:345-354`).
|
|
83
|
+
//
|
|
84
|
+
// Upstream cross-fades a 5% recoloured SVG (`assets/devel-stripes.svg`) and
|
|
85
|
+
// masks it so it fades out downwards. The stripe geometry is read off that
|
|
86
|
+
// asset: a 64px tile, 32px of stripe per period, leaning left as it descends.
|
|
87
|
+
//
|
|
88
|
+
// The fade is the top LAYER here rather than a mask: `mask-image` on the bar
|
|
89
|
+
// would fade its title and buttons with the stripes, and a masked pseudo-element
|
|
90
|
+
// would paint over them. Washing the stripes out with the bar's own opaque
|
|
91
|
+
// background colour renders identically and leaves the content alone.
|
|
92
|
+
.devel adw-header-bar,
|
|
93
|
+
adw-window.devel adw-header-bar {
|
|
94
|
+
background-image:
|
|
95
|
+
linear-gradient(to bottom, transparent 0%, var(--headerbar-bg-color) 100%),
|
|
96
|
+
repeating-linear-gradient(
|
|
97
|
+
116.565deg,
|
|
98
|
+
color-mix(in srgb, currentColor 5%, transparent) 0 32px,
|
|
99
|
+
transparent 32px 64px
|
|
100
|
+
);
|
|
101
|
+
}
|
package/scss/_popover.scss
CHANGED
|
@@ -74,7 +74,13 @@ adw-popover {
|
|
|
74
74
|
|
|
75
75
|
// `popover.menu > contents { padding: 0 }` + `$menu_margin` on the item box
|
|
76
76
|
// (_menus.scss:58-66), flattened onto the single surface node.
|
|
77
|
-
|
|
77
|
+
//
|
|
78
|
+
// `[menu]` is the attribute the element sets; `.menu` is the name libadwaita
|
|
79
|
+
// DOCUMENTS for the same thing (style-classes.md "Menu Popovers"). Both are
|
|
80
|
+
// accepted, because a consumer following the upstream documentation reaches
|
|
81
|
+
// for the class and would otherwise get an 8px inset and no explanation.
|
|
82
|
+
&[menu],
|
|
83
|
+
&.menu {
|
|
78
84
|
padding: 6px;
|
|
79
85
|
}
|
|
80
86
|
|
|
@@ -165,9 +171,7 @@ adw-popover {
|
|
|
165
171
|
}
|
|
166
172
|
|
|
167
173
|
&[disabled] {
|
|
168
|
-
|
|
169
|
-
// 50%); this port does not define it yet, so the fallback carries the value.
|
|
170
|
-
opacity: var(--disabled-opacity, 0.5);
|
|
174
|
+
opacity: var(--disabled-opacity);
|
|
171
175
|
pointer-events: none;
|
|
172
176
|
}
|
|
173
177
|
}
|
package/scss/_preferences.scss
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
// Copyright (c) 2025 csm (adwaita-web). MIT License.
|
|
6
6
|
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
7
7
|
|
|
8
|
+
@use 'style_classes';
|
|
9
|
+
|
|
8
10
|
adw-preferences-group {
|
|
9
11
|
display: block;
|
|
10
12
|
|
|
@@ -74,14 +76,12 @@ adw-preferences-group {
|
|
|
74
76
|
color: var(--window-fg-color);
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
// A preferences group's list IS a boxed list — same card surface, same clip
|
|
80
|
+
// for the rounding of the first and last row. It used to carry its own copy of
|
|
81
|
+
// the five card declarations.
|
|
77
82
|
.adw-preferences-group-listbox {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
border-radius: var(--card-radius);
|
|
81
|
-
box-shadow:
|
|
82
|
-
0 0 0 1px rgb(0 0 6 / 3%),
|
|
83
|
-
0 1px 3px 1px rgb(0 0 6 / 7%),
|
|
84
|
-
0 2px 6px 2px rgb(0 0 6 / 3%);
|
|
83
|
+
@extend %card;
|
|
84
|
+
|
|
85
85
|
overflow: hidden;
|
|
86
86
|
}
|
|
87
87
|
}
|
package/scss/_progress_bar.scss
CHANGED
|
@@ -84,11 +84,9 @@ adw-progress-bar {
|
|
|
84
84
|
font-size: smaller;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
// `&:disabled { filter: Opacity(var(--disabled-opacity)) }` (:23-25).
|
|
88
|
-
// package defines no `--disabled-opacity`, so `--dim-opacity` stands in — the
|
|
89
|
-
// same substitution `_switch.scss` documents, not a fourth invented token.
|
|
87
|
+
// `&:disabled { filter: Opacity(var(--disabled-opacity)) }` (:23-25).
|
|
90
88
|
&[disabled] {
|
|
91
|
-
opacity: var(--
|
|
89
|
+
opacity: var(--disabled-opacity);
|
|
92
90
|
}
|
|
93
91
|
|
|
94
92
|
// Fill from the far end. GTK spells this `:inverted`; flexbox handles the
|
|
@@ -104,8 +102,13 @@ adw-progress-bar {
|
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
// The `.osd` variant (:59-83): a hairline bar with no trough at all, the way
|
|
107
|
-
// it is drawn under a header bar.
|
|
108
|
-
|
|
105
|
+
// it is drawn under a header bar. `[osd]` is the attribute this element takes;
|
|
106
|
+
// `.osd` is libadwaita's DOCUMENTED spelling for the same variant, and
|
|
107
|
+
// `_style_classes.scss` excludes `adw-progress-bar` from the generic OSD
|
|
108
|
+
// surface exactly so the class lands here instead of turning the bar into a
|
|
109
|
+
// dark translucent box.
|
|
110
|
+
&[osd],
|
|
111
|
+
&.osd {
|
|
109
112
|
min-width: 2px;
|
|
110
113
|
|
|
111
114
|
.adw-progress-bar-trough {
|
package/scss/_reset.scss
CHANGED
|
@@ -39,7 +39,7 @@ $adw-components:
|
|
|
39
39
|
adw-navigation-split-view, adw-navigation-view, adw-overlay-split-view,
|
|
40
40
|
adw-password-entry-row, adw-popover, adw-preferences-dialog,
|
|
41
41
|
adw-preferences-group, adw-preferences-page, adw-progress-bar, adw-radio,
|
|
42
|
-
adw-sidebar, adw-sidebar-item,
|
|
42
|
+
adw-shortcut-label, adw-sidebar, adw-sidebar-item,
|
|
43
43
|
adw-sidebar-section, adw-source-view, adw-spinner, adw-spin-row,
|
|
44
44
|
adw-split-button, adw-status-page, adw-switch, adw-switch-row,
|
|
45
45
|
adw-tab-page, adw-tab-view, adw-toast-overlay, adw-toggle, adw-toggle-group,
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// _shortcut_label.scss — <adw-shortcut-label> and its keycaps.
|
|
2
|
+
//
|
|
3
|
+
// TWO SOURCES, AND WHY ONLY ONE IS FOLLOWED. libadwaita styles the widget in
|
|
4
|
+
// `_shortcuts-dialog.scss:33-58`: a 6px `border-spacing` at both levels (between
|
|
5
|
+
// the boxes AND between the keycaps inside one), keycaps filled with 10% of the
|
|
6
|
+
// current colour, an inset bottom shadow that reads as a key's edge, a 6px
|
|
7
|
+
// radius, 6px padding and a 20px minimum width — plus `> .dimmed { padding: 6px
|
|
8
|
+
// 0 }` so a separator lines up with the caps beside it.
|
|
9
|
+
//
|
|
10
|
+
// `refs/adwaita-web/adwaita-web/scss/_shortcut_label.scss` styles ONE outlined
|
|
11
|
+
// tag for the whole shortcut: monospace, a border, small text, and an empty
|
|
12
|
+
// `kbd, .keycap {}` block with a comment saying the real thing has per-keycap
|
|
13
|
+
// styling. It is a placeholder for this widget, not a port of it, so nothing is
|
|
14
|
+
// taken from it — the geometry above is libadwaita's.
|
|
15
|
+
//
|
|
16
|
+
// The keycap fill is `currentColor`-relative, so a shortcut label inside a
|
|
17
|
+
// dimmed or coloured context stays legible without a second token.
|
|
18
|
+
//
|
|
19
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_shortcuts-dialog.scss:33-58
|
|
20
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_shortcut_label.scss (NOT followed — see above)
|
|
21
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
22
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components; GTK's
|
|
23
|
+
// `border-spacing` on a box becomes flex `gap`.
|
|
24
|
+
|
|
25
|
+
adw-shortcut-label {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 6px;
|
|
29
|
+
border-radius: 6px;
|
|
30
|
+
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
outline: 2px solid var(--accent-color);
|
|
33
|
+
outline-offset: 1px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// One combination — the keycaps of a single accelerator. Its own 6px gap is
|
|
37
|
+
// the second `border-spacing` in `&, > box { border-spacing: 6px }` (:37-39).
|
|
38
|
+
.adw-shortcut-label-keys {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 6px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.keycap {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
min-width: 20px;
|
|
50
|
+
padding: 6px;
|
|
51
|
+
border-radius: 6px;
|
|
52
|
+
background: color-mix(in srgb, currentColor 10%, transparent);
|
|
53
|
+
box-shadow: inset 0 -2px var(--card-shade-color);
|
|
54
|
+
|
|
55
|
+
@media (prefers-contrast: more) {
|
|
56
|
+
box-shadow:
|
|
57
|
+
inset 0 -2px var(--card-shade-color),
|
|
58
|
+
0 0 0 1px var(--border-color);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// The `L` / `R` of a sided modifier key — `%s <small><b>%s</b></small>` in the
|
|
63
|
+
// C (adw-shortcut-label.c:195), i.e. smaller and bold, riding along inside the
|
|
64
|
+
// same keycap rather than being a cap of its own.
|
|
65
|
+
.adw-shortcut-label-side {
|
|
66
|
+
margin-inline-start: 2px;
|
|
67
|
+
font-size: 82%;
|
|
68
|
+
font-weight: 700;
|
|
69
|
+
// `<sub>` lowers the baseline by default; the marker is part of the key's
|
|
70
|
+
// label, not a subscript of a formula.
|
|
71
|
+
vertical-align: baseline;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// `> .dimmed { padding: 6px 0 }` (:55-57) — the separators and the
|
|
76
|
+
// disabled-text placeholder, aligned with the keycaps' text.
|
|
77
|
+
> .dimmed {
|
|
78
|
+
padding: 6px 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
package/scss/_sidebar.scss
CHANGED
|
@@ -218,3 +218,60 @@ adw-sidebar {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
+
|
|
222
|
+
// `.navigation-sidebar` — the documented class a consumer puts on its OWN list
|
|
223
|
+
// to get the sidebar look without `<adw-sidebar>`: transparent background,
|
|
224
|
+
// rounded and padded items, and a NEUTRAL selection instead of an accent one
|
|
225
|
+
// (style-classes.md "Sidebars", `_sidebars.scss:113-205`).
|
|
226
|
+
//
|
|
227
|
+
// `<adw-sidebar>` renders the same look from its own structure classes above; it
|
|
228
|
+
// is not rewritten in terms of this class, because its rows carry an icon,
|
|
229
|
+
// title, subtitle and arrow that a bare list does not have. What IS shared is
|
|
230
|
+
// the metric: `$menu_margin` (6px) around the list and on each row, and
|
|
231
|
+
// `$button_radius` corners.
|
|
232
|
+
.navigation-sidebar {
|
|
233
|
+
&,
|
|
234
|
+
&.view,
|
|
235
|
+
&.view:disabled {
|
|
236
|
+
background-color: transparent;
|
|
237
|
+
color: inherit;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&.background {
|
|
241
|
+
background-color: var(--window-bg-color);
|
|
242
|
+
color: var(--window-fg-color);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
padding-top: var(--spacing-xs);
|
|
246
|
+
// 6px minus the last row's own 2px margin, upstream's `$menu_margin - 2px`.
|
|
247
|
+
padding-bottom: 4px;
|
|
248
|
+
|
|
249
|
+
> * {
|
|
250
|
+
margin: 0 var(--spacing-xs) 2px;
|
|
251
|
+
padding: 3px 14px;
|
|
252
|
+
border-radius: var(--button-radius);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
> .activatable {
|
|
256
|
+
&:hover {
|
|
257
|
+
background-color: color-mix(in srgb, currentColor 7%, transparent);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&:active {
|
|
261
|
+
background-color: color-mix(in srgb, currentColor 16%, transparent);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
> [aria-selected='true'],
|
|
266
|
+
> .selected {
|
|
267
|
+
background-color: color-mix(in srgb, currentColor 10%, transparent);
|
|
268
|
+
|
|
269
|
+
&:hover {
|
|
270
|
+
background-color: color-mix(in srgb, currentColor 13%, transparent);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&:active {
|
|
274
|
+
background-color: color-mix(in srgb, currentColor 19%, transparent);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
package/scss/_status_page.scss
CHANGED
|
@@ -37,4 +37,24 @@ adw-status-page {
|
|
|
37
37
|
.adw-status-page-child {
|
|
38
38
|
margin-top: var(--spacing-s);
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
// `.compact` — the documented smaller status page, for a sidebar or a popover
|
|
42
|
+
// (style-classes.md "Compact Status Page"). Upstream drops the outer margins
|
|
43
|
+
// 36px → 24px, the icon 128px → 96px and the title from `.title-1` to
|
|
44
|
+
// `.title-2` (`_misc.scss:154-172`); this port's resting icon is already 96px
|
|
45
|
+
// because it renders at the size the vendored web port used, so `.compact`
|
|
46
|
+
// steps down from there in the same proportion.
|
|
47
|
+
&.compact {
|
|
48
|
+
gap: var(--spacing-s);
|
|
49
|
+
padding: var(--spacing-m);
|
|
50
|
+
|
|
51
|
+
.adw-status-page-icon {
|
|
52
|
+
width: 72px;
|
|
53
|
+
height: 72px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.adw-status-page-title {
|
|
57
|
+
font-size: 14pt;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
40
60
|
}
|