@gjsify/adwaita-web 0.54.0 → 0.56.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.
Files changed (479) hide show
  1. package/README.md +8 -0
  2. package/dist/adwaita-web.css +8146 -3011
  3. package/dist/adwaita-web.css.map +1 -1
  4. package/lib/types/adw-application-window.spec.d.ts +1 -0
  5. package/lib/types/adw-bin.spec.d.ts +1 -0
  6. package/lib/types/adw-breakpoint-bin.spec.d.ts +1 -0
  7. package/lib/types/adw-clamp-scrollable.spec.d.ts +1 -0
  8. package/lib/types/adw-multi-layout-view.spec.d.ts +1 -0
  9. package/lib/types/adw-preferences-row.spec.d.ts +1 -0
  10. package/lib/types/adw-shortcuts.spec.d.ts +1 -0
  11. package/lib/types/adw-status-page.spec.d.ts +1 -0
  12. package/lib/types/adw-tab-bar.spec.d.ts +1 -0
  13. package/lib/types/adw-tab-button.spec.d.ts +1 -0
  14. package/lib/types/adw-tab-overview.spec.d.ts +1 -0
  15. package/lib/types/adw-view-switcher-sidebar.spec.d.ts +1 -0
  16. package/lib/types/adw-window.spec.d.ts +1 -0
  17. package/lib/types/attributes.d.ts +19 -0
  18. package/lib/types/breakpoints.d.ts +14 -3
  19. package/lib/types/construct-vectors.spec.d.ts +1 -0
  20. package/lib/types/elements/adw-action-row.d.ts +4 -0
  21. package/lib/types/elements/adw-application-window.d.ts +27 -0
  22. package/lib/types/elements/adw-bin.d.ts +17 -0
  23. package/lib/types/elements/adw-breakpoint-bin.d.ts +67 -0
  24. package/lib/types/elements/adw-clamp-scrollable.d.ts +38 -0
  25. package/lib/types/elements/adw-combo-row.d.ts +4 -0
  26. package/lib/types/elements/adw-dialog.d.ts +10 -0
  27. package/lib/types/elements/adw-entry-row.d.ts +6 -0
  28. package/lib/types/elements/adw-expander-row.d.ts +2 -0
  29. package/lib/types/elements/adw-header-bar.d.ts +6 -0
  30. package/lib/types/elements/adw-layout-slot.d.ts +19 -0
  31. package/lib/types/elements/adw-multi-layout-view.d.ts +101 -0
  32. package/lib/types/elements/adw-overlay-split-view.d.ts +13 -0
  33. package/lib/types/elements/adw-preferences-row.d.ts +31 -0
  34. package/lib/types/elements/adw-shortcuts-dialog.d.ts +13 -0
  35. package/lib/types/elements/adw-shortcuts-item.d.ts +36 -0
  36. package/lib/types/elements/adw-shortcuts-section.d.ts +14 -0
  37. package/lib/types/elements/adw-sidebar.d.ts +8 -2
  38. package/lib/types/elements/adw-spin-row.d.ts +6 -0
  39. package/lib/types/elements/adw-switch-row.d.ts +7 -0
  40. package/lib/types/elements/adw-tab-bar.d.ts +108 -0
  41. package/lib/types/elements/adw-tab-button.d.ts +32 -0
  42. package/lib/types/elements/adw-tab-overview.d.ts +199 -0
  43. package/lib/types/elements/adw-tab-view.d.ts +19 -23
  44. package/lib/types/elements/adw-toggle-group.d.ts +17 -0
  45. package/lib/types/elements/adw-view-switcher-sidebar.d.ts +84 -0
  46. package/lib/types/elements/adw-window.d.ts +40 -0
  47. package/lib/types/elements/gtk-about-dialog.d.ts +146 -0
  48. package/lib/types/elements/gtk-application-window.d.ts +34 -0
  49. package/lib/types/elements/gtk-aspect-frame.d.ts +27 -0
  50. package/lib/types/elements/gtk-button.d.ts +9 -0
  51. package/lib/types/elements/gtk-calendar.d.ts +159 -0
  52. package/lib/types/elements/gtk-center-box.d.ts +39 -0
  53. package/lib/types/elements/gtk-color-dialog-button.d.ts +69 -0
  54. package/lib/types/elements/gtk-column-view.d.ts +50 -0
  55. package/lib/types/elements/gtk-drag-icon.d.ts +78 -0
  56. package/lib/types/elements/gtk-drawing-area.d.ts +95 -0
  57. package/lib/types/elements/gtk-editable-label.d.ts +33 -0
  58. package/lib/types/elements/gtk-emoji-chooser.d.ts +84 -0
  59. package/lib/types/elements/gtk-entry.d.ts +20 -1
  60. package/lib/types/elements/gtk-expander.d.ts +49 -0
  61. package/lib/types/elements/gtk-fixed.d.ts +13 -0
  62. package/lib/types/elements/gtk-flow-box-child.d.ts +14 -0
  63. package/lib/types/elements/gtk-flow-box.d.ts +87 -0
  64. package/lib/types/elements/gtk-font-dialog-button.d.ts +83 -0
  65. package/lib/types/elements/gtk-frame.d.ts +24 -0
  66. package/lib/types/elements/gtk-gl-area.d.ts +136 -0
  67. package/lib/types/elements/gtk-graphics-offload.d.ts +24 -0
  68. package/lib/types/elements/gtk-grid-view.d.ts +39 -0
  69. package/lib/types/elements/gtk-grid.d.ts +27 -0
  70. package/lib/types/elements/gtk-header-bar.d.ts +60 -0
  71. package/lib/types/elements/gtk-inscription.d.ts +64 -0
  72. package/lib/types/elements/gtk-label.d.ts +3 -0
  73. package/lib/types/elements/gtk-level-bar.d.ts +59 -0
  74. package/lib/types/elements/gtk-link-button.d.ts +29 -0
  75. package/lib/types/elements/gtk-list-box-row.d.ts +54 -0
  76. package/lib/types/elements/gtk-list-box.d.ts +100 -0
  77. package/lib/types/elements/gtk-list-view.d.ts +73 -0
  78. package/lib/types/elements/gtk-media-controls.d.ts +142 -0
  79. package/lib/types/elements/gtk-notebook.d.ts +148 -0
  80. package/lib/types/elements/gtk-overlay.d.ts +22 -0
  81. package/lib/types/elements/gtk-page-setup-unix-dialog.d.ts +87 -0
  82. package/lib/types/elements/gtk-paned.d.ts +121 -0
  83. package/lib/types/elements/gtk-password-entry.d.ts +27 -0
  84. package/lib/types/elements/gtk-picture.d.ts +66 -0
  85. package/lib/types/elements/gtk-popover-bin.d.ts +82 -0
  86. package/lib/types/elements/gtk-popover-menu-bar.d.ts +66 -0
  87. package/lib/types/elements/gtk-popover-menu.d.ts +83 -0
  88. package/lib/types/elements/gtk-popover.d.ts +28 -3
  89. package/lib/types/elements/gtk-print-unix-dialog.d.ts +167 -0
  90. package/lib/types/elements/gtk-revealer.d.ts +55 -0
  91. package/lib/types/elements/gtk-scale-button.d.ts +59 -0
  92. package/lib/types/elements/gtk-scale.d.ts +98 -0
  93. package/lib/types/elements/gtk-scrollbar.d.ts +124 -0
  94. package/lib/types/elements/gtk-scrolled-window.d.ts +129 -0
  95. package/lib/types/elements/gtk-search-bar.d.ts +39 -0
  96. package/lib/types/elements/gtk-search-entry.d.ts +27 -0
  97. package/lib/types/elements/gtk-separator.d.ts +10 -0
  98. package/lib/types/elements/gtk-spin-button.d.ts +94 -0
  99. package/lib/types/elements/gtk-spinner.d.ts +14 -0
  100. package/lib/types/elements/gtk-stack-sidebar.d.ts +43 -0
  101. package/lib/types/elements/gtk-stack-switcher.d.ts +58 -0
  102. package/lib/types/elements/gtk-stack.d.ts +154 -0
  103. package/lib/types/elements/gtk-switch.d.ts +4 -1
  104. package/lib/types/elements/gtk-text-view.d.ts +62 -0
  105. package/lib/types/elements/gtk-text.d.ts +45 -0
  106. package/lib/types/elements/gtk-toggle-button.d.ts +45 -0
  107. package/lib/types/elements/gtk-tree-expander.d.ts +38 -0
  108. package/lib/types/elements/gtk-video.d.ts +97 -0
  109. package/lib/types/elements/gtk-viewport.d.ts +84 -0
  110. package/lib/types/elements/gtk-window-controls.d.ts +80 -0
  111. package/lib/types/elements/gtk-window-handle.d.ts +39 -0
  112. package/lib/types/elements/gtk-window.d.ts +103 -0
  113. package/lib/types/elements/justification.d.ts +2 -0
  114. package/lib/types/elements/popover-menu.d.ts +18 -0
  115. package/lib/types/elements/roving-focus.d.ts +29 -1
  116. package/lib/types/emoji-data.d.ts +38 -0
  117. package/lib/types/font-description.d.ts +96 -0
  118. package/lib/types/gtk-about-dialog.spec.d.ts +1 -0
  119. package/lib/types/gtk-action-bar.spec.d.ts +1 -0
  120. package/lib/types/gtk-application-window.spec.d.ts +1 -0
  121. package/lib/types/gtk-aspect-frame.spec.d.ts +1 -0
  122. package/lib/types/gtk-calendar.spec.d.ts +1 -0
  123. package/lib/types/gtk-center-box.spec.d.ts +1 -0
  124. package/lib/types/gtk-color-dialog-button.spec.d.ts +1 -0
  125. package/lib/types/gtk-column-view.spec.d.ts +1 -0
  126. package/lib/types/gtk-drag-icon.spec.d.ts +1 -0
  127. package/lib/types/gtk-drawing-area.spec.d.ts +1 -0
  128. package/lib/types/gtk-editable-label.spec.d.ts +1 -0
  129. package/lib/types/gtk-emoji-chooser.spec.d.ts +1 -0
  130. package/lib/types/gtk-expander.spec.d.ts +1 -0
  131. package/lib/types/gtk-fixed.spec.d.ts +1 -0
  132. package/lib/types/gtk-flow-box.spec.d.ts +1 -0
  133. package/lib/types/gtk-font-dialog-button.spec.d.ts +1 -0
  134. package/lib/types/gtk-frame.spec.d.ts +1 -0
  135. package/lib/types/gtk-gl-area.spec.d.ts +1 -0
  136. package/lib/types/gtk-graphics-offload.spec.d.ts +1 -0
  137. package/lib/types/gtk-grid-view.spec.d.ts +1 -0
  138. package/lib/types/gtk-grid.spec.d.ts +1 -0
  139. package/lib/types/gtk-header-bar.spec.d.ts +1 -0
  140. package/lib/types/gtk-inscription.spec.d.ts +1 -0
  141. package/lib/types/gtk-level-bar.spec.d.ts +1 -0
  142. package/lib/types/gtk-link-button.spec.d.ts +1 -0
  143. package/lib/types/gtk-list-box.spec.d.ts +1 -0
  144. package/lib/types/gtk-list-view.spec.d.ts +1 -0
  145. package/lib/types/gtk-media-controls.spec.d.ts +1 -0
  146. package/lib/types/gtk-notebook.spec.d.ts +1 -0
  147. package/lib/types/gtk-overlay.spec.d.ts +1 -0
  148. package/lib/types/gtk-paned.spec.d.ts +1 -0
  149. package/lib/types/gtk-password-entry.spec.d.ts +1 -0
  150. package/lib/types/gtk-picture.spec.d.ts +1 -0
  151. package/lib/types/gtk-popover-bin.spec.d.ts +1 -0
  152. package/lib/types/gtk-popover-menu-bar.spec.d.ts +1 -0
  153. package/lib/types/gtk-popover-menu.spec.d.ts +1 -0
  154. package/lib/types/gtk-popover-role.spec.d.ts +1 -0
  155. package/lib/types/gtk-popover.spec.d.ts +1 -0
  156. package/lib/types/gtk-print-dialogs.spec.d.ts +1 -0
  157. package/lib/types/gtk-revealer.spec.d.ts +1 -0
  158. package/lib/types/gtk-scale-button.spec.d.ts +1 -0
  159. package/lib/types/gtk-scale.spec.d.ts +1 -0
  160. package/lib/types/gtk-scrollbar.spec.d.ts +1 -0
  161. package/lib/types/gtk-scrolled-window.spec.d.ts +1 -0
  162. package/lib/types/gtk-search-bar.spec.d.ts +1 -0
  163. package/lib/types/gtk-search-entry.spec.d.ts +1 -0
  164. package/lib/types/gtk-separator.spec.d.ts +1 -0
  165. package/lib/types/gtk-spin-button.spec.d.ts +1 -0
  166. package/lib/types/gtk-spinner.spec.d.ts +1 -0
  167. package/lib/types/gtk-stack-sidebar.spec.d.ts +1 -0
  168. package/lib/types/gtk-stack-switcher.spec.d.ts +1 -0
  169. package/lib/types/gtk-stack.spec.d.ts +1 -0
  170. package/lib/types/gtk-text-view.spec.d.ts +1 -0
  171. package/lib/types/gtk-text.spec.d.ts +1 -0
  172. package/lib/types/gtk-toggle-button.spec.d.ts +1 -0
  173. package/lib/types/gtk-tree-expander.spec.d.ts +1 -0
  174. package/lib/types/gtk-video.spec.d.ts +1 -0
  175. package/lib/types/gtk-viewport.spec.d.ts +1 -0
  176. package/lib/types/gtk-window-controls.spec.d.ts +1 -0
  177. package/lib/types/gtk-window-handle.spec.d.ts +1 -0
  178. package/lib/types/gtk-window.spec.d.ts +1 -0
  179. package/lib/types/index.d.ts +4 -1
  180. package/lib/types/list-view-dom.d.ts +44 -0
  181. package/lib/types/namespace/adw.d.ts +12 -0
  182. package/lib/types/namespace/gtk.d.ts +61 -0
  183. package/lib/types/page-setup.d.ts +100 -0
  184. package/lib/types/row-line-clamp.d.ts +20 -0
  185. package/lib/types/row-tooltip.d.ts +8 -0
  186. package/lib/types/row-tooltip.spec.d.ts +1 -0
  187. package/lib/types/scroll-shading.d.ts +15 -1
  188. package/lib/types/shared-tree-builder.d.ts +75 -17
  189. package/lib/types/shared-tree-mount.spec.d.ts +1 -0
  190. package/lib/types/signals.d.ts +4 -0
  191. package/lib/types/styles.generated.d.ts +1 -1
  192. package/lib/types/tab-chip.d.ts +73 -0
  193. package/lib/types/template-classes.d.ts +11 -0
  194. package/lib/types/widget-size.spec.d.ts +1 -0
  195. package/package.json +12 -8
  196. package/scss/_action_row.scss +41 -17
  197. package/scss/_application_window.scss +26 -0
  198. package/scss/_aspect_frame.scss +25 -0
  199. package/scss/_bin.scss +26 -0
  200. package/scss/_button.scss +45 -0
  201. package/scss/_button_row.scss +5 -0
  202. package/scss/_calendar.scss +176 -0
  203. package/scss/_center_box.scss +25 -0
  204. package/scss/_checks.scss +6 -1
  205. package/scss/_clamp_scrollable.scss +28 -0
  206. package/scss/_color_button.scss +67 -0
  207. package/scss/_column_view.scss +126 -0
  208. package/scss/_drag_icon.scss +55 -0
  209. package/scss/_drawing.scss +85 -0
  210. package/scss/_emoji_chooser.scss +213 -0
  211. package/scss/_entry.scss +13 -5
  212. package/scss/_entry_row.scss +1 -1
  213. package/scss/_expander.scss +113 -0
  214. package/scss/_expander_row.scss +36 -3
  215. package/scss/_fixed.scss +29 -0
  216. package/scss/_flow_box.scss +94 -0
  217. package/scss/_font_button.scss +63 -0
  218. package/scss/_frame.scss +41 -0
  219. package/scss/_grid.scss +19 -0
  220. package/scss/_grid_view.scss +46 -0
  221. package/scss/_gtk_about_dialog.scss +186 -0
  222. package/scss/_headerbar.scss +134 -1
  223. package/scss/_icons.generated.scss +186 -0
  224. package/scss/_inscription.scss +125 -0
  225. package/scss/_level_bar.scss +190 -0
  226. package/scss/_link.scss +82 -0
  227. package/scss/_list_box.scss +88 -0
  228. package/scss/_list_view.scss +96 -0
  229. package/scss/_media_controls.scss +139 -0
  230. package/scss/_overlay.scss +68 -0
  231. package/scss/_paned.scss +130 -0
  232. package/scss/_password_entry.scss +83 -0
  233. package/scss/_picture.scss +80 -0
  234. package/scss/_popover_bin.scss +53 -0
  235. package/scss/_popover_menu_bar.scss +104 -0
  236. package/scss/_preferences_row.scss +60 -0
  237. package/scss/_print_dialogs.scss +328 -0
  238. package/scss/_reset.scss +21 -19
  239. package/scss/_revealer.scss +37 -0
  240. package/scss/_row.scss +36 -5
  241. package/scss/_scale.scss +298 -0
  242. package/scss/_scale_button.scss +167 -0
  243. package/scss/_scrollbar.scss +230 -0
  244. package/scss/_scrolled_window.scss +131 -0
  245. package/scss/_search_bar.scss +118 -0
  246. package/scss/_search_entry.scss +86 -0
  247. package/scss/_separator.scss +44 -0
  248. package/scss/_shortcuts_dialog.scss +100 -0
  249. package/scss/_spin_button.scss +172 -0
  250. package/scss/_spin_row.scss +56 -8
  251. package/scss/_spinner.scss +85 -4
  252. package/scss/_stack.scss +729 -0
  253. package/scss/_status_page.scss +1 -1
  254. package/scss/_switch.scss +13 -5
  255. package/scss/_switch_row.scss +10 -0
  256. package/scss/_tab_bar.scss +317 -0
  257. package/scss/_tab_button.scss +98 -0
  258. package/scss/_tab_overview.scss +483 -0
  259. package/scss/_text.scss +182 -0
  260. package/scss/_theme.scss +1 -1
  261. package/scss/_toggle_group.scss +28 -0
  262. package/scss/_tree_expander.scss +62 -0
  263. package/scss/_variables.scss +1 -1
  264. package/scss/_video.scss +146 -0
  265. package/scss/_view_switcher_sidebar.scss +112 -0
  266. package/scss/_viewport.scss +50 -0
  267. package/scss/_widget.scss +14 -3
  268. package/scss/_window.scss +131 -2
  269. package/scss/_window_handle.scss +20 -0
  270. package/scss/adwaita-skin.scss +109 -0
  271. package/src/adw-action-rows.spec.ts +331 -0
  272. package/src/adw-application-window.spec.ts +118 -0
  273. package/src/adw-bin.spec.ts +75 -0
  274. package/src/adw-breakpoint-bin.spec.ts +324 -0
  275. package/src/adw-clamp-scrollable.spec.ts +189 -0
  276. package/src/adw-header-bar.spec.ts +18 -0
  277. package/src/adw-multi-layout-view.spec.ts +243 -0
  278. package/src/adw-preferences-row.spec.ts +164 -0
  279. package/src/adw-row-state.spec.ts +142 -0
  280. package/src/adw-shortcuts.spec.ts +155 -0
  281. package/src/adw-status-page.spec.ts +124 -0
  282. package/src/adw-tab-bar.spec.ts +287 -0
  283. package/src/adw-tab-button.spec.ts +101 -0
  284. package/src/adw-tab-overview.spec.ts +443 -0
  285. package/src/adw-view-switcher-sidebar.spec.ts +281 -0
  286. package/src/adw-window.spec.ts +129 -0
  287. package/src/attributes.ts +52 -0
  288. package/src/breakpoints.ts +25 -8
  289. package/src/capabilities.d.mts +3 -0
  290. package/src/capabilities.mjs +21 -0
  291. package/src/connect-lifecycle.spec.ts +12 -0
  292. package/src/construct-vectors.spec.ts +175 -0
  293. package/src/elements/adw-action-row.ts +31 -2
  294. package/src/elements/adw-alert-dialog.ts +4 -1
  295. package/src/elements/adw-application-window.ts +154 -0
  296. package/src/elements/adw-bin.ts +101 -0
  297. package/src/elements/adw-breakpoint-bin.ts +287 -0
  298. package/src/elements/adw-button-row.ts +7 -1
  299. package/src/elements/adw-clamp-scrollable.ts +207 -0
  300. package/src/elements/adw-combo-row.ts +26 -1
  301. package/src/elements/adw-dialog.ts +19 -0
  302. package/src/elements/adw-entry-row.ts +22 -12
  303. package/src/elements/adw-expander-row.ts +34 -1
  304. package/src/elements/adw-header-bar.ts +18 -4
  305. package/src/elements/adw-layout-slot.ts +95 -0
  306. package/src/elements/adw-multi-layout-view.ts +326 -0
  307. package/src/elements/adw-overlay-split-view.ts +29 -6
  308. package/src/elements/adw-preferences-row.ts +153 -0
  309. package/src/elements/adw-shortcuts-dialog.ts +52 -0
  310. package/src/elements/adw-shortcuts-item.ts +171 -0
  311. package/src/elements/adw-shortcuts-section.ts +86 -0
  312. package/src/elements/adw-sidebar.ts +74 -7
  313. package/src/elements/adw-spin-row.ts +37 -2
  314. package/src/elements/adw-status-page.ts +10 -2
  315. package/src/elements/adw-switch-row.ts +53 -2
  316. package/src/elements/adw-tab-bar.ts +529 -0
  317. package/src/elements/adw-tab-button.ts +194 -0
  318. package/src/elements/adw-tab-overview.ts +1011 -0
  319. package/src/elements/adw-tab-view.ts +66 -145
  320. package/src/elements/adw-toggle-group.ts +138 -14
  321. package/src/elements/adw-view-stack.ts +18 -0
  322. package/src/elements/adw-view-switcher-sidebar.ts +332 -0
  323. package/src/elements/adw-window.ts +190 -11
  324. package/src/elements/checks.ts +35 -8
  325. package/src/elements/gtk-about-dialog.ts +811 -0
  326. package/src/elements/gtk-application-window.ts +108 -0
  327. package/src/elements/gtk-aspect-frame.ts +160 -0
  328. package/src/elements/gtk-button.ts +12 -0
  329. package/src/elements/gtk-calendar.ts +757 -0
  330. package/src/elements/gtk-center-box.ts +184 -0
  331. package/src/elements/gtk-color-dialog-button.ts +278 -0
  332. package/src/elements/gtk-column-view.ts +320 -0
  333. package/src/elements/gtk-drag-icon.ts +257 -0
  334. package/src/elements/gtk-drawing-area.ts +303 -0
  335. package/src/elements/gtk-editable-label.ts +204 -0
  336. package/src/elements/gtk-emoji-chooser.ts +542 -0
  337. package/src/elements/gtk-entry.ts +39 -5
  338. package/src/elements/gtk-expander.ts +301 -0
  339. package/src/elements/gtk-fixed.ts +99 -0
  340. package/src/elements/gtk-flow-box-child.ts +68 -0
  341. package/src/elements/gtk-flow-box.ts +480 -0
  342. package/src/elements/gtk-font-dialog-button.ts +432 -0
  343. package/src/elements/gtk-frame.ts +174 -0
  344. package/src/elements/gtk-gl-area.ts +476 -0
  345. package/src/elements/gtk-graphics-offload.ts +130 -0
  346. package/src/elements/gtk-grid-view.ts +168 -0
  347. package/src/elements/gtk-grid.ts +127 -0
  348. package/src/elements/gtk-header-bar.ts +273 -0
  349. package/src/elements/gtk-inscription.ts +387 -0
  350. package/src/elements/gtk-label.ts +19 -11
  351. package/src/elements/gtk-level-bar.ts +323 -0
  352. package/src/elements/gtk-link-button.ts +138 -0
  353. package/src/elements/gtk-list-box-row.ts +195 -0
  354. package/src/elements/gtk-list-box.ts +413 -0
  355. package/src/elements/gtk-list-view.ts +370 -0
  356. package/src/elements/gtk-media-controls.ts +509 -0
  357. package/src/elements/gtk-notebook.ts +664 -0
  358. package/src/elements/gtk-overlay.ts +149 -0
  359. package/src/elements/gtk-page-setup-unix-dialog.ts +420 -0
  360. package/src/elements/gtk-paned.ts +597 -0
  361. package/src/elements/gtk-password-entry.ts +170 -0
  362. package/src/elements/gtk-picture.ts +254 -0
  363. package/src/elements/gtk-popover-bin.ts +332 -0
  364. package/src/elements/gtk-popover-menu-bar.ts +355 -0
  365. package/src/elements/gtk-popover-menu.ts +339 -0
  366. package/src/elements/gtk-popover.ts +92 -10
  367. package/src/elements/gtk-print-unix-dialog.ts +989 -0
  368. package/src/elements/gtk-progress-bar.ts +24 -11
  369. package/src/elements/gtk-revealer.ts +406 -0
  370. package/src/elements/gtk-scale-button.ts +358 -0
  371. package/src/elements/gtk-scale.ts +492 -0
  372. package/src/elements/gtk-scrollbar.ts +528 -0
  373. package/src/elements/gtk-scrolled-window.ts +653 -0
  374. package/src/elements/gtk-search-bar.ts +200 -0
  375. package/src/elements/gtk-search-entry.ts +172 -0
  376. package/src/elements/gtk-separator.ts +52 -0
  377. package/src/elements/gtk-spin-button.ts +475 -0
  378. package/src/elements/gtk-spinner.ts +126 -0
  379. package/src/elements/gtk-stack-sidebar.ts +212 -0
  380. package/src/elements/gtk-stack-switcher.ts +279 -0
  381. package/src/elements/gtk-stack.ts +748 -0
  382. package/src/elements/gtk-switch.ts +52 -19
  383. package/src/elements/gtk-text-view.ts +290 -0
  384. package/src/elements/gtk-text.ts +219 -0
  385. package/src/elements/gtk-toggle-button.ts +239 -0
  386. package/src/elements/gtk-tree-expander.ts +243 -0
  387. package/src/elements/gtk-video.ts +423 -0
  388. package/src/elements/gtk-viewport.ts +277 -0
  389. package/src/elements/gtk-window-controls.ts +341 -0
  390. package/src/elements/gtk-window-handle.ts +221 -0
  391. package/src/elements/gtk-window.ts +372 -0
  392. package/src/elements/justification.ts +24 -0
  393. package/src/elements/popover-menu.ts +24 -0
  394. package/src/elements/roving-focus.ts +53 -21
  395. package/src/emoji-data.ts +577 -0
  396. package/src/entry-rows.spec.ts +31 -0
  397. package/src/font-description.ts +238 -0
  398. package/src/gtk-about-dialog.spec.ts +250 -0
  399. package/src/gtk-action-bar.spec.ts +89 -0
  400. package/src/gtk-application-window.spec.ts +107 -0
  401. package/src/gtk-aspect-frame.spec.ts +114 -0
  402. package/src/gtk-calendar.spec.ts +589 -0
  403. package/src/gtk-center-box.spec.ts +125 -0
  404. package/src/gtk-color-dialog-button.spec.ts +141 -0
  405. package/src/gtk-column-view.spec.ts +154 -0
  406. package/src/gtk-drag-icon.spec.ts +190 -0
  407. package/src/gtk-drawing-area.spec.ts +211 -0
  408. package/src/gtk-editable-label.spec.ts +190 -0
  409. package/src/gtk-emoji-chooser.spec.ts +173 -0
  410. package/src/gtk-entry.spec.ts +23 -0
  411. package/src/gtk-expander.spec.ts +170 -0
  412. package/src/gtk-fixed.spec.ts +97 -0
  413. package/src/gtk-flow-box.spec.ts +289 -0
  414. package/src/gtk-font-dialog-button.spec.ts +166 -0
  415. package/src/gtk-frame.spec.ts +119 -0
  416. package/src/gtk-gl-area.spec.ts +361 -0
  417. package/src/gtk-graphics-offload.spec.ts +119 -0
  418. package/src/gtk-grid-view.spec.ts +106 -0
  419. package/src/gtk-grid.spec.ts +122 -0
  420. package/src/gtk-header-bar.spec.ts +202 -0
  421. package/src/gtk-inscription.spec.ts +235 -0
  422. package/src/gtk-level-bar.spec.ts +199 -0
  423. package/src/gtk-link-button.spec.ts +117 -0
  424. package/src/gtk-list-box.spec.ts +422 -0
  425. package/src/gtk-list-view.spec.ts +203 -0
  426. package/src/gtk-media-controls.spec.ts +295 -0
  427. package/src/gtk-notebook.spec.ts +546 -0
  428. package/src/gtk-overlay.spec.ts +141 -0
  429. package/src/gtk-paned.spec.ts +267 -0
  430. package/src/gtk-password-entry.spec.ts +150 -0
  431. package/src/gtk-picture.spec.ts +172 -0
  432. package/src/gtk-popover-bin.spec.ts +229 -0
  433. package/src/gtk-popover-menu-bar.spec.ts +296 -0
  434. package/src/gtk-popover-menu.spec.ts +261 -0
  435. package/src/gtk-popover-role.spec.ts +138 -0
  436. package/src/gtk-popover.spec.ts +264 -0
  437. package/src/gtk-print-dialogs.spec.ts +251 -0
  438. package/src/gtk-revealer.spec.ts +164 -0
  439. package/src/gtk-scale-button.spec.ts +218 -0
  440. package/src/gtk-scale.spec.ts +213 -0
  441. package/src/gtk-scrollbar.spec.ts +244 -0
  442. package/src/gtk-scrolled-window.spec.ts +262 -0
  443. package/src/gtk-search-bar.spec.ts +179 -0
  444. package/src/gtk-search-entry.spec.ts +142 -0
  445. package/src/gtk-separator.spec.ts +74 -0
  446. package/src/gtk-spin-button.spec.ts +186 -0
  447. package/src/gtk-spinner.spec.ts +130 -0
  448. package/src/gtk-stack-sidebar.spec.ts +217 -0
  449. package/src/gtk-stack-switcher.spec.ts +249 -0
  450. package/src/gtk-stack.spec.ts +432 -0
  451. package/src/gtk-text-view.spec.ts +189 -0
  452. package/src/gtk-text.spec.ts +163 -0
  453. package/src/gtk-toggle-button.spec.ts +186 -0
  454. package/src/gtk-tree-expander.spec.ts +201 -0
  455. package/src/gtk-video.spec.ts +240 -0
  456. package/src/gtk-viewport.spec.ts +140 -0
  457. package/src/gtk-window-controls.spec.ts +232 -0
  458. package/src/gtk-window-handle.spec.ts +158 -0
  459. package/src/gtk-window.spec.ts +202 -0
  460. package/src/index.ts +9 -1
  461. package/src/keyboard-operable.spec.ts +77 -9
  462. package/src/list-view-dom.ts +121 -0
  463. package/src/namespace/adw.ts +12 -0
  464. package/src/namespace/gtk.ts +61 -0
  465. package/src/page-setup.ts +222 -0
  466. package/src/row-line-clamp.ts +74 -0
  467. package/src/row-tooltip.spec.ts +313 -0
  468. package/src/row-tooltip.ts +52 -0
  469. package/src/scroll-shading.ts +18 -1
  470. package/src/shared-tree-builder.ts +336 -41
  471. package/src/shared-tree-mount.spec.ts +130 -0
  472. package/src/shared-trees.spec.ts +15 -0
  473. package/src/signals.ts +15 -0
  474. package/src/style-classes.spec.ts +9 -8
  475. package/src/styles.generated.ts +1 -1
  476. package/src/tab-chip.ts +200 -0
  477. package/src/template-classes.ts +45 -0
  478. package/src/test.browser.mts +160 -0
  479. package/src/widget-size.spec.ts +117 -0
