@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,193 @@
|
|
|
1
|
+
// _tab_view.scss — adw-tab-view styling (a dynamic tabbed container with a tab
|
|
2
|
+
// bar header; one page visible at a time). The bar is a headerbar-colored strip
|
|
3
|
+
// of rounded chips; the selected chip is raised onto the view background, the
|
|
4
|
+
// way libadwaita draws AdwTabBar over an AdwTabView.
|
|
5
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_tab-view.scss (tabbar/tabbox/tab)
|
|
6
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_tabs.scss
|
|
7
|
+
// Copyright (c) 2020-2022 Purism SPC / 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-tab-view {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
background-color: var(--window-bg-color);
|
|
17
|
+
color: var(--window-fg-color);
|
|
18
|
+
|
|
19
|
+
// --- Tab bar (the AdwTabBar strip) ---
|
|
20
|
+
.adw-tab-bar {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: flex-end;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
padding: 0 var(--spacing-xs);
|
|
26
|
+
background-color: var(--headerbar-bg-color);
|
|
27
|
+
color: var(--headerbar-fg-color);
|
|
28
|
+
// libadwaita's inset bottom shade under the bar.
|
|
29
|
+
box-shadow: inset 0 -1px var(--headerbar-shade-color);
|
|
30
|
+
overflow-x: auto;
|
|
31
|
+
scrollbar-width: thin;
|
|
32
|
+
|
|
33
|
+
&[hidden] {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.adw-tab-box {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: stretch;
|
|
41
|
+
gap: var(--spacing-xs);
|
|
42
|
+
padding: var(--spacing-xs) 0;
|
|
43
|
+
min-height: 34px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// --- A single tab chip ---
|
|
47
|
+
.adw-tab {
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--spacing-xs);
|
|
52
|
+
max-width: 200px;
|
|
53
|
+
min-height: 26px;
|
|
54
|
+
margin: 0;
|
|
55
|
+
padding: 4px var(--spacing-s);
|
|
56
|
+
border: none;
|
|
57
|
+
border-radius: var(--button-radius);
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
color: var(--headerbar-fg-color);
|
|
60
|
+
font-family: var(--font-family);
|
|
61
|
+
font-size: var(--font-size-base);
|
|
62
|
+
font-weight: 700;
|
|
63
|
+
line-height: 1;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
user-select: none;
|
|
66
|
+
-webkit-user-select: none;
|
|
67
|
+
transition:
|
|
68
|
+
background-color 150ms ease-in-out,
|
|
69
|
+
color 150ms ease-in-out,
|
|
70
|
+
box-shadow 150ms ease-in-out;
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
background-color: var(--button-hover-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:active {
|
|
77
|
+
background-color: var(--button-active-color, var(--button-hover-color));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:focus-visible {
|
|
81
|
+
outline: 2px solid var(--accent-color);
|
|
82
|
+
outline-offset: -1px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// The selected tab — a raised chip on the view background, the way
|
|
86
|
+
// libadwaita lifts the active tab off the bar.
|
|
87
|
+
&.active {
|
|
88
|
+
background-color: var(--view-bg-color);
|
|
89
|
+
color: var(--view-fg-color);
|
|
90
|
+
box-shadow:
|
|
91
|
+
0 1px 3px 1px rgba(0, 0, 6, 0.07),
|
|
92
|
+
0 2px 6px 2px rgba(0, 0, 6, 0.03);
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: var(--view-bg-color);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.adw-tab-title {
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
text-overflow: ellipsis;
|
|
104
|
+
min-width: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// --- Close affordance (CSS-drawn "×", no symbolic icon ships) ---
|
|
108
|
+
.adw-tab-close {
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
flex-shrink: 0;
|
|
111
|
+
position: relative;
|
|
112
|
+
width: 18px;
|
|
113
|
+
height: 18px;
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 0;
|
|
116
|
+
border: none;
|
|
117
|
+
border-radius: 9999px;
|
|
118
|
+
background-color: transparent;
|
|
119
|
+
color: inherit;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
opacity: 0.7;
|
|
122
|
+
transition:
|
|
123
|
+
background-color 150ms ease-in-out,
|
|
124
|
+
opacity 150ms ease-in-out;
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
opacity: 1;
|
|
128
|
+
background-color: var(--button-hover-color);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:focus-visible {
|
|
132
|
+
outline: 2px solid var(--accent-color);
|
|
133
|
+
outline-offset: 1px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&::before,
|
|
137
|
+
&::after {
|
|
138
|
+
content: '';
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: 50%;
|
|
141
|
+
left: 50%;
|
|
142
|
+
width: 9px;
|
|
143
|
+
height: 1.5px;
|
|
144
|
+
background-color: currentColor;
|
|
145
|
+
border-radius: 1px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&::before {
|
|
149
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&::after {
|
|
153
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Single-tab bars dim the close affordance (libadwaita keeps a lone tab
|
|
158
|
+
// non-interactive-looking).
|
|
159
|
+
.adw-tab-bar.single-tab .adw-tab {
|
|
160
|
+
&,
|
|
161
|
+
&:hover,
|
|
162
|
+
&:active {
|
|
163
|
+
background: none;
|
|
164
|
+
box-shadow: none;
|
|
165
|
+
color: var(--headerbar-fg-color);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// --- Pages (the AdwTabView content area) ---
|
|
170
|
+
.adw-tab-view-pages {
|
|
171
|
+
flex: 1 1 auto;
|
|
172
|
+
position: relative;
|
|
173
|
+
box-sizing: border-box;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
background-color: var(--view-bg-color);
|
|
176
|
+
color: var(--view-fg-color);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.adw-tab-page {
|
|
180
|
+
box-sizing: border-box;
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 100%;
|
|
183
|
+
overflow: auto;
|
|
184
|
+
|
|
185
|
+
&[hidden] {
|
|
186
|
+
display: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&.active-page {
|
|
190
|
+
display: block;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
package/scss/_theme.scss
CHANGED
|
@@ -12,13 +12,25 @@
|
|
|
12
12
|
--headerbar-bg-color: #2e2e32;
|
|
13
13
|
--headerbar-fg-color: #ffffff;
|
|
14
14
|
--headerbar-shade-color: rgba(0, 0, 6, 0.36);
|
|
15
|
+
--separator-color: rgba(255, 255, 255, 0.08);
|
|
15
16
|
--sidebar-bg-color: #2e2e32;
|
|
16
17
|
--card-bg-color: rgba(255, 255, 255, 0.08);
|
|
17
18
|
--card-fg-color: #ffffff;
|
|
18
19
|
--card-shade-color: rgba(0, 0, 6, 0.36);
|
|
19
20
|
--accent-color: #78aeed;
|
|
21
|
+
--button-bg-color: rgba(255, 255, 255, 0.1);
|
|
22
|
+
--button-hover-color: rgba(255, 255, 255, 0.15);
|
|
23
|
+
--button-active-color: rgba(255, 255, 255, 0.22);
|
|
24
|
+
--entry-bg-color: rgba(255, 255, 255, 0.06);
|
|
25
|
+
--entry-border-color: rgba(255, 255, 255, 0.16);
|
|
26
|
+
--entry-border-hover-color: rgba(255, 255, 255, 0.26);
|
|
27
|
+
--destructive-bg-color: #c01c28;
|
|
28
|
+
--destructive-fg-color: #ffffff;
|
|
20
29
|
--switch-off-bg: rgba(255, 255, 255, 0.2);
|
|
21
30
|
--switch-knob-bg: #deddda;
|
|
31
|
+
// The active toggle is a raised near-white chip in both themes, so its text
|
|
32
|
+
// must be dark in dark mode (the default token is the light window-fg).
|
|
33
|
+
--active-toggle-fg-color: rgba(0, 0, 6, 0.8);
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
// Auto dark theme via prefers-color-scheme — opt out with .theme-light
|
package/scss/_toast.scss
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// _toast.scss — adw-toast and adw-toast-overlay styling.
|
|
2
|
+
// adw-toast-overlay wraps content and layers transient `.adw-toast` banners over
|
|
3
|
+
// the bottom of its own bounds (the Adw.ToastOverlay model). Each banner carries
|
|
4
|
+
// a title, an optional action button and a CSS-drawn "×" close button, and slides
|
|
5
|
+
// up on show / down on dismiss (mirroring Adw.Toast).
|
|
2
6
|
// Reference: refs/adwaita-web/adwaita-web/scss/_toast.scss
|
|
3
7
|
// Reference: refs/adwaita-web/adwaita-web/scss/_toast_overlay.scss
|
|
4
8
|
// Reference: refs/libadwaita/src/stylesheet/widgets/_toast.scss
|
|
@@ -7,27 +11,40 @@
|
|
|
7
11
|
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
8
12
|
|
|
9
13
|
adw-toast-overlay {
|
|
10
|
-
position:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
position: relative;
|
|
15
|
+
display: block;
|
|
16
|
+
|
|
17
|
+
// The wrapped content (Adw.ToastOverlay :child) occupies the overlay's box.
|
|
18
|
+
.adw-toast-overlay-content {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Toasts are layered over the bottom edge of the overlay, stacked newest-last
|
|
24
|
+
// and centered, the way AdwToastOverlay floats them above its child.
|
|
25
|
+
.adw-toast-overlay-toasts {
|
|
26
|
+
position: absolute;
|
|
27
|
+
bottom: var(--spacing-m);
|
|
28
|
+
left: 50%;
|
|
29
|
+
transform: translateX(-50%);
|
|
30
|
+
z-index: 9999;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column-reverse;
|
|
33
|
+
gap: var(--spacing-s);
|
|
34
|
+
align-items: center;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
20
37
|
}
|
|
21
38
|
|
|
22
39
|
.adw-toast {
|
|
23
40
|
background-color: #3d3846;
|
|
24
41
|
color: #ffffff;
|
|
25
|
-
padding:
|
|
42
|
+
padding: var(--spacing-s) var(--spacing-m);
|
|
26
43
|
border-radius: var(--card-radius);
|
|
27
44
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
28
45
|
display: flex;
|
|
29
46
|
align-items: center;
|
|
30
|
-
gap:
|
|
47
|
+
gap: var(--spacing-s);
|
|
31
48
|
width: max-content;
|
|
32
49
|
max-width: 400px;
|
|
33
50
|
min-height: 36px;
|
|
@@ -53,8 +70,101 @@ adw-toast-overlay {
|
|
|
53
70
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
54
71
|
}
|
|
55
72
|
|
|
73
|
+
.adw-toast-content-wrapper {
|
|
74
|
+
flex: 1 1 auto;
|
|
75
|
+
min-width: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
56
78
|
.adw-toast-title {
|
|
57
79
|
font-weight: normal;
|
|
58
80
|
line-height: 1.3;
|
|
81
|
+
display: -webkit-box;
|
|
82
|
+
-webkit-line-clamp: 2;
|
|
83
|
+
-webkit-box-orient: vertical;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
text-overflow: ellipsis;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Action button — a flat pill tinted with the accent color so it reads as
|
|
89
|
+
// suggested against the dark toast surface (Adw.Toast:button-label).
|
|
90
|
+
.adw-toast-action-button {
|
|
91
|
+
flex-shrink: 0;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
margin: 0;
|
|
94
|
+
padding: 4px var(--spacing-m);
|
|
95
|
+
border: none;
|
|
96
|
+
border-radius: var(--button-radius);
|
|
97
|
+
background-color: rgba(255, 255, 255, 0.12);
|
|
98
|
+
color: #ffffff;
|
|
99
|
+
font-family: inherit;
|
|
100
|
+
font-size: var(--font-size-base);
|
|
101
|
+
font-weight: 700;
|
|
102
|
+
line-height: 1;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
transition: background-color 150ms ease-in-out;
|
|
105
|
+
|
|
106
|
+
&:hover {
|
|
107
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:active {
|
|
111
|
+
background-color: rgba(255, 255, 255, 0.26);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:focus-visible {
|
|
115
|
+
outline: 2px solid var(--accent-color);
|
|
116
|
+
outline-offset: 1px;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Close affordance — a CSS-drawn "×" (mirrors adw-tab-view's .adw-tab-close;
|
|
121
|
+
// no symbolic close icon ships in the curated adwaita-web icon set).
|
|
122
|
+
.adw-toast-close-button {
|
|
123
|
+
box-sizing: border-box;
|
|
124
|
+
flex-shrink: 0;
|
|
125
|
+
position: relative;
|
|
126
|
+
width: 24px;
|
|
127
|
+
height: 24px;
|
|
128
|
+
margin: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
border: none;
|
|
131
|
+
border-radius: 9999px;
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #ffffff;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
opacity: 0.7;
|
|
136
|
+
transition:
|
|
137
|
+
background-color 150ms ease-in-out,
|
|
138
|
+
opacity 150ms ease-in-out;
|
|
139
|
+
|
|
140
|
+
&:hover {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
background-color: rgba(255, 255, 255, 0.12);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:focus-visible {
|
|
146
|
+
outline: 2px solid var(--accent-color);
|
|
147
|
+
outline-offset: 1px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&::before,
|
|
151
|
+
&::after {
|
|
152
|
+
content: '';
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 50%;
|
|
155
|
+
left: 50%;
|
|
156
|
+
width: 11px;
|
|
157
|
+
height: 1.5px;
|
|
158
|
+
background-color: currentColor;
|
|
159
|
+
border-radius: 1px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&::before {
|
|
163
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&::after {
|
|
167
|
+
transform: translate(-50%, -50%) rotate(-45deg);
|
|
168
|
+
}
|
|
59
169
|
}
|
|
60
170
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// _toggle_group.scss — adw-toggle-group styling (a linked set of toggle buttons
|
|
2
|
+
// with a single active item, recolored with the Adwaita active-toggle accent).
|
|
3
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_toggle-group.scss (AdwToggleGroup)
|
|
4
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_toggle_group.scss
|
|
5
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
6
|
+
// Copyright (c) 2025 csm (adwaita-web). MIT License.
|
|
7
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
8
|
+
|
|
9
|
+
// The active toggle uses a white-on-fg "raised" chip. These tokens default to
|
|
10
|
+
// libadwaita's light-theme values; _theme.scss overrides them for dark.
|
|
11
|
+
:root {
|
|
12
|
+
--active-toggle-bg-color: #ffffff;
|
|
13
|
+
--active-toggle-fg-color: var(--window-fg-color);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
adw-toggle-group {
|
|
17
|
+
// libadwaita's ---group-padding: a small inset so the active chip floats
|
|
18
|
+
// inside the group's pill, leaving a hairline of group background around it.
|
|
19
|
+
--group-padding: 3px;
|
|
20
|
+
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
padding: var(--group-padding);
|
|
24
|
+
border-radius: var(--button-radius);
|
|
25
|
+
background-color: var(--button-bg-color);
|
|
26
|
+
|
|
27
|
+
.adw-toggle-group-inner {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: stretch;
|
|
30
|
+
gap: var(--group-padding);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Each toggle is a button-shaped chip with the group's inner radius.
|
|
34
|
+
.adw-toggle {
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
gap: var(--spacing-xs);
|
|
40
|
+
min-width: 34px;
|
|
41
|
+
min-height: 28px;
|
|
42
|
+
margin: 0;
|
|
43
|
+
padding: 4px 11px;
|
|
44
|
+
border: none;
|
|
45
|
+
border-radius: calc(var(--button-radius) - var(--group-padding));
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
color: var(--window-fg-color);
|
|
48
|
+
font-family: var(--font-family);
|
|
49
|
+
font-size: var(--font-size-base);
|
|
50
|
+
font-weight: 700;
|
|
51
|
+
line-height: 1;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition:
|
|
54
|
+
color 0.2s ease,
|
|
55
|
+
background-color 0.2s ease,
|
|
56
|
+
box-shadow 0.2s ease;
|
|
57
|
+
user-select: none;
|
|
58
|
+
-webkit-user-select: none;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: var(--button-hover-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active {
|
|
65
|
+
background-color: var(--button-active-color);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:focus-visible {
|
|
69
|
+
outline: 2px solid var(--accent-color);
|
|
70
|
+
outline-offset: 1px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// The active toggle — a raised white chip, the way libadwaita draws it.
|
|
74
|
+
&.active {
|
|
75
|
+
background-color: var(--active-toggle-bg-color);
|
|
76
|
+
color: var(--active-toggle-fg-color);
|
|
77
|
+
box-shadow:
|
|
78
|
+
0 1px 3px 1px rgba(0, 0, 6, 0.07),
|
|
79
|
+
0 2px 6px 2px rgba(0, 0, 6, 0.03);
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
background-color: var(--active-toggle-bg-color);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Round — group + toggles become pill-shaped.
|
|
88
|
+
&.round {
|
|
89
|
+
border-radius: 17px;
|
|
90
|
+
|
|
91
|
+
.adw-toggle {
|
|
92
|
+
border-radius: calc(17px - var(--group-padding));
|
|
93
|
+
padding-left: calc(15px - var(--group-padding));
|
|
94
|
+
padding-right: calc(15px - var(--group-padding));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Flat — no group background; the active toggle uses a subtle fill instead of
|
|
99
|
+
// the raised white chip.
|
|
100
|
+
&.flat {
|
|
101
|
+
--group-padding: 0px;
|
|
102
|
+
|
|
103
|
+
padding: 0;
|
|
104
|
+
background: none;
|
|
105
|
+
|
|
106
|
+
.adw-toggle {
|
|
107
|
+
border-radius: var(--button-radius);
|
|
108
|
+
|
|
109
|
+
&.active {
|
|
110
|
+
background-color: var(--button-active-color);
|
|
111
|
+
color: inherit;
|
|
112
|
+
box-shadow: none;
|
|
113
|
+
|
|
114
|
+
&:hover {
|
|
115
|
+
background-color: var(--button-active-color);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&.round .adw-toggle {
|
|
121
|
+
border-radius: 17px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// _toolbar_view.scss — adw-toolbar-view styling (content framed by top/bottom bars).
|
|
2
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_toolbar_view.scss
|
|
3
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_toolbars.scss
|
|
4
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
5
|
+
// Copyright (c) 2025 csm (adwaita-web). MIT License.
|
|
6
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
7
|
+
|
|
8
|
+
adw-toolbar-view {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
min-height: 0;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
flex: 1 1 auto;
|
|
14
|
+
|
|
15
|
+
.adw-toolbar-view-top,
|
|
16
|
+
.adw-toolbar-view-bottom {
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.adw-toolbar-view-content {
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
min-height: 0;
|
|
25
|
+
min-width: 0;
|
|
26
|
+
overflow: auto;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
background-color: var(--window-bg-color);
|
|
30
|
+
}
|
|
31
|
+
}
|
package/scss/_variables.scss
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
--headerbar-fg-color: rgba(0, 0, 6, 0.8);
|
|
20
20
|
--headerbar-shade-color: rgba(0, 0, 6, 0.12);
|
|
21
21
|
|
|
22
|
+
// Hairline separators (header underline, sidebar/pane dividers). Subtle in
|
|
23
|
+
// BOTH themes — dark theme flips to a faint light line, the way libadwaita
|
|
24
|
+
// draws separators, instead of a harsh near-black line on a dark surface.
|
|
25
|
+
--separator-color: rgba(0, 0, 6, 0.1);
|
|
26
|
+
|
|
22
27
|
// Sidebar
|
|
23
28
|
--sidebar-bg-color: #ebebed;
|
|
24
29
|
|
|
@@ -32,6 +37,20 @@
|
|
|
32
37
|
--accent-fg-color: #ffffff;
|
|
33
38
|
--accent-color: #1c71d8;
|
|
34
39
|
|
|
40
|
+
// Buttons
|
|
41
|
+
--button-bg-color: rgba(0, 0, 6, 0.08);
|
|
42
|
+
--button-hover-color: rgba(0, 0, 6, 0.13);
|
|
43
|
+
--button-active-color: rgba(0, 0, 6, 0.19);
|
|
44
|
+
|
|
45
|
+
// Entries
|
|
46
|
+
--entry-bg-color: #ffffff;
|
|
47
|
+
--entry-border-color: rgba(0, 0, 6, 0.18);
|
|
48
|
+
--entry-border-hover-color: rgba(0, 0, 6, 0.28);
|
|
49
|
+
|
|
50
|
+
// Destructive action
|
|
51
|
+
--destructive-bg-color: #e01b24;
|
|
52
|
+
--destructive-fg-color: #ffffff;
|
|
53
|
+
|
|
35
54
|
// Switch
|
|
36
55
|
--switch-off-bg: rgba(0, 0, 0, 0.2);
|
|
37
56
|
--switch-knob-bg: #ffffff;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// _view_switcher.scss — adw-view-switcher styling: an adaptive, tab-style
|
|
2
|
+
// switcher (single `viewswitcher` node) above a content area showing one page
|
|
3
|
+
// at a time. Buttons are always icon + label, laid out side by side (`.wide`)
|
|
4
|
+
// or stacked (`.narrow`), matching libadwaita's policy style classes.
|
|
5
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_view-switcher.scss (AdwViewSwitcher)
|
|
6
|
+
// Reference: refs/adwaita-web/adwaita-web/scss/_viewswitcher.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-view-switcher {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
|
|
16
|
+
// The segmented button bar — the single `viewswitcher` node in libadwaita.
|
|
17
|
+
// Homogeneous tabs (equal width via flex:1) with a small gutter between them.
|
|
18
|
+
.adw-view-switcher-bar {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: stretch;
|
|
21
|
+
gap: 3px; // libadwaita's `border-spacing: 3px`
|
|
22
|
+
min-height: 34px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Each tab is a flat, transparent toggle that lights up with a subtle fill
|
|
26
|
+
// when hovered and shows the active page with an accent-tinted background.
|
|
27
|
+
.adw-view-switcher-button {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
flex: 1 1 0; // homogeneous — every tab gets equal width
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
margin: 0;
|
|
34
|
+
padding: 2px 12px;
|
|
35
|
+
border: none;
|
|
36
|
+
border-radius: var(--button-radius);
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
color: var(--window-fg-color);
|
|
39
|
+
font-family: var(--font-family);
|
|
40
|
+
font-size: var(--font-size-base);
|
|
41
|
+
font-weight: 700;
|
|
42
|
+
line-height: 1.2;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
transition:
|
|
45
|
+
color 0.2s ease,
|
|
46
|
+
background-color 0.2s ease;
|
|
47
|
+
user-select: none;
|
|
48
|
+
-webkit-user-select: none;
|
|
49
|
+
|
|
50
|
+
.adw-icon {
|
|
51
|
+
width: 16px;
|
|
52
|
+
height: 16px;
|
|
53
|
+
flex: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.adw-view-switcher-label {
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
background-color: var(--button-hover-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:active {
|
|
67
|
+
background-color: var(--button-active-color);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:focus-visible {
|
|
71
|
+
outline: 2px solid var(--accent-color);
|
|
72
|
+
outline-offset: -2px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// The selected view — a neutral filled chip (libadwaita darkens the
|
|
76
|
+
// whole button; the icon/label keep the normal foreground colour
|
|
77
|
+
// rather than turning accent).
|
|
78
|
+
&.active {
|
|
79
|
+
background-color: var(--button-active-color);
|
|
80
|
+
color: var(--window-fg-color);
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
background-color: var(--button-active-color);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Wide policy — icon and label side by side.
|
|
89
|
+
&.wide .adw-view-switcher-button {
|
|
90
|
+
flex-direction: row;
|
|
91
|
+
gap: var(--spacing-xs);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Narrow policy — icon stacked above a smaller label, the compact layout
|
|
95
|
+
// libadwaita drops to in a header bar at narrow window widths.
|
|
96
|
+
&.narrow {
|
|
97
|
+
.adw-view-switcher-bar {
|
|
98
|
+
min-height: 6px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.adw-view-switcher-button {
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: 1px;
|
|
104
|
+
padding-top: 4px;
|
|
105
|
+
padding-bottom: 2px;
|
|
106
|
+
font-size: 0.75rem;
|
|
107
|
+
|
|
108
|
+
.adw-view-switcher-label {
|
|
109
|
+
min-height: 18px;
|
|
110
|
+
line-height: 18px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// The paired content area showing the active page — a card-like surface
|
|
116
|
+
// below the switcher (the web stand-in for the Adw.ViewStack body).
|
|
117
|
+
.adw-view-switcher-content {
|
|
118
|
+
flex: 1 1 auto;
|
|
119
|
+
margin-top: var(--spacing-s);
|
|
120
|
+
padding: var(--spacing-m);
|
|
121
|
+
background-color: var(--view-bg-color);
|
|
122
|
+
border: 1px solid var(--separator-color);
|
|
123
|
+
border-radius: var(--card-radius);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.adw-view-switcher-page {
|
|
127
|
+
display: none;
|
|
128
|
+
|
|
129
|
+
&.active-view {
|
|
130
|
+
display: block;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|