@@ -0,0 +1,190 @@
1
+ // _level_bar.scss — <gtk-level-bar>: the trough, the block, and the four colours the
2
+ // offset classes select.
3
+ //
4
+ // THE GEOMETRY IS libadwaita's, VERBATIM, because this widget has no other styling
5
+ // anywhere: refs/libadwaita/src/stylesheet/widgets/_level-bar.scss is the only
6
+ // stylesheet that touches a `levelbar` node, and it is entirely radii, sizes and
7
+ // block colours.
8
+ //
9
+ // WHAT C SUPPLIES INSTEAD. `levelbar > trough > block` is GTK's node tree
10
+ // (gtklevelbar.c:99-116) — the element writes `.adw-level-bar-trough` and
11
+ // `.adw-level-bar-block` with `.filled` / `.empty` plus the offset's class, because the
12
+ // offsets are a RUNTIME list (`gtk_level_bar_add_offset_value`, gtklevelbar.c:1395-1411)
13
+ // and no stylesheet can enumerate what an application adds. The four colours below are
14
+ // therefore written for the classes GTK itself installs: `low`, `high`, `full`
15
+ // (:1058-1060), and an application's own offset reaches them the same way.
16
+ //
17
+ // CONTINUOUS IS TWO NODES, NOT ONE. GTK allocates the empty level full size and paints
18
+ // the filled one over it (gtklevelbar.c:344-362, :424-461), and the filled node is NOT
19
+ // allocated at all when the value is 0 (:429-430) — which is why this partial positions
20
+ // both absolutely inside the trough instead of flowing them, and why `overflow: hidden`
21
+ // stands in for GTK's rounded clip.
22
+ //
23
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_level-bar.scss:1-93
24
+ // Reference: refs/gtk/gtk/gtklevelbar.c:99-116,285-303,344-362,424-461,467-524
25
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
26
+ // Copyright (c) The GTK Team. LGPLv2.1+.
27
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
28
+
29
+ // $_levelbar_size (level-bar.scss:1)
30
+ $levelbar-size: 8px;
31
+ // $_levelbar_border_radius (level-bar.scss:2)
32
+ $levelbar-radius: 99px;
33
+
34
+ gtk-level-bar {
35
+ display: flex;
36
+
37
+ // `&:disabled { filter: Opacity(var(--disabled-opacity)) }` (:5-7).
38
+ &[disabled] {
39
+ opacity: var(--disabled-opacity);
40
+ }
41
+
42
+ .adw-level-bar-trough {
43
+ // `> trough { padding: 0 }` (:67-68) — the trough is the whole box, not a padded
44
+ // container around a smaller trough.
45
+ padding: 0;
46
+ position: relative;
47
+ display: flex;
48
+ // The rounded clip `gtk_snapshot_push_rounded_clip` puts on a progress node
49
+ // (gtkprogressbar.c:462-465), and the reason a value past `max-value` is cut off
50
+ // here rather than drawn beyond the end.
51
+ overflow: hidden;
52
+ width: 100%;
53
+ }
54
+
55
+ .adw-level-bar-block {
56
+ position: absolute;
57
+ border-radius: $levelbar-radius;
58
+ }
59
+
60
+ // The unfilled level, which is what `block.empty` paints ($trough_color,
61
+ // level-bar.scss:85-92) — the same 15%-of-currentColor mix the scale trough uses
62
+ // (_scale.scss:1-10) and the 30% one under high contrast.
63
+ .adw-level-bar-block.empty {
64
+ inset: 0;
65
+ background-color: color-mix(in srgb, currentColor 15%, transparent);
66
+
67
+ @media (prefers-contrast: more) {
68
+ background-color: color-mix(in srgb, currentColor 30%, transparent);
69
+ box-shadow: inset 0 0 0 1px var(--border-color);
70
+ }
71
+ }
72
+
73
+ // The block colours (`> trough > block`, :71-93). `&:not(.empty)` is upstream's own
74
+ // selector, kept as written: it is what lets an offset an application invents paint in
75
+ // the accent without a rule of its own.
76
+ .adw-level-bar-block {
77
+ &.low {
78
+ background-color: var(--warning-bg-color);
79
+ }
80
+
81
+ &:not(.empty) {
82
+ background-color: var(--accent-bg-color);
83
+ }
84
+
85
+ &.full {
86
+ background-color: var(--success-bg-color);
87
+ }
88
+
89
+ &.high {
90
+ background-color: var(--accent-bg-color);
91
+ }
92
+ }
93
+
94
+ // `&.horizontal` (:9-35): 8px tall, one filled level in proportion to the interval.
95
+ &.horizontal {
96
+ .adw-level-bar-trough {
97
+ height: $levelbar-size;
98
+ }
99
+
100
+ .adw-level-bar-block {
101
+ min-height: $levelbar-size;
102
+ }
103
+
104
+ .adw-level-bar-block.filled {
105
+ inset-block: 0;
106
+ inset-inline-start: 0;
107
+ // `(cur_value - min_value) / (max_value - min_value)` (gtklevelbar.c:434-435).
108
+ width: calc(var(--level-fraction, 0) * 100%);
109
+ }
110
+
111
+ // `if (inverted) block_area.x += width - block_area.width` (:447-448).
112
+ &[inverted] .adw-level-bar-block.filled {
113
+ inset-inline-start: auto;
114
+ inset-inline-end: 0;
115
+ }
116
+ }
117
+
118
+ // `&.vertical` (:38-64): the same bar across the other axis.
119
+ &.vertical {
120
+ .adw-level-bar-trough {
121
+ height: 100%;
122
+ }
123
+
124
+ .adw-level-bar-block {
125
+ min-width: $levelbar-size;
126
+ }
127
+
128
+ .adw-level-bar-block.filled {
129
+ inset-inline: 0;
130
+ inset-block-start: 0;
131
+ height: calc(var(--level-fraction, 0) * 100%);
132
+ }
133
+
134
+ // `if (inverted) block_area.y += height - block_area.height` (:455-456).
135
+ &[inverted] .adw-level-bar-block.filled {
136
+ inset-block-start: auto;
137
+ inset-block-end: 0;
138
+ }
139
+ }
140
+
141
+ // DISCRETE IS FLOW, NOT ABSOLUTE. GTK lays the blocks out in one run and divides the
142
+ // trough between them (gtklevelbar.c:467-524); libadwaita puts a 2px gap between them
143
+ // and a 26px minimum (:20-35 horizontal, :50-64 vertical), with the outer corners
144
+ // rounded and the inner ones square.
145
+ &.discrete {
146
+ .adw-level-bar-block {
147
+ position: relative;
148
+ inset: auto;
149
+ flex: 1 1 0;
150
+ border-radius: 0;
151
+ }
152
+
153
+ &.horizontal {
154
+ .adw-level-bar-trough {
155
+ gap: 2px;
156
+ }
157
+
158
+ .adw-level-bar-block {
159
+ min-width: 26px;
160
+
161
+ &:first-child {
162
+ border-radius: $levelbar-radius 0 0 $levelbar-radius;
163
+ }
164
+
165
+ &:last-child {
166
+ border-radius: 0 $levelbar-radius $levelbar-radius 0;
167
+ }
168
+ }
169
+ }
170
+
171
+ &.vertical {
172
+ .adw-level-bar-trough {
173
+ flex-direction: column;
174
+ gap: 2px;
175
+ }
176
+
177
+ .adw-level-bar-block {
178
+ min-height: 26px;
179
+
180
+ &:first-child {
181
+ border-radius: $levelbar-radius $levelbar-radius 0 0;
182
+ }
183
+
184
+ &:last-child {
185
+ border-radius: 0 0 $levelbar-radius $levelbar-radius;
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,82 @@
1
+ // _link.scss — `link` and `button.link`, libadwaita's link treatment.
2
+ //
3
+ // UNSCOPED, because upstream's rule is on the node and the class together
4
+ // (`_links.scss:1-2`) and both spellings have a reader: a `Gtk.Label` that is a link is
5
+ // the `link` node, and a `Gtk.LinkButton` is `button.link`. `<gtk-link-button>` renders an
6
+ // inner `<button class="adw-button link">`, so the class is what the selector needs.
7
+ //
8
+ // THE TWO COLOURS ARE THE PALETTE'S, not new tokens: `$link_color: var(--accent-color)`
9
+ // and `$link_visited_color: color-mix(in srgb, var(--accent-color) 80%, var(--view-fg-color))`
10
+ // (`_colors.scss:265-266`) are Sass variables over tokens this package already has, so a
11
+ // consumer overriding `--accent-color` recolours its links with everything else.
12
+ //
13
+ // THE `:visited` CLAUSE IS PORTED AS A CLASS. Upstream styles GTK's `:visited` state
14
+ // (`:7-9`), which is a state FLAG on the widget (`GTK_STATE_FLAG_VISITED`,
15
+ // gtklinkbutton.c:743) rather than anything a selector can name from outside.
16
+ // `gtk_link_button_set_visited()` flips exactly that flag and no CSS class, so
17
+ // `<gtk-link-button>` writes `.visited` on the inner button and the rule below reads it.
18
+ // `:disabled` needs no such translation: a disabled `<button>` is already the UA's.
19
+ //
20
+ // `font-weight: inherit` and the transparent background in EVERY state (`:38-44`) are
21
+ // upstream's point: a link is a link, not a button that happens to be blue, so the
22
+ // hover/active/checked rules must not paint over it.
23
+ //
24
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_links.scss:1-49
25
+ // Reference: refs/libadwaita/src/stylesheet/_colors.scss:265-266
26
+ // Reference: refs/gtk/gtk/gtklinkbutton.c:380 (the `.link` style class), :646-672 (the
27
+ // URI tooltip), :742-749 (the VISITED state flag)
28
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
29
+ // Modifications: Adapted for @gjsify/adwaita-web — `:visited` becomes `.visited`, because
30
+ // a state flag has no CSS spelling a selector can match on.
31
+
32
+ $link-color: var(--accent-color);
33
+ $link-visited-color: color-mix(in srgb, var(--accent-color) 80%, var(--view-fg-color));
34
+ $osd-link-color: color-mix(in srgb, var(--accent-bg-color) 50%, white);
35
+
36
+ .link,
37
+ .adw-button.link {
38
+ color: $link-color;
39
+ text-decoration: underline;
40
+ font-weight: inherit;
41
+
42
+ &:hover {
43
+ color: hsl(from $link-color h calc(s * 1.1) calc(l * 1.1));
44
+ }
45
+
46
+ &:active {
47
+ color: $link-color;
48
+ }
49
+
50
+ &:disabled {
51
+ color: color-mix(in srgb, currentColor var(--disabled-opacity), transparent);
52
+ }
53
+
54
+ &.visited {
55
+ color: $link-visited-color;
56
+ }
57
+
58
+ // `.osd &` — a link over content, where the accent is too dark to read.
59
+ .osd & {
60
+ color: $osd-link-color;
61
+
62
+ &:visited,
63
+ &.visited {
64
+ color: color-mix(in srgb, $osd-link-color 60%, currentColor);
65
+ }
66
+
67
+ &:active {
68
+ color: $osd-link-color;
69
+ }
70
+ }
71
+
72
+ // Every state transparent: upstream gives `button.link` no background at rest, on
73
+ // hover, on active or when checked (_links.scss:38-44), so a toggle-button-styled link
74
+ // cannot paint one.
75
+ &,
76
+ &:hover,
77
+ &:active,
78
+ &:checked,
79
+ &.checked {
80
+ background-color: transparent;
81
+ }
82
+ }
@@ -0,0 +1,88 @@
1
+ // _list_box.scss — <gtk-list-box> and its rows, the elements GTK names `list` and `row`.
2
+ //
3
+ // The `list` NODE and the `row` NODE, because upstream writes them as one block and because
4
+ // libadwaita styles them against EACH OTHER: the separator rule is
5
+ // `&.separators:not(.horizontal) > row:not(.separator)` (_lists.scss:29-32), which is a rule
6
+ // about the list's class and the row's own — a port that styled the rows alone could not
7
+ // express it at all.
8
+ //
9
+ // `<gtk-list-box>` IS NOT AN ORIENTABLE, which is worth the header repeating: `GtkListBase` is
10
+ // (gtklistbase.c:2070) and `<gtk-list-view>` therefore takes an `orientation`, while
11
+ // `GtkListBox` has no such property and its rows always run down. So the
12
+ // `&.horizontal` arm of the upstream separator rule has no counterpart here, and the partial
13
+ // draws only the vertical half.
14
+ //
15
+ // The colour tokens are libadwaita's own, spelled with this package's variables:
16
+ // `$view_hover_color` is `currentColor 4%`, `$view_active_color` `currentColor 8%` and
17
+ // `$view_selected_color` `var(--accent-bg-color) 25%` (_colors.scss:263-276).
18
+ //
19
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_lists.scss:5-38 (list), :47-95 (row)
20
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
21
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
22
+
23
+ gtk-list-box {
24
+ display: block;
25
+ box-sizing: border-box;
26
+ color: var(--view-fg-color);
27
+ background-color: var(--view-bg-color);
28
+ background-clip: padding-box;
29
+
30
+ // `listview, list { border-color: $border_color }` (_lists.scss:10) — the upstream rule
31
+ // names a COLOUR and nothing else, because GTK draws a border only where a width or a
32
+ // style is set alongside it. So a bare list has no frame, and that is what this is: the
33
+ // frame used to sit here unconditionally, which made every list read as a card where
34
+ // libadwaita draws one only for `list.boxed-list` (_lists.scss:520) — `Adw.PreferencesGroup`
35
+ // carries that one, through `%card` (_preferences.scss:83), so nothing needed it here.
36
+ border-color: var(--border-color);
37
+
38
+ &.view:disabled {
39
+ color: var(--view-fg-color);
40
+ }
41
+ }
42
+
43
+ gtk-list-box-row {
44
+ display: block;
45
+ box-sizing: border-box;
46
+ background-clip: padding-box;
47
+ // `listview > row { padding: 2px }` (_lists.scss:16-19).
48
+ padding: 2px;
49
+
50
+ &.activatable {
51
+ cursor: pointer;
52
+ }
53
+
54
+ &:hover {
55
+ background-color: color-mix(in srgb, currentColor 4%, transparent);
56
+ }
57
+
58
+ &:active {
59
+ background-color: color-mix(in srgb, currentColor 8%, transparent);
60
+ }
61
+
62
+ // `row &:selected { background-color: $view_selected_color }` (_lists.scss:92-94), with the
63
+ // hover and active shades over it (_lists.scss:83-89).
64
+ &.selected {
65
+ background-color: color-mix(in srgb, var(--accent-bg-color) 25%, transparent);
66
+ }
67
+
68
+ &.selected:hover {
69
+ background-color: color-mix(in srgb, var(--accent-bg-color) 40%, transparent);
70
+ }
71
+
72
+ &.selected:active {
73
+ background-color: color-mix(in srgb, var(--accent-bg-color) 50%, transparent);
74
+ }
75
+
76
+ &:focus-visible {
77
+ outline: 2px solid var(--accent-color);
78
+ outline-offset: -2px;
79
+ }
80
+ }
81
+
82
+ // `.separators` is the class GTK adds for `show-separators` (gtklistbox.c:4127-4134), and the
83
+ // rule goes on every row but the last — upstream `> row:not(.separator)`, and a
84
+ // `<gtk-separator>` row is not one, so the port's `:last-child` is the same exclusion without
85
+ // giving the separator a class GTK would then have to know about.
86
+ gtk-list-box.separators > gtk-list-box-row:not(:last-child) {
87
+ border-bottom: 1px solid var(--border-color);
88
+ }
@@ -0,0 +1,96 @@
1
+ // _list_view.scss — <gtk-list-view>, and the ROW rules its two relatives reuse.
2
+ //
3
+ // UNSCOPED on purpose: `gridview > child` and `columnview > listview > row` are the same
4
+ // selectable, activatable surface as `listview > row`, and upstream writes them as one
5
+ // set of colours in `_lists.scss` and `_views.scss`. The shared half is the
6
+ // `adw-list-selectable` MIXIN below, which `_grid_view.scss` and `_column_view.scss`
7
+ // include rather than restate — the hover/active/selected quartet is four colours per
8
+ // state and a drifted copy is four wrong ones. A mixin and not a `%placeholder`: a
9
+ // placeholder extended across a `@use` boundary emits into the module that DECLARED it,
10
+ // which would put the grid's and the column view's selectors inside this file's output.
11
+ //
12
+ // The colour tokens are libadwaita's own, spelled with this package's variables:
13
+ // `$view_hover_color` is `currentColor 4%`, `$view_active_color` `currentColor 8%` and
14
+ // `$view_selected_color` `var(--accent-bg-color) 25%` (_colors.scss:274-276).
15
+ //
16
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_lists.scss:5-45, 74-95 (listview, row)
17
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_views.scss:47-50 (rubberband)
18
+ // Reference: refs/libadwaita/src/stylesheet/_colors.scss:263-276 (the four tokens)
19
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
20
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
21
+
22
+ // The hover / active / selected quartet every item surface in the three views wears.
23
+ @mixin adw-list-selectable {
24
+ background-clip: padding-box;
25
+
26
+ &:hover {
27
+ background-color: color-mix(in srgb, currentColor 4%, transparent);
28
+ }
29
+
30
+ &:active {
31
+ background-color: color-mix(in srgb, currentColor 8%, transparent);
32
+ }
33
+
34
+ &.selected {
35
+ background-color: color-mix(in srgb, var(--accent-bg-color) 25%, transparent);
36
+ }
37
+
38
+ &:focus-visible {
39
+ outline: 2px solid var(--accent-color);
40
+ outline-offset: -2px;
41
+ }
42
+ }
43
+
44
+ // The band is positioned against the row container, which is why every view's row
45
+ // container is a containing block.
46
+ .adw-rubberband {
47
+ position: absolute;
48
+ border: 1px solid var(--accent-color);
49
+ background-color: color-mix(in srgb, var(--accent-color) 20%, transparent);
50
+ pointer-events: none;
51
+ }
52
+
53
+ // The node a factory's label lands in, in all three views.
54
+ .adw-list-item-label {
55
+ display: block;
56
+ overflow: hidden;
57
+ text-overflow: ellipsis;
58
+ white-space: nowrap;
59
+ }
60
+
61
+ gtk-list-view {
62
+ display: block;
63
+ box-sizing: border-box;
64
+ color: var(--view-fg-color);
65
+ background-color: var(--view-bg-color);
66
+ background-clip: padding-box;
67
+
68
+ .adw-list-view-rows {
69
+ // `position: relative` is the rubber band's containing block, not decoration.
70
+ position: relative;
71
+ display: flex;
72
+ flex-direction: column;
73
+ }
74
+
75
+ &.horizontal .adw-list-view-rows {
76
+ flex-direction: row;
77
+ }
78
+
79
+ .adw-list-view-row {
80
+ @include adw-list-selectable;
81
+
82
+ // `listview > row { padding: 2px }` (_lists.scss:16-19).
83
+ padding: 2px;
84
+ box-sizing: border-box;
85
+ }
86
+
87
+ // `.separators` is the class GTK adds for `show-separators`; upstream draws the rule on
88
+ // the BOTTOM of every row but the separator itself, and on the LEFT when horizontal.
89
+ &.separators:not(.horizontal) .adw-list-view-row:not(:last-child) {
90
+ border-bottom: 1px solid var(--border-color);
91
+ }
92
+
93
+ &.separators.horizontal .adw-list-view-row:not(:last-child) {
94
+ border-right: 1px solid var(--border-color);
95
+ }
96
+ }
@@ -0,0 +1,139 @@
1
+ // _media_controls.scss — <gtk-media-controls>: a box of six pixels' spacing, two labels in
2
+ // tabular figures, and a range input.
3
+ //
4
+ // libadwaita has NO `_media-controls.scss`. `GtkMediaControls` is styled only through the
5
+ // `.osd` and `.bottom` classes `ui/gtkvideo.ui` puts on it, which is what `_video.scss` has
6
+ // already spent itself on: the `%osd` surface (_common.scss:43-60) and the 12px padding a
7
+ // standalone OSD toolbar takes (_toolbars.scss:96-100). So this partial is the C's layout
8
+ // and nothing else — the six numbers below are all the template says.
9
+ //
10
+ // THE TEMPLATE'S `spacing` 6 IS THE ONLY LAYOUT PROPERTY THAT SURVIVES.
11
+ // `box { spacing: 6 }` in `ui/gtkmediacontrols.ui` becomes the gap between the play button,
12
+ // the time box and the volume button. Nothing else in the template is a spacing: the time
13
+ // box has none of its own, and the labels sit against the scale with no gap at all, which is
14
+ // why `gap` is applied to the OUTER box only.
15
+ //
16
+ // `font-variant-numeric: tabular-nums` IS BOTH LABELS' `font-features "tnum=1"`. That
17
+ // attribute on each label (`ui/gtkmediacontrols.ui`) is the only reason the class exists, and
18
+ // it is load-bearing rather than cosmetic: a position counting 9→10 must not change the
19
+ // width of the string, or the seek scale beside it shifts sideways once a second. The same
20
+ // declaration `_labels.scss` applies to the `.numeric` utility class reaches a
21
+ // `Gtk.Label`; this widget's labels are spans of the element's own tree, so the class is
22
+ // applied here.
23
+ //
24
+ // THE SEEK SCALE IS `<input type="range">` WITH GTK'S ADJUSTMENT SPELLED OUT.
25
+ // `time_adjustment` is `upper` 10, `step-increment` 1, `page-increment` 10
26
+ // (`ui/gtkmediacontrols.ui`), and every real duration arrives by resetting the adjustment's
27
+ // range to the media's own — so `min` 0, `max` the duration in seconds and `step` 1 second.
28
+ // `page-increment` 10 has no HTML equivalent: a range input's Page key moves by ten STEPS,
29
+ // not by ten units, which is a different thing and cannot be made to agree. That is the one
30
+ // adjustment property that does not survive, and it is worth naming rather than leaving to be
31
+ // discovered.
32
+ //
33
+ // THE VOLUME SLIDE IS THE OTHER ADJUSTMENT, AND IT IS A DIFFERENT SHAPE.
34
+ // `volume_adjustment` is `upper` 1, `step-increment` 0.1, `page-increment` 1, `value` 1 —
35
+ // full scale in tenths — so `min` 0, `max` 1, `step` 0.1. It lives in the volume button's
36
+ // popover because `GtkVolumeButton` IS a menu button with an adjustment popover; the
37
+ // popover surface is `_popovers.scss`'s, reused through the `.adw-popover` class rather than
38
+ // restated here.
39
+ //
40
+ // `.insensitive` IS THE TEMPLATE'S `sensitive` 0. `ui/gtkmediacontrols.ui` sets it on the
41
+ // whole box, and `gtk_media_controls_set_sensitive` is what re-enables it — so a controls
42
+ // bar with no stream attached is inert, which is the state the element renders by default.
43
+ // GTK's `:disabled` opacity is `_buttons.scss`'s `$disabled-opacity`, and the same token is
44
+ // used here for the whole bar rather than per button, because in the C the insensitivity is
45
+ // the CONTAINER's.
46
+ //
47
+ // Reference: refs/gtk/gtk/ui/gtkmediacontrols.ui (the node tree and both adjustments)
48
+ // Reference: refs/libadwaita/src/stylesheet/_common.scss:43-60 (`%osd`, applied by
49
+ // `_video.scss`), widgets/_toolbars.scss:96-100 (the `.osd` toolbar's 12px padding)
50
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_buttons.scss (`:disabled` opacity)
51
+ // Copyright (c) The GTK Team. LGPLv2.1+.
52
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
53
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
54
+
55
+ gtk-media-controls {
56
+ display: flex;
57
+ align-items: center;
58
+ color: var(--window-fg-color);
59
+
60
+ // `box { sensitive: 0; spacing: 6 }` (ui/gtkmediacontrols.ui).
61
+ gap: 6px;
62
+
63
+ // `gtk_media_controls_set_sensitive` — the container's own insensitivity, which is where
64
+ // the template puts it. Same token `_buttons.scss` uses for a `:disabled` button.
65
+ &.insensitive,
66
+ &:disabled {
67
+ opacity: var(--disabled-opacity);
68
+ }
69
+
70
+ .adw-media-controls-box {
71
+ display: flex;
72
+ flex: 1;
73
+ gap: 6px;
74
+ align-items: center;
75
+ min-width: 0;
76
+ }
77
+
78
+ // `play_button` is a `GtkButton` with `has-frame` 0 — a flat button — and so is the
79
+ // `volume_button` beside it. `.adw-flat` is this package's flat-button class; `_button.scss`
80
+ // owns the shape, and nothing here restates it.
81
+ .adw-media-controls-button {
82
+ flex-shrink: 0;
83
+ }
84
+
85
+ // `time_box` — the middle `GtkBox`, `hexpand` on the scale inside it.
86
+ .adw-media-controls-time-box {
87
+ display: flex;
88
+ flex: 1;
89
+ align-items: center;
90
+ min-width: 0;
91
+ }
92
+
93
+ // BOTH labels' `font-features "tnum=1"` (ui/gtkmediacontrols.ui). Tabular figures, so a
94
+ // position counting 9→10 does not resize its own string and shift the scale sideways.
95
+ .adw-media-controls-time-label,
96
+ .adw-media-controls-duration-label {
97
+ // `font-variant-numeric: tabular-nums` is a UTILITY class on a label in libadwaita
98
+ // (`_labels.scss`); it is applied here directly because these are spans of this element's
99
+ // own tree rather than `<gtk-label>`s a consumer styled.
100
+ font-variant-numeric: tabular-nums;
101
+ // The two labels must never be squeezed: they are the numbers the seek bar is read
102
+ // against, and a truncated `-1:02:03` is worse than a narrower scale.
103
+ flex-shrink: 0;
104
+ padding: 0 2px;
105
+ }
106
+
107
+ // `seek_scale` — the `GtkScale`, `hexpand` 1 and `restrict-to-fill-level` 0.
108
+ .adw-media-controls-seek-scale {
109
+ flex: 1;
110
+ min-width: 0;
111
+ accent-color: var(--accent-color);
112
+ }
113
+
114
+ // The volume button is a POSITIONING context for its own popover, which is what makes the
115
+ // surface sit below the button rather than beside the bar — `GtkVolumeButton` is a
116
+ // `GtkMenuButton`, so the surface hangs off its anchor.
117
+ .adw-media-controls-volume-button {
118
+ position: relative;
119
+ }
120
+
121
+ // `<gtk-popover>` is this package's ONE popover surface and `_popover.scss`'s header says
122
+ // why: three hand-rolled copies of the plate disagreed with libadwaita and with each
123
+ // other before it was lifted out. So the volume slide goes in a real one and this partial
124
+ // states nothing about its shape — only that it hangs from the button and does not take
125
+ // clicks meant for the slide.
126
+ .adw-media-controls-volume-popover {
127
+ top: calc(100% + 6px);
128
+ left: 50%;
129
+ // `_popover.scss`'s own `$popover-gap`, restated here rather than imported: the gap is
130
+ // the DISTANCE from anchor to surface, which is a property of the anchor's positioning
131
+ // and belongs to the widget that owns the anchor.
132
+ transform: translateX(-50%);
133
+ }
134
+
135
+ .adw-media-controls-volume-scale {
136
+ width: 120px;
137
+ accent-color: var(--accent-color);
138
+ }
139
+ }
@@ -0,0 +1,68 @@
1
+ // _overlay.scss — <gtk-overlay>: a main child, and siblings stacked on top of it.
2
+ //
3
+ // libadwaita has NO `_overlay.scss`: `grep` over `src/stylesheet/widgets/` finds no
4
+ // `overlay` node rule, because an overlay draws nothing of its own — GTK's whole CSS
5
+ // node contract for it is the `overlay` name plus the `.left` / `.right` / `.top` /
6
+ // `.bottom` classes an edge-aligned child is given (gtkoverlay.c:66-71). So this partial
7
+ // is LAYOUT, not a look, and the geometry it encodes is `gtk_overlay_get_child_position`
8
+ // (gtkoverlay.c:130-196) rather than a style.
9
+ //
10
+ // · `.adw-overlay-child` is `display: contents` so the main child is laid out as a
11
+ // DIRECT child of the host and the overlay takes its size — which is exactly
12
+ // gtk_overlay_compute_expand and the "sizes are those of its main child" rule
13
+ // (gtkoverlay.c:56-58, :291-308). A wrapper that generated a box would put a
14
+ // layout node between the overlay and the child, and the child's own `hexpand`
15
+ // would have to be re-implemented here.
16
+ // · `.adw-overlay-layer` is the box an overlay child is placed in. `inset: 0` over
17
+ // the whole host is the C's `graphene_rect_init (&bounds, 0, 0, width, height)`
18
+ // (gtkoverlay.c:214-216), and `display: flex` is what lets a child's own
19
+ // `[halign]` / `[valign]` auto-margin rules place it — `gtk_overlay_get_child_position`
20
+ // reads nothing but those two properties.
21
+ // · `align-items: stretch` is `GTK_ALIGN_FILL` on the cross axis, the default for
22
+ // `GtkWidget:valign`. A child that names a `valign` carries an auto cross margin,
23
+ // and a flex item with an auto cross margin does NOT stretch (CSS Flexbox § 9.4),
24
+ // which is precisely the branch the C takes for START, CENTER and END.
25
+ // · `pointer-events: none`, re-enabled per child: GTK hands an event to the widget
26
+ // whose allocation contains it, so an overlay child that is smaller than the overlay
27
+ // must not make the main child unreachable underneath it.
28
+ //
29
+ // The `:not([halign])` guard on the main axis is the whole of `GTK_ALIGN_FILL` there —
30
+ // `flex-grow` WITHOUT it would be cancelled by the auto margin `_widget.scss` gives a
31
+ // child that names an alignment, since free space is handed to flex-grow first and only
32
+ // the remainder reaches an auto margin. Specificity has to beat `_widget.scss`'s
33
+ // `[halign='start']` (0,1,0), which `:not([halign])` lifts this rule to.
34
+ //
35
+ // Reference: refs/gtk/gtk/gtkoverlay.c (get_child_position, the `overlay` CSS node)
36
+ // Reference: refs/gtk/gtk/gtkoverlaylayout.c (gtk_overlay_child_allocate, clip bounds)
37
+ // Copyright (c) The GTK Team. LGPLv2.1+.
38
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
39
+
40
+ gtk-overlay {
41
+ display: block;
42
+ position: relative;
43
+ }
44
+
45
+ .adw-overlay-child {
46
+ // The main child, in the host's own flow — see the header.
47
+ display: contents;
48
+ }
49
+
50
+ .adw-overlay-layer {
51
+ position: absolute;
52
+ inset: 0;
53
+ display: flex;
54
+ align-items: stretch;
55
+ justify-content: flex-start;
56
+ pointer-events: none;
57
+
58
+ > * {
59
+ // GTK delivers an event to the widget whose ALLOCATION it lands in (gtkoverlay.c:150-193),
60
+ // so only the overlay child's own box takes input.
61
+ pointer-events: auto;
62
+ }
63
+
64
+ // GTK_ALIGN_FILL on the main axis: the child grows to the overlay's whole allocation.
65
+ > *:not([halign]) {
66
+ flex: 1 1 auto;
67
+ }
68
+ }