@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.
- package/README.md +8 -0
- package/dist/adwaita-web.css +8146 -3011
- package/dist/adwaita-web.css.map +1 -1
- package/lib/types/adw-application-window.spec.d.ts +1 -0
- package/lib/types/adw-bin.spec.d.ts +1 -0
- package/lib/types/adw-breakpoint-bin.spec.d.ts +1 -0
- package/lib/types/adw-clamp-scrollable.spec.d.ts +1 -0
- package/lib/types/adw-multi-layout-view.spec.d.ts +1 -0
- package/lib/types/adw-preferences-row.spec.d.ts +1 -0
- package/lib/types/adw-shortcuts.spec.d.ts +1 -0
- package/lib/types/adw-status-page.spec.d.ts +1 -0
- package/lib/types/adw-tab-bar.spec.d.ts +1 -0
- package/lib/types/adw-tab-button.spec.d.ts +1 -0
- package/lib/types/adw-tab-overview.spec.d.ts +1 -0
- package/lib/types/adw-view-switcher-sidebar.spec.d.ts +1 -0
- package/lib/types/adw-window.spec.d.ts +1 -0
- package/lib/types/attributes.d.ts +19 -0
- package/lib/types/breakpoints.d.ts +14 -3
- package/lib/types/construct-vectors.spec.d.ts +1 -0
- package/lib/types/elements/adw-action-row.d.ts +4 -0
- package/lib/types/elements/adw-application-window.d.ts +27 -0
- package/lib/types/elements/adw-bin.d.ts +17 -0
- package/lib/types/elements/adw-breakpoint-bin.d.ts +67 -0
- package/lib/types/elements/adw-clamp-scrollable.d.ts +38 -0
- package/lib/types/elements/adw-combo-row.d.ts +4 -0
- package/lib/types/elements/adw-dialog.d.ts +10 -0
- package/lib/types/elements/adw-entry-row.d.ts +6 -0
- package/lib/types/elements/adw-expander-row.d.ts +2 -0
- package/lib/types/elements/adw-header-bar.d.ts +6 -0
- package/lib/types/elements/adw-layout-slot.d.ts +19 -0
- package/lib/types/elements/adw-multi-layout-view.d.ts +101 -0
- package/lib/types/elements/adw-overlay-split-view.d.ts +13 -0
- package/lib/types/elements/adw-preferences-row.d.ts +31 -0
- package/lib/types/elements/adw-shortcuts-dialog.d.ts +13 -0
- package/lib/types/elements/adw-shortcuts-item.d.ts +36 -0
- package/lib/types/elements/adw-shortcuts-section.d.ts +14 -0
- package/lib/types/elements/adw-sidebar.d.ts +8 -2
- package/lib/types/elements/adw-spin-row.d.ts +6 -0
- package/lib/types/elements/adw-switch-row.d.ts +7 -0
- package/lib/types/elements/adw-tab-bar.d.ts +108 -0
- package/lib/types/elements/adw-tab-button.d.ts +32 -0
- package/lib/types/elements/adw-tab-overview.d.ts +199 -0
- package/lib/types/elements/adw-tab-view.d.ts +19 -23
- package/lib/types/elements/adw-toggle-group.d.ts +17 -0
- package/lib/types/elements/adw-view-switcher-sidebar.d.ts +84 -0
- package/lib/types/elements/adw-window.d.ts +40 -0
- package/lib/types/elements/gtk-about-dialog.d.ts +146 -0
- package/lib/types/elements/gtk-application-window.d.ts +34 -0
- package/lib/types/elements/gtk-aspect-frame.d.ts +27 -0
- package/lib/types/elements/gtk-button.d.ts +9 -0
- package/lib/types/elements/gtk-calendar.d.ts +159 -0
- package/lib/types/elements/gtk-center-box.d.ts +39 -0
- package/lib/types/elements/gtk-color-dialog-button.d.ts +69 -0
- package/lib/types/elements/gtk-column-view.d.ts +50 -0
- package/lib/types/elements/gtk-drag-icon.d.ts +78 -0
- package/lib/types/elements/gtk-drawing-area.d.ts +95 -0
- package/lib/types/elements/gtk-editable-label.d.ts +33 -0
- package/lib/types/elements/gtk-emoji-chooser.d.ts +84 -0
- package/lib/types/elements/gtk-entry.d.ts +20 -1
- package/lib/types/elements/gtk-expander.d.ts +49 -0
- package/lib/types/elements/gtk-fixed.d.ts +13 -0
- package/lib/types/elements/gtk-flow-box-child.d.ts +14 -0
- package/lib/types/elements/gtk-flow-box.d.ts +87 -0
- package/lib/types/elements/gtk-font-dialog-button.d.ts +83 -0
- package/lib/types/elements/gtk-frame.d.ts +24 -0
- package/lib/types/elements/gtk-gl-area.d.ts +136 -0
- package/lib/types/elements/gtk-graphics-offload.d.ts +24 -0
- package/lib/types/elements/gtk-grid-view.d.ts +39 -0
- package/lib/types/elements/gtk-grid.d.ts +27 -0
- package/lib/types/elements/gtk-header-bar.d.ts +60 -0
- package/lib/types/elements/gtk-inscription.d.ts +64 -0
- package/lib/types/elements/gtk-label.d.ts +3 -0
- package/lib/types/elements/gtk-level-bar.d.ts +59 -0
- package/lib/types/elements/gtk-link-button.d.ts +29 -0
- package/lib/types/elements/gtk-list-box-row.d.ts +54 -0
- package/lib/types/elements/gtk-list-box.d.ts +100 -0
- package/lib/types/elements/gtk-list-view.d.ts +73 -0
- package/lib/types/elements/gtk-media-controls.d.ts +142 -0
- package/lib/types/elements/gtk-notebook.d.ts +148 -0
- package/lib/types/elements/gtk-overlay.d.ts +22 -0
- package/lib/types/elements/gtk-page-setup-unix-dialog.d.ts +87 -0
- package/lib/types/elements/gtk-paned.d.ts +121 -0
- package/lib/types/elements/gtk-password-entry.d.ts +27 -0
- package/lib/types/elements/gtk-picture.d.ts +66 -0
- package/lib/types/elements/gtk-popover-bin.d.ts +82 -0
- package/lib/types/elements/gtk-popover-menu-bar.d.ts +66 -0
- package/lib/types/elements/gtk-popover-menu.d.ts +83 -0
- package/lib/types/elements/gtk-popover.d.ts +28 -3
- package/lib/types/elements/gtk-print-unix-dialog.d.ts +167 -0
- package/lib/types/elements/gtk-revealer.d.ts +55 -0
- package/lib/types/elements/gtk-scale-button.d.ts +59 -0
- package/lib/types/elements/gtk-scale.d.ts +98 -0
- package/lib/types/elements/gtk-scrollbar.d.ts +124 -0
- package/lib/types/elements/gtk-scrolled-window.d.ts +129 -0
- package/lib/types/elements/gtk-search-bar.d.ts +39 -0
- package/lib/types/elements/gtk-search-entry.d.ts +27 -0
- package/lib/types/elements/gtk-separator.d.ts +10 -0
- package/lib/types/elements/gtk-spin-button.d.ts +94 -0
- package/lib/types/elements/gtk-spinner.d.ts +14 -0
- package/lib/types/elements/gtk-stack-sidebar.d.ts +43 -0
- package/lib/types/elements/gtk-stack-switcher.d.ts +58 -0
- package/lib/types/elements/gtk-stack.d.ts +154 -0
- package/lib/types/elements/gtk-switch.d.ts +4 -1
- package/lib/types/elements/gtk-text-view.d.ts +62 -0
- package/lib/types/elements/gtk-text.d.ts +45 -0
- package/lib/types/elements/gtk-toggle-button.d.ts +45 -0
- package/lib/types/elements/gtk-tree-expander.d.ts +38 -0
- package/lib/types/elements/gtk-video.d.ts +97 -0
- package/lib/types/elements/gtk-viewport.d.ts +84 -0
- package/lib/types/elements/gtk-window-controls.d.ts +80 -0
- package/lib/types/elements/gtk-window-handle.d.ts +39 -0
- package/lib/types/elements/gtk-window.d.ts +103 -0
- package/lib/types/elements/justification.d.ts +2 -0
- package/lib/types/elements/popover-menu.d.ts +18 -0
- package/lib/types/elements/roving-focus.d.ts +29 -1
- package/lib/types/emoji-data.d.ts +38 -0
- package/lib/types/font-description.d.ts +96 -0
- package/lib/types/gtk-about-dialog.spec.d.ts +1 -0
- package/lib/types/gtk-action-bar.spec.d.ts +1 -0
- package/lib/types/gtk-application-window.spec.d.ts +1 -0
- package/lib/types/gtk-aspect-frame.spec.d.ts +1 -0
- package/lib/types/gtk-calendar.spec.d.ts +1 -0
- package/lib/types/gtk-center-box.spec.d.ts +1 -0
- package/lib/types/gtk-color-dialog-button.spec.d.ts +1 -0
- package/lib/types/gtk-column-view.spec.d.ts +1 -0
- package/lib/types/gtk-drag-icon.spec.d.ts +1 -0
- package/lib/types/gtk-drawing-area.spec.d.ts +1 -0
- package/lib/types/gtk-editable-label.spec.d.ts +1 -0
- package/lib/types/gtk-emoji-chooser.spec.d.ts +1 -0
- package/lib/types/gtk-expander.spec.d.ts +1 -0
- package/lib/types/gtk-fixed.spec.d.ts +1 -0
- package/lib/types/gtk-flow-box.spec.d.ts +1 -0
- package/lib/types/gtk-font-dialog-button.spec.d.ts +1 -0
- package/lib/types/gtk-frame.spec.d.ts +1 -0
- package/lib/types/gtk-gl-area.spec.d.ts +1 -0
- package/lib/types/gtk-graphics-offload.spec.d.ts +1 -0
- package/lib/types/gtk-grid-view.spec.d.ts +1 -0
- package/lib/types/gtk-grid.spec.d.ts +1 -0
- package/lib/types/gtk-header-bar.spec.d.ts +1 -0
- package/lib/types/gtk-inscription.spec.d.ts +1 -0
- package/lib/types/gtk-level-bar.spec.d.ts +1 -0
- package/lib/types/gtk-link-button.spec.d.ts +1 -0
- package/lib/types/gtk-list-box.spec.d.ts +1 -0
- package/lib/types/gtk-list-view.spec.d.ts +1 -0
- package/lib/types/gtk-media-controls.spec.d.ts +1 -0
- package/lib/types/gtk-notebook.spec.d.ts +1 -0
- package/lib/types/gtk-overlay.spec.d.ts +1 -0
- package/lib/types/gtk-paned.spec.d.ts +1 -0
- package/lib/types/gtk-password-entry.spec.d.ts +1 -0
- package/lib/types/gtk-picture.spec.d.ts +1 -0
- package/lib/types/gtk-popover-bin.spec.d.ts +1 -0
- package/lib/types/gtk-popover-menu-bar.spec.d.ts +1 -0
- package/lib/types/gtk-popover-menu.spec.d.ts +1 -0
- package/lib/types/gtk-popover-role.spec.d.ts +1 -0
- package/lib/types/gtk-popover.spec.d.ts +1 -0
- package/lib/types/gtk-print-dialogs.spec.d.ts +1 -0
- package/lib/types/gtk-revealer.spec.d.ts +1 -0
- package/lib/types/gtk-scale-button.spec.d.ts +1 -0
- package/lib/types/gtk-scale.spec.d.ts +1 -0
- package/lib/types/gtk-scrollbar.spec.d.ts +1 -0
- package/lib/types/gtk-scrolled-window.spec.d.ts +1 -0
- package/lib/types/gtk-search-bar.spec.d.ts +1 -0
- package/lib/types/gtk-search-entry.spec.d.ts +1 -0
- package/lib/types/gtk-separator.spec.d.ts +1 -0
- package/lib/types/gtk-spin-button.spec.d.ts +1 -0
- package/lib/types/gtk-spinner.spec.d.ts +1 -0
- package/lib/types/gtk-stack-sidebar.spec.d.ts +1 -0
- package/lib/types/gtk-stack-switcher.spec.d.ts +1 -0
- package/lib/types/gtk-stack.spec.d.ts +1 -0
- package/lib/types/gtk-text-view.spec.d.ts +1 -0
- package/lib/types/gtk-text.spec.d.ts +1 -0
- package/lib/types/gtk-toggle-button.spec.d.ts +1 -0
- package/lib/types/gtk-tree-expander.spec.d.ts +1 -0
- package/lib/types/gtk-video.spec.d.ts +1 -0
- package/lib/types/gtk-viewport.spec.d.ts +1 -0
- package/lib/types/gtk-window-controls.spec.d.ts +1 -0
- package/lib/types/gtk-window-handle.spec.d.ts +1 -0
- package/lib/types/gtk-window.spec.d.ts +1 -0
- package/lib/types/index.d.ts +4 -1
- package/lib/types/list-view-dom.d.ts +44 -0
- package/lib/types/namespace/adw.d.ts +12 -0
- package/lib/types/namespace/gtk.d.ts +61 -0
- package/lib/types/page-setup.d.ts +100 -0
- package/lib/types/row-line-clamp.d.ts +20 -0
- package/lib/types/row-tooltip.d.ts +8 -0
- package/lib/types/row-tooltip.spec.d.ts +1 -0
- package/lib/types/scroll-shading.d.ts +15 -1
- package/lib/types/shared-tree-builder.d.ts +75 -17
- package/lib/types/shared-tree-mount.spec.d.ts +1 -0
- package/lib/types/signals.d.ts +4 -0
- package/lib/types/styles.generated.d.ts +1 -1
- package/lib/types/tab-chip.d.ts +73 -0
- package/lib/types/template-classes.d.ts +11 -0
- package/lib/types/widget-size.spec.d.ts +1 -0
- package/package.json +12 -8
- package/scss/_action_row.scss +41 -17
- package/scss/_application_window.scss +26 -0
- package/scss/_aspect_frame.scss +25 -0
- package/scss/_bin.scss +26 -0
- package/scss/_button.scss +45 -0
- package/scss/_button_row.scss +5 -0
- package/scss/_calendar.scss +176 -0
- package/scss/_center_box.scss +25 -0
- package/scss/_checks.scss +6 -1
- package/scss/_clamp_scrollable.scss +28 -0
- package/scss/_color_button.scss +67 -0
- package/scss/_column_view.scss +126 -0
- package/scss/_drag_icon.scss +55 -0
- package/scss/_drawing.scss +85 -0
- package/scss/_emoji_chooser.scss +213 -0
- package/scss/_entry.scss +13 -5
- package/scss/_entry_row.scss +1 -1
- package/scss/_expander.scss +113 -0
- package/scss/_expander_row.scss +36 -3
- package/scss/_fixed.scss +29 -0
- package/scss/_flow_box.scss +94 -0
- package/scss/_font_button.scss +63 -0
- package/scss/_frame.scss +41 -0
- package/scss/_grid.scss +19 -0
- package/scss/_grid_view.scss +46 -0
- package/scss/_gtk_about_dialog.scss +186 -0
- package/scss/_headerbar.scss +134 -1
- package/scss/_icons.generated.scss +186 -0
- package/scss/_inscription.scss +125 -0
- package/scss/_level_bar.scss +190 -0
- package/scss/_link.scss +82 -0
- package/scss/_list_box.scss +88 -0
- package/scss/_list_view.scss +96 -0
- package/scss/_media_controls.scss +139 -0
- package/scss/_overlay.scss +68 -0
- package/scss/_paned.scss +130 -0
- package/scss/_password_entry.scss +83 -0
- package/scss/_picture.scss +80 -0
- package/scss/_popover_bin.scss +53 -0
- package/scss/_popover_menu_bar.scss +104 -0
- package/scss/_preferences_row.scss +60 -0
- package/scss/_print_dialogs.scss +328 -0
- package/scss/_reset.scss +21 -19
- package/scss/_revealer.scss +37 -0
- package/scss/_row.scss +36 -5
- package/scss/_scale.scss +298 -0
- package/scss/_scale_button.scss +167 -0
- package/scss/_scrollbar.scss +230 -0
- package/scss/_scrolled_window.scss +131 -0
- package/scss/_search_bar.scss +118 -0
- package/scss/_search_entry.scss +86 -0
- package/scss/_separator.scss +44 -0
- package/scss/_shortcuts_dialog.scss +100 -0
- package/scss/_spin_button.scss +172 -0
- package/scss/_spin_row.scss +56 -8
- package/scss/_spinner.scss +85 -4
- package/scss/_stack.scss +729 -0
- package/scss/_status_page.scss +1 -1
- package/scss/_switch.scss +13 -5
- package/scss/_switch_row.scss +10 -0
- package/scss/_tab_bar.scss +317 -0
- package/scss/_tab_button.scss +98 -0
- package/scss/_tab_overview.scss +483 -0
- package/scss/_text.scss +182 -0
- package/scss/_theme.scss +1 -1
- package/scss/_toggle_group.scss +28 -0
- package/scss/_tree_expander.scss +62 -0
- package/scss/_variables.scss +1 -1
- package/scss/_video.scss +146 -0
- package/scss/_view_switcher_sidebar.scss +112 -0
- package/scss/_viewport.scss +50 -0
- package/scss/_widget.scss +14 -3
- package/scss/_window.scss +131 -2
- package/scss/_window_handle.scss +20 -0
- package/scss/adwaita-skin.scss +109 -0
- package/src/adw-action-rows.spec.ts +331 -0
- package/src/adw-application-window.spec.ts +118 -0
- package/src/adw-bin.spec.ts +75 -0
- package/src/adw-breakpoint-bin.spec.ts +324 -0
- package/src/adw-clamp-scrollable.spec.ts +189 -0
- package/src/adw-header-bar.spec.ts +18 -0
- package/src/adw-multi-layout-view.spec.ts +243 -0
- package/src/adw-preferences-row.spec.ts +164 -0
- package/src/adw-row-state.spec.ts +142 -0
- package/src/adw-shortcuts.spec.ts +155 -0
- package/src/adw-status-page.spec.ts +124 -0
- package/src/adw-tab-bar.spec.ts +287 -0
- package/src/adw-tab-button.spec.ts +101 -0
- package/src/adw-tab-overview.spec.ts +443 -0
- package/src/adw-view-switcher-sidebar.spec.ts +281 -0
- package/src/adw-window.spec.ts +129 -0
- package/src/attributes.ts +52 -0
- package/src/breakpoints.ts +25 -8
- package/src/capabilities.d.mts +3 -0
- package/src/capabilities.mjs +21 -0
- package/src/connect-lifecycle.spec.ts +12 -0
- package/src/construct-vectors.spec.ts +175 -0
- package/src/elements/adw-action-row.ts +31 -2
- package/src/elements/adw-alert-dialog.ts +4 -1
- package/src/elements/adw-application-window.ts +154 -0
- package/src/elements/adw-bin.ts +101 -0
- package/src/elements/adw-breakpoint-bin.ts +287 -0
- package/src/elements/adw-button-row.ts +7 -1
- package/src/elements/adw-clamp-scrollable.ts +207 -0
- package/src/elements/adw-combo-row.ts +26 -1
- package/src/elements/adw-dialog.ts +19 -0
- package/src/elements/adw-entry-row.ts +22 -12
- package/src/elements/adw-expander-row.ts +34 -1
- package/src/elements/adw-header-bar.ts +18 -4
- package/src/elements/adw-layout-slot.ts +95 -0
- package/src/elements/adw-multi-layout-view.ts +326 -0
- package/src/elements/adw-overlay-split-view.ts +29 -6
- package/src/elements/adw-preferences-row.ts +153 -0
- package/src/elements/adw-shortcuts-dialog.ts +52 -0
- package/src/elements/adw-shortcuts-item.ts +171 -0
- package/src/elements/adw-shortcuts-section.ts +86 -0
- package/src/elements/adw-sidebar.ts +74 -7
- package/src/elements/adw-spin-row.ts +37 -2
- package/src/elements/adw-status-page.ts +10 -2
- package/src/elements/adw-switch-row.ts +53 -2
- package/src/elements/adw-tab-bar.ts +529 -0
- package/src/elements/adw-tab-button.ts +194 -0
- package/src/elements/adw-tab-overview.ts +1011 -0
- package/src/elements/adw-tab-view.ts +66 -145
- package/src/elements/adw-toggle-group.ts +138 -14
- package/src/elements/adw-view-stack.ts +18 -0
- package/src/elements/adw-view-switcher-sidebar.ts +332 -0
- package/src/elements/adw-window.ts +190 -11
- package/src/elements/checks.ts +35 -8
- package/src/elements/gtk-about-dialog.ts +811 -0
- package/src/elements/gtk-application-window.ts +108 -0
- package/src/elements/gtk-aspect-frame.ts +160 -0
- package/src/elements/gtk-button.ts +12 -0
- package/src/elements/gtk-calendar.ts +757 -0
- package/src/elements/gtk-center-box.ts +184 -0
- package/src/elements/gtk-color-dialog-button.ts +278 -0
- package/src/elements/gtk-column-view.ts +320 -0
- package/src/elements/gtk-drag-icon.ts +257 -0
- package/src/elements/gtk-drawing-area.ts +303 -0
- package/src/elements/gtk-editable-label.ts +204 -0
- package/src/elements/gtk-emoji-chooser.ts +542 -0
- package/src/elements/gtk-entry.ts +39 -5
- package/src/elements/gtk-expander.ts +301 -0
- package/src/elements/gtk-fixed.ts +99 -0
- package/src/elements/gtk-flow-box-child.ts +68 -0
- package/src/elements/gtk-flow-box.ts +480 -0
- package/src/elements/gtk-font-dialog-button.ts +432 -0
- package/src/elements/gtk-frame.ts +174 -0
- package/src/elements/gtk-gl-area.ts +476 -0
- package/src/elements/gtk-graphics-offload.ts +130 -0
- package/src/elements/gtk-grid-view.ts +168 -0
- package/src/elements/gtk-grid.ts +127 -0
- package/src/elements/gtk-header-bar.ts +273 -0
- package/src/elements/gtk-inscription.ts +387 -0
- package/src/elements/gtk-label.ts +19 -11
- package/src/elements/gtk-level-bar.ts +323 -0
- package/src/elements/gtk-link-button.ts +138 -0
- package/src/elements/gtk-list-box-row.ts +195 -0
- package/src/elements/gtk-list-box.ts +413 -0
- package/src/elements/gtk-list-view.ts +370 -0
- package/src/elements/gtk-media-controls.ts +509 -0
- package/src/elements/gtk-notebook.ts +664 -0
- package/src/elements/gtk-overlay.ts +149 -0
- package/src/elements/gtk-page-setup-unix-dialog.ts +420 -0
- package/src/elements/gtk-paned.ts +597 -0
- package/src/elements/gtk-password-entry.ts +170 -0
- package/src/elements/gtk-picture.ts +254 -0
- package/src/elements/gtk-popover-bin.ts +332 -0
- package/src/elements/gtk-popover-menu-bar.ts +355 -0
- package/src/elements/gtk-popover-menu.ts +339 -0
- package/src/elements/gtk-popover.ts +92 -10
- package/src/elements/gtk-print-unix-dialog.ts +989 -0
- package/src/elements/gtk-progress-bar.ts +24 -11
- package/src/elements/gtk-revealer.ts +406 -0
- package/src/elements/gtk-scale-button.ts +358 -0
- package/src/elements/gtk-scale.ts +492 -0
- package/src/elements/gtk-scrollbar.ts +528 -0
- package/src/elements/gtk-scrolled-window.ts +653 -0
- package/src/elements/gtk-search-bar.ts +200 -0
- package/src/elements/gtk-search-entry.ts +172 -0
- package/src/elements/gtk-separator.ts +52 -0
- package/src/elements/gtk-spin-button.ts +475 -0
- package/src/elements/gtk-spinner.ts +126 -0
- package/src/elements/gtk-stack-sidebar.ts +212 -0
- package/src/elements/gtk-stack-switcher.ts +279 -0
- package/src/elements/gtk-stack.ts +748 -0
- package/src/elements/gtk-switch.ts +52 -19
- package/src/elements/gtk-text-view.ts +290 -0
- package/src/elements/gtk-text.ts +219 -0
- package/src/elements/gtk-toggle-button.ts +239 -0
- package/src/elements/gtk-tree-expander.ts +243 -0
- package/src/elements/gtk-video.ts +423 -0
- package/src/elements/gtk-viewport.ts +277 -0
- package/src/elements/gtk-window-controls.ts +341 -0
- package/src/elements/gtk-window-handle.ts +221 -0
- package/src/elements/gtk-window.ts +372 -0
- package/src/elements/justification.ts +24 -0
- package/src/elements/popover-menu.ts +24 -0
- package/src/elements/roving-focus.ts +53 -21
- package/src/emoji-data.ts +577 -0
- package/src/entry-rows.spec.ts +31 -0
- package/src/font-description.ts +238 -0
- package/src/gtk-about-dialog.spec.ts +250 -0
- package/src/gtk-action-bar.spec.ts +89 -0
- package/src/gtk-application-window.spec.ts +107 -0
- package/src/gtk-aspect-frame.spec.ts +114 -0
- package/src/gtk-calendar.spec.ts +589 -0
- package/src/gtk-center-box.spec.ts +125 -0
- package/src/gtk-color-dialog-button.spec.ts +141 -0
- package/src/gtk-column-view.spec.ts +154 -0
- package/src/gtk-drag-icon.spec.ts +190 -0
- package/src/gtk-drawing-area.spec.ts +211 -0
- package/src/gtk-editable-label.spec.ts +190 -0
- package/src/gtk-emoji-chooser.spec.ts +173 -0
- package/src/gtk-entry.spec.ts +23 -0
- package/src/gtk-expander.spec.ts +170 -0
- package/src/gtk-fixed.spec.ts +97 -0
- package/src/gtk-flow-box.spec.ts +289 -0
- package/src/gtk-font-dialog-button.spec.ts +166 -0
- package/src/gtk-frame.spec.ts +119 -0
- package/src/gtk-gl-area.spec.ts +361 -0
- package/src/gtk-graphics-offload.spec.ts +119 -0
- package/src/gtk-grid-view.spec.ts +106 -0
- package/src/gtk-grid.spec.ts +122 -0
- package/src/gtk-header-bar.spec.ts +202 -0
- package/src/gtk-inscription.spec.ts +235 -0
- package/src/gtk-level-bar.spec.ts +199 -0
- package/src/gtk-link-button.spec.ts +117 -0
- package/src/gtk-list-box.spec.ts +422 -0
- package/src/gtk-list-view.spec.ts +203 -0
- package/src/gtk-media-controls.spec.ts +295 -0
- package/src/gtk-notebook.spec.ts +546 -0
- package/src/gtk-overlay.spec.ts +141 -0
- package/src/gtk-paned.spec.ts +267 -0
- package/src/gtk-password-entry.spec.ts +150 -0
- package/src/gtk-picture.spec.ts +172 -0
- package/src/gtk-popover-bin.spec.ts +229 -0
- package/src/gtk-popover-menu-bar.spec.ts +296 -0
- package/src/gtk-popover-menu.spec.ts +261 -0
- package/src/gtk-popover-role.spec.ts +138 -0
- package/src/gtk-popover.spec.ts +264 -0
- package/src/gtk-print-dialogs.spec.ts +251 -0
- package/src/gtk-revealer.spec.ts +164 -0
- package/src/gtk-scale-button.spec.ts +218 -0
- package/src/gtk-scale.spec.ts +213 -0
- package/src/gtk-scrollbar.spec.ts +244 -0
- package/src/gtk-scrolled-window.spec.ts +262 -0
- package/src/gtk-search-bar.spec.ts +179 -0
- package/src/gtk-search-entry.spec.ts +142 -0
- package/src/gtk-separator.spec.ts +74 -0
- package/src/gtk-spin-button.spec.ts +186 -0
- package/src/gtk-spinner.spec.ts +130 -0
- package/src/gtk-stack-sidebar.spec.ts +217 -0
- package/src/gtk-stack-switcher.spec.ts +249 -0
- package/src/gtk-stack.spec.ts +432 -0
- package/src/gtk-text-view.spec.ts +189 -0
- package/src/gtk-text.spec.ts +163 -0
- package/src/gtk-toggle-button.spec.ts +186 -0
- package/src/gtk-tree-expander.spec.ts +201 -0
- package/src/gtk-video.spec.ts +240 -0
- package/src/gtk-viewport.spec.ts +140 -0
- package/src/gtk-window-controls.spec.ts +232 -0
- package/src/gtk-window-handle.spec.ts +158 -0
- package/src/gtk-window.spec.ts +202 -0
- package/src/index.ts +9 -1
- package/src/keyboard-operable.spec.ts +77 -9
- package/src/list-view-dom.ts +121 -0
- package/src/namespace/adw.ts +12 -0
- package/src/namespace/gtk.ts +61 -0
- package/src/page-setup.ts +222 -0
- package/src/row-line-clamp.ts +74 -0
- package/src/row-tooltip.spec.ts +313 -0
- package/src/row-tooltip.ts +52 -0
- package/src/scroll-shading.ts +18 -1
- package/src/shared-tree-builder.ts +336 -41
- package/src/shared-tree-mount.spec.ts +130 -0
- package/src/shared-trees.spec.ts +15 -0
- package/src/signals.ts +15 -0
- package/src/style-classes.spec.ts +9 -8
- package/src/styles.generated.ts +1 -1
- package/src/tab-chip.ts +200 -0
- package/src/template-classes.ts +45 -0
- package/src/test.browser.mts +160 -0
- package/src/widget-size.spec.ts +117 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { AdwTabPageState } from '@gjsify/adwaita-core';
|
|
2
|
+
import { type GtkImage } from './elements/gtk-image.js';
|
|
3
|
+
export type AdwTabBarPage = AdwTabPageState<HTMLElement>;
|
|
4
|
+
/** `SPACING`: the slack `scroll_to_tab_full` allows before it scrolls (adw-tab-box.c:24). */
|
|
5
|
+
export declare const TAB_SPACING = 5;
|
|
6
|
+
/** The five nodes of one chip, held so a caller can refresh one without re-querying it. */
|
|
7
|
+
export interface TabChip {
|
|
8
|
+
/** The button itself: `role="tab"`, carrying `data-page-id`. */
|
|
9
|
+
el: HTMLButtonElement;
|
|
10
|
+
icon: GtkImage;
|
|
11
|
+
spinner: HTMLElement;
|
|
12
|
+
label: HTMLElement;
|
|
13
|
+
indicator: GtkImage;
|
|
14
|
+
close: HTMLButtonElement;
|
|
15
|
+
}
|
|
16
|
+
/** What the chip asks its bar for; the bar owns the model and the page list. */
|
|
17
|
+
export interface TabChipHooks {
|
|
18
|
+
/** The chip was pressed — libadwaita's `select_page`. */
|
|
19
|
+
onSelect: () => void;
|
|
20
|
+
/** The close affordance was pressed; `AdwTab`'s own button, which stops propagation. */
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
/** Pointer in or out of the chip, for `update_visible`'s `hovering` term. */
|
|
23
|
+
onHover: (hovering: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* One chip, node for node: the icon, the spinner that replaces it while the page is
|
|
27
|
+
* loading, the title, the attention indicator and the close affordance — in that order,
|
|
28
|
+
* because `AdwTab`'s template puts the close button LAST and the indicator before it.
|
|
29
|
+
*/
|
|
30
|
+
export declare const createTabChip: (hooks: TabChipHooks) => TabChip;
|
|
31
|
+
/**
|
|
32
|
+
* `update_icons`, `update_title` and `update_needs_attention` — everything about a chip
|
|
33
|
+
* that reads off its PAGE rather than off the bar. The bar keeps the geometry half
|
|
34
|
+
* ({@link refreshTabChipClose}) to itself, because that is measured against ITS scroll
|
|
35
|
+
* window and only it knows where the chip sits in it.
|
|
36
|
+
*/
|
|
37
|
+
export declare const refreshTabChip: (chip: TabChip, page: AdwTabBarPage, defaultIcon: string | null) => void;
|
|
38
|
+
/**
|
|
39
|
+
* `get_tab_position` in the BAR's scroll space: how far the chip sits from the strip's
|
|
40
|
+
* scroll origin, the one coordinate both `scroll_to_tab_full` and `update_visible` compare
|
|
41
|
+
* against the adjustment.
|
|
42
|
+
*
|
|
43
|
+
* Never `offsetLeft`. Nothing in a tab bar is positioned, so a chip's offsetParent is
|
|
44
|
+
* whichever positioned ancestor the HOST page happens to have; a bar that merely sits
|
|
45
|
+
* indented then measured every chip against the wrong origin and reported all of them
|
|
46
|
+
* clipped.
|
|
47
|
+
*/
|
|
48
|
+
export declare const chipPosition: (bar: HTMLElement, chip: HTMLElement) => number;
|
|
49
|
+
/**
|
|
50
|
+
* `update_visible` (adw-tab-box.c:769-797) as libadwaita applies it, with the pinned gate
|
|
51
|
+
* from `AdwTab` folded in: `(hovering && fullyVisible) || selected`, never on a pinned tab.
|
|
52
|
+
*
|
|
53
|
+
* `dragging` is constantly false — tab drag-and-drop is compositor work and is not modelled
|
|
54
|
+
* — and the SPACING slack C also demands is deliberately NOT transplanted, because it is not
|
|
55
|
+
* slack there either: the allocation loop starts the first tab at `pos = SPACING` and puts
|
|
56
|
+
* SPACING between tabs (:3270-3286), so `pos - SPACING >= value` is exactly "flush against
|
|
57
|
+
* the leading edge". A strip without those gaps would report the first chip clipped.
|
|
58
|
+
*/
|
|
59
|
+
export declare const refreshTabChipClose: (bar: HTMLElement, chip: TabChip, page: AdwTabBarPage, state: {
|
|
60
|
+
hovering: boolean;
|
|
61
|
+
selected: boolean;
|
|
62
|
+
}) => void;
|
|
63
|
+
/**
|
|
64
|
+
* `scroll_to_tab_full` (adw-tab-box.c:928-961): bring the chip inside the BAR's own scroll
|
|
65
|
+
* window, padded by half of whichever is smaller, the chip or the leftover.
|
|
66
|
+
*
|
|
67
|
+
* The bar is the only thing C ever scrolls for a tab — `scroll_to_tab_full` writes
|
|
68
|
+
* `self->adjustment`, the strip's own adjustment, and nothing else. The DOM has no such
|
|
69
|
+
* narrow API: `focus()` and `scrollIntoView()` both walk EVERY scrollable ancestor up to
|
|
70
|
+
* the window. So this moves `scrollLeft` by hand, and the caller passes `preventScroll` to
|
|
71
|
+
* `focus()`.
|
|
72
|
+
*/
|
|
73
|
+
export declare const scrollChipIntoBar: (bar: HTMLElement, chip: HTMLElement) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers the custom element `tag` as the class a `.blp` means by `$name`, spelled as the
|
|
3
|
+
* file spells it (`SourceView` for `$SourceView`). The element builds its own internals,
|
|
4
|
+
* typically from its own `.blp?shared-tree`, and must be defined by the time a tree uses it.
|
|
5
|
+
*
|
|
6
|
+
* Registering the same pair again is a no-op; a different tag under the same name is refused,
|
|
7
|
+
* as `Gtk.Builder` refuses a type registered twice.
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerTemplateClass(name: string, tag: string): void;
|
|
10
|
+
/** The tag `name` was registered under, or a refusal that names what is missing. */
|
|
11
|
+
export declare function templateTagFor(name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdwWidgetSizeTest: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/adwaita-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.0",
|
|
4
4
|
"description": "Adwaita/Libadwaita web components for browser targets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./lib/types/fonts.d.ts",
|
|
19
19
|
"default": "./src/fonts.ts"
|
|
20
20
|
},
|
|
21
|
+
"./capabilities": {
|
|
22
|
+
"types": "./src/capabilities.d.mts",
|
|
23
|
+
"default": "./src/capabilities.mjs"
|
|
24
|
+
},
|
|
21
25
|
"./style.css": {
|
|
22
26
|
"types": "./style.css.d.ts",
|
|
23
27
|
"default": "./dist/adwaita-web.css"
|
|
@@ -45,16 +49,16 @@
|
|
|
45
49
|
"@codemirror/language": "^6.12.4",
|
|
46
50
|
"@codemirror/state": "^6.7.0",
|
|
47
51
|
"@codemirror/view": "^6.43.4",
|
|
48
|
-
"@gjsify/adwaita-core": "^0.
|
|
49
|
-
"@gjsify/adwaita-fonts": "^0.
|
|
50
|
-
"@gjsify/adwaita-icons": "^0.
|
|
52
|
+
"@gjsify/adwaita-core": "^0.56.0",
|
|
53
|
+
"@gjsify/adwaita-fonts": "^0.56.0",
|
|
54
|
+
"@gjsify/adwaita-icons": "^0.56.0",
|
|
51
55
|
"@lezer/highlight": "^1.2.3"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
54
|
-
"@gjsify/blueprint": "^0.
|
|
55
|
-
"@gjsify/cli": "^0.
|
|
56
|
-
"@gjsify/unit": "^0.
|
|
57
|
-
"@gjsify/vite-plugin-blueprint": "^0.
|
|
58
|
+
"@gjsify/blueprint": "^0.56.0",
|
|
59
|
+
"@gjsify/cli": "^0.56.0",
|
|
60
|
+
"@gjsify/unit": "^0.56.0",
|
|
61
|
+
"@gjsify/vite-plugin-blueprint": "^0.56.0",
|
|
58
62
|
"sass": "^1.101.0",
|
|
59
63
|
"typescript": "^6.0.3"
|
|
60
64
|
},
|
package/scss/_action_row.scss
CHANGED
|
@@ -5,12 +5,19 @@
|
|
|
5
5
|
// Copyright (c) 2025 csm (adwaita-web). MIT License.
|
|
6
6
|
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
7
7
|
|
|
8
|
-
adw-action-row
|
|
8
|
+
adw-action-row,
|
|
9
|
+
adw-switch-row,
|
|
10
|
+
adw-combo-row,
|
|
11
|
+
adw-spin-row {
|
|
12
|
+
// These row types inherit from AdwActionRow upstream and have
|
|
13
|
+
// title-lines/subtitle-lines properties. Match libadwaita: wrap by default
|
|
14
|
+
// (GtkLabel with wrap=true, lines=0), clamp via CSS custom property when
|
|
15
|
+
// title-lines/subtitle-lines > 0. See adw-action-row.ui lines 54-61, 70-81.
|
|
9
16
|
display: flex;
|
|
10
17
|
align-items: center;
|
|
11
18
|
gap: var(--spacing-m);
|
|
12
|
-
min-height:
|
|
13
|
-
padding:
|
|
19
|
+
min-height: 54px;
|
|
20
|
+
padding: 0 var(--spacing-m);
|
|
14
21
|
border-bottom: 1px solid var(--card-shade-color);
|
|
15
22
|
color: var(--card-fg-color);
|
|
16
23
|
|
|
@@ -31,36 +38,53 @@ adw-action-row {
|
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
.adw-action-row-prefix,
|
|
34
|
-
.adw-action-row-suffix
|
|
41
|
+
.adw-action-row-suffix,
|
|
42
|
+
.adw-switch-row-prefix {
|
|
35
43
|
display: flex;
|
|
36
44
|
align-items: center;
|
|
37
45
|
gap: var(--spacing-xs);
|
|
38
46
|
flex-shrink: 0;
|
|
39
47
|
}
|
|
40
48
|
|
|
41
|
-
.adw-
|
|
42
|
-
|
|
43
|
-
flex-direction: column;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
flex: 1 1 auto;
|
|
46
|
-
min-width: 0;
|
|
47
|
-
}
|
|
49
|
+
// The text column's own rule is `_row.scss`'s shared `.adw-row-text` — one spelling
|
|
50
|
+
// for all five rows, so the clamp selectors below can name it too.
|
|
48
51
|
|
|
52
|
+
// Title/subtitle WRAP BY DEFAULT, matching libadwaita's GtkLabel wrap=true,
|
|
53
|
+
// lines=0. The typography is this row type's own (it was here before the wrap); only
|
|
54
|
+
// `white-space` moves, and `overflow`/`text-overflow` are left to the clamped state
|
|
55
|
+
// below, where the ellipsis has a line count to truncate to.
|
|
49
56
|
.adw-row-title {
|
|
50
57
|
font-size: var(--font-size-base);
|
|
51
58
|
color: var(--card-fg-color);
|
|
52
|
-
white-space:
|
|
53
|
-
overflow:
|
|
54
|
-
text-overflow: ellipsis;
|
|
59
|
+
white-space: normal;
|
|
60
|
+
overflow-wrap: break-word;
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
.adw-row-subtitle {
|
|
58
64
|
font-size: var(--font-size-small);
|
|
59
65
|
opacity: var(--dim-opacity);
|
|
60
66
|
color: var(--card-fg-color);
|
|
61
|
-
white-space:
|
|
62
|
-
overflow:
|
|
63
|
-
|
|
67
|
+
white-space: normal;
|
|
68
|
+
overflow-wrap: break-word;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Clamped state — enabled by JS toggling .adw-row-clamp on the text container.
|
|
72
|
+
.adw-row-text.adw-row-clamp {
|
|
73
|
+
.adw-row-title,
|
|
74
|
+
.adw-row-subtitle {
|
|
75
|
+
display: -webkit-box;
|
|
76
|
+
-webkit-box-orient: vertical;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: var(--adw-row-ellipsize-overflow, ellipsis);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.adw-row-title {
|
|
82
|
+
-webkit-line-clamp: var(--adw-row-title-lines, 1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.adw-row-subtitle {
|
|
86
|
+
-webkit-line-clamp: var(--adw-row-subtitle-lines, 1);
|
|
87
|
+
}
|
|
64
88
|
}
|
|
65
89
|
}
|
|
66
90
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// _application_window.scss — the application window's menubar strip.
|
|
2
|
+
//
|
|
3
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_toolbars.scss (`menubar`, the
|
|
4
|
+
// row libadwaita styles for GtkPopoverMenuBar — the GTK 4 menubar this widget
|
|
5
|
+
// stands in for)
|
|
6
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_header-bar.scss (the bar it sits
|
|
7
|
+
// above, for the background and the border between them)
|
|
8
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+
|
|
9
|
+
// Modifications: Implemented for @gjsify/adwaita-web Web Components.
|
|
10
|
+
|
|
11
|
+
.adw-application-window-menubar {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex: 0 0 auto;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 2px;
|
|
16
|
+
padding: 0 6px;
|
|
17
|
+
background-color: var(--headerbar-bg-color);
|
|
18
|
+
color: var(--headerbar-fg-color);
|
|
19
|
+
// The rule between the bar and the header bar below it, which is the whole of what
|
|
20
|
+
// separates one bar from another in a stacked window.
|
|
21
|
+
box-shadow: inset 0 -1px 0 var(--headerbar-border-color);
|
|
22
|
+
|
|
23
|
+
&[hidden] {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// _aspect_frame.scss — <gtk-aspect-frame>: draws NOTHING, it only sizes and places.
|
|
2
|
+
//
|
|
3
|
+
// libadwaita has no rule for the `aspectframe` node (its stylesheet never names it), and
|
|
4
|
+
// neither should this: the widget paints no border, no background and no frame, because
|
|
5
|
+
// `gtk_aspect_frame_size_allocate` gives its child one allocation of the requested shape
|
|
6
|
+
// and puts that box at (`xalign`, `yalign`) — gtakaspectframe.c:561-587. That allocation
|
|
7
|
+
// IS the widget.
|
|
8
|
+
//
|
|
9
|
+
// What is left to CSS is the placing, and all of it is per-INSTANCE: the element writes
|
|
10
|
+
// `justify-content` and `align-items` from `xalign` / `yalign` and the child's
|
|
11
|
+
// `aspect-ratio`, `max-width` and `max-height` inline, because a stylesheet cannot key on a
|
|
12
|
+
// fraction. So this partial is the flex container and nothing else.
|
|
13
|
+
//
|
|
14
|
+
// Reference: refs/gtk/gtk/gtkaspectframe.c:561-587
|
|
15
|
+
// Copyright (c) The GTK Team. LGPLv2.1+.
|
|
16
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
17
|
+
|
|
18
|
+
gtk-aspect-frame {
|
|
19
|
+
display: flex;
|
|
20
|
+
// The child's shape and both alignments are written INLINE by the element, because a
|
|
21
|
+
// stylesheet cannot key on a fraction; these are the values in the frame before it does,
|
|
22
|
+
// which are also the pspec defaults for `xalign` and `yalign`.
|
|
23
|
+
justify-content: center;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
package/scss/_bin.scss
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// _bin.scss — <adw-bin>, the one-child container.
|
|
2
|
+
//
|
|
3
|
+
// libadwaita has NO `bin` node: `adw_bin_class_init` sets no CSS name and the
|
|
4
|
+
// stylesheet never mentions one (the widget's whole rule is the layout manager, and
|
|
5
|
+
// `GtkBinLayout` gives the child the widget's entire allocation). So the only rule here
|
|
6
|
+
// is the block box that allocation needs, and the one cross-axis stretch that says
|
|
7
|
+
// "the child fills the bin" — a `GtkBinLayout` gives its child the bin's height too,
|
|
8
|
+
// which a block child would otherwise size to its own content.
|
|
9
|
+
//
|
|
10
|
+
// Reference: refs/libadwaita/src/adw-bin.c:123 (GtkBinLayout)
|
|
11
|
+
// Reference: refs/gtk/gtk/gtkbinlayout.c:81 (`gtk_bin_layout_allocate` hands the child the
|
|
12
|
+
// allocation on both axes)
|
|
13
|
+
// Copyright (c) GNOME contributors (GTK, libadwaita). LGPLv2.1+.
|
|
14
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
15
|
+
|
|
16
|
+
adw-bin {
|
|
17
|
+
display: block;
|
|
18
|
+
|
|
19
|
+
// One child, and it fills — `gtk_bin_layout_allocate` allocates the whole widget to
|
|
20
|
+
// its single child. `:only-child` rather than `> *` because a bin keeps ONE
|
|
21
|
+
// (`adw_bin_set_child` unparents the one it replaces), so the case where the selector
|
|
22
|
+
// could match two is one the element has already refused.
|
|
23
|
+
> :only-child {
|
|
24
|
+
block-size: 100%;
|
|
25
|
+
}
|
|
26
|
+
}
|
package/scss/_button.scss
CHANGED
|
@@ -177,6 +177,51 @@ gtk-button {
|
|
|
177
177
|
background-color: color-mix(in srgb, black calc(0.75 * 65%), currentColor calc(0.25 * 65%));
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
+
|
|
181
|
+
// Checked — `<gtk-toggle-button>`'s pressed state, libadwaita's `:checked`
|
|
182
|
+
// (_buttons.scss:44-56, 136-140, 169-177, 199-210). Last in the block so it outranks the
|
|
183
|
+
// hover/active/`.raised` rules of equal specificity above, which is also why the flat,
|
|
184
|
+
// suggested and destructive variants restate their own checked colours: upstream
|
|
185
|
+
// resolves them by the same source order.
|
|
186
|
+
&.checked {
|
|
187
|
+
background-color: color-mix(in srgb, currentColor 30%, transparent);
|
|
188
|
+
|
|
189
|
+
&:hover {
|
|
190
|
+
background-color: color-mix(in srgb, currentColor 35%, transparent);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&:active {
|
|
194
|
+
background-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&.flat.checked {
|
|
199
|
+
background-color: color-mix(in srgb, currentColor 10%, transparent);
|
|
200
|
+
|
|
201
|
+
&:hover {
|
|
202
|
+
background-color: color-mix(in srgb, currentColor 13%, transparent);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&:active {
|
|
206
|
+
background-color: color-mix(in srgb, currentColor 19%, transparent);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&.suggested-action.checked {
|
|
211
|
+
background-color: var(--accent-bg-color);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&.destructive-action.checked {
|
|
215
|
+
background-color: color-mix(in srgb, currentColor 35%, transparent);
|
|
216
|
+
|
|
217
|
+
&:hover {
|
|
218
|
+
background-color: color-mix(in srgb, currentColor 40%, transparent);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&:active {
|
|
222
|
+
background-color: color-mix(in srgb, currentColor 45%, transparent);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
180
225
|
}
|
|
181
226
|
|
|
182
227
|
// The symbolic icon (`.adw-icon`) used to be declared here, because the first
|
package/scss/_button_row.scss
CHANGED
|
@@ -34,6 +34,11 @@ adw-button-row {
|
|
|
34
34
|
justify-content: center;
|
|
35
35
|
gap: var(--spacing-xs);
|
|
36
36
|
min-width: 0;
|
|
37
|
+
// The row centres its one button (`justify-content: center` above), so without this the
|
|
38
|
+
// contents box is exactly as wide as the button and `tooltip-text` reaches only that
|
|
39
|
+
// much of the row. Growing it and letting its own `justify-content: centre` do the
|
|
40
|
+
// centring draws the same button in the same place.
|
|
41
|
+
flex: 1 1 auto;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
.adw-button-row-title {
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// _calendar.scss — <gtk-calendar>: the `calendar` node, its header, and the grid of
|
|
2
|
+
// `day-name` / `week-number` / `day-number` labels.
|
|
3
|
+
//
|
|
4
|
+
// libadwaita's block is 58 lines and almost all of it is state: `:checked` for a MARKED day,
|
|
5
|
+
// `:selected` for the SELECTED one, `.today` for today's, `.other-month` for the spill. The
|
|
6
|
+
// port spells those as four classes off one element — `gtk-calendar.ts` raises the same four
|
|
7
|
+
// widget state flags `calendar_update_day_labels` does (gtkcalendar.c:1015-1046) — and the
|
|
8
|
+
// selectors below are the same four, in the same specificity order, so the cascade resolves
|
|
9
|
+
// the way the C's stylesheet resolves it.
|
|
10
|
+
//
|
|
11
|
+
// THE CASCADE ORDER MATTERS and it is why the rules are not merged: `label.today` sets an
|
|
12
|
+
// inset box-shadow and then CANCELS it under `:selected` (_calendar.scss:24-30), and
|
|
13
|
+
// `.day-number:checked` sets a 30% accent tint that `:selected` then replaces with the solid
|
|
14
|
+
// accent (_calendar.scss:37-51). A merged rule that applied `:checked` last would tint the
|
|
15
|
+
// selected day, which is exactly what upstream avoids.
|
|
16
|
+
//
|
|
17
|
+
// `font-variant-numeric: tabular-nums` is the load-bearing line for a grid of day numbers: the
|
|
18
|
+
// column widths come from the widest number, and proportional digits would make 1 narrower than
|
|
19
|
+
// 8 and the whole grid breathe as the month changes.
|
|
20
|
+
//
|
|
21
|
+
// Reference: refs/libadwaita/src/stylesheet/widgets/_calendar.scss:1-58
|
|
22
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
23
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
24
|
+
|
|
25
|
+
gtk-calendar {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
color: var(--view-fg-color);
|
|
30
|
+
background-color: var(--view-bg-color);
|
|
31
|
+
background-clip: padding-box;
|
|
32
|
+
// `calendar { border: 1px solid $border_color }` (_calendar.scss:4).
|
|
33
|
+
border: 1px solid var(--border-color);
|
|
34
|
+
border-radius: var(--window-radius);
|
|
35
|
+
font-variant-numeric: tabular-nums;
|
|
36
|
+
|
|
37
|
+
&.view:disabled {
|
|
38
|
+
color: var(--view-fg-color);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.adw-calendar-header {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: 2px;
|
|
46
|
+
padding: 4px;
|
|
47
|
+
// `> header { border-bottom: 1px solid $border_color }` (_calendar.scss:12).
|
|
48
|
+
border-bottom: 1px solid var(--border-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.adw-calendar-month {
|
|
52
|
+
font-weight: bold;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
text-overflow: ellipsis;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.adw-calendar-year {
|
|
59
|
+
// The C measures the year label once and adds 10px so "changing the year does not increase
|
|
60
|
+
// the calendar width" (gtkcalendar.c:853-858) — a fixed slot is the same promise.
|
|
61
|
+
flex: 0 0 auto;
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.adw-calendar-nav-button {
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
// `@extend %button_basic_flat` with `border-radius: 0` (_calendar.scss:15-16).
|
|
71
|
+
border-radius: 0;
|
|
72
|
+
|
|
73
|
+
&[disabled] {
|
|
74
|
+
opacity: var(--disabled-opacity);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.adw-calendar-grid {
|
|
79
|
+
display: grid;
|
|
80
|
+
// Column 0 is the week-number column upstream (gtkcalendar.c:786-790), and it exists whether
|
|
81
|
+
// or not the numbers are shown, so the day names and the days line up under it either way.
|
|
82
|
+
grid-template-columns: auto repeat(7, 1fr);
|
|
83
|
+
// `> grid { padding-left: 3px; padding-bottom: 3px }` (_calendar.scss:21-22).
|
|
84
|
+
padding: 3px 0 3px 3px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.adw-calendar-day-name,
|
|
88
|
+
.adw-calendar-week-number,
|
|
89
|
+
.adw-calendar-week-spacer {
|
|
90
|
+
// `margin-top: 3px; margin-right: 3px` (_calendar.scss:34-35), applied to the labels.
|
|
91
|
+
margin-top: 3px;
|
|
92
|
+
margin-right: 3px;
|
|
93
|
+
font-size: var(--font-size-small);
|
|
94
|
+
opacity: var(--dim-opacity);
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.adw-calendar-week-number,
|
|
99
|
+
.adw-calendar-week-spacer {
|
|
100
|
+
// The week-number column is the day names' share of a cell: a number is narrower than a name,
|
|
101
|
+
// and letting it size itself would make the grid jitter between a wide and a narrow month.
|
|
102
|
+
max-width: 2.5em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.adw-calendar-cell {
|
|
106
|
+
// `> label { margin-top: 3px; margin-right: 3px }` and `.day-number { padding: 3px }`
|
|
107
|
+
// (_calendar.scss:32-38).
|
|
108
|
+
margin-top: 3px;
|
|
109
|
+
margin-right: 3px;
|
|
110
|
+
padding: 3px;
|
|
111
|
+
border: none;
|
|
112
|
+
border-radius: 0;
|
|
113
|
+
background: none;
|
|
114
|
+
color: inherit;
|
|
115
|
+
font: inherit;
|
|
116
|
+
font-variant-numeric: inherit;
|
|
117
|
+
line-height: 1;
|
|
118
|
+
text-align: center;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
background-color: color-mix(in srgb, currentColor 6%, transparent);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:active {
|
|
126
|
+
background-color: color-mix(in srgb, currentColor 12%, transparent);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:focus-visible,
|
|
130
|
+
&.focused {
|
|
131
|
+
// `@include focus-ring($focus-state: ':focus')` (_calendar.scss:33) — the C focuses the
|
|
132
|
+
// LABEL rather than the grid, which is what `.focused` is on this port.
|
|
133
|
+
outline: 2px solid var(--accent-color);
|
|
134
|
+
outline-offset: -2px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// `:checked` — `background-color: color-mix(… var(--accent-bg-color) 30%, transparent)`
|
|
138
|
+
// (_calendar.scss:39-43), the MARKED day.
|
|
139
|
+
&.marked {
|
|
140
|
+
border-radius: var(--button-radius);
|
|
141
|
+
background-color: color-mix(in srgb, var(--accent-bg-color) 30%, transparent);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// `:selected { background-color: var(--accent-bg-color); color: var(--accent-fg-color) }`
|
|
145
|
+
// (_calendar.scss:45-50), and it comes AFTER `:checked` so the selected day is not tinted.
|
|
146
|
+
&.selected {
|
|
147
|
+
border-radius: var(--button-radius);
|
|
148
|
+
background-color: var(--accent-bg-color);
|
|
149
|
+
color: var(--accent-fg-color);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// `.other-month { color: color-mix(in srgb, currentColor 30%, transparent) }`
|
|
153
|
+
// (_calendar.scss:53-55), the leading and trailing spill.
|
|
154
|
+
&.other-month {
|
|
155
|
+
color: color-mix(in srgb, currentColor 30%, transparent);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// `label.today { box-shadow: inset 0 0 0 -2px $border_color }` (_calendar.scss:24-25) — an
|
|
159
|
+
// inset rule, not a border, so it does not change the cell's size.
|
|
160
|
+
&.today {
|
|
161
|
+
box-shadow: inset 0 -2px var(--border-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// `label.today:selected { box-shadow: none }` (_calendar.scss:27-29): the selected day's
|
|
165
|
+
// accent fill IS the emphasis, so today's underline steps aside rather than doubling up.
|
|
166
|
+
&.today.selected {
|
|
167
|
+
box-shadow: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&[disabled] {
|
|
171
|
+
// `lower_limit_reached` / `upper_limit_reached` blank those cells and make them
|
|
172
|
+
// insensitive (gtkcalendar.c:1004-1015), so there is nothing to dim — just nothing.
|
|
173
|
+
background: none;
|
|
174
|
+
cursor: default;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// _center_box.scss — <gtk-center-box>: three children, and the space between them.
|
|
2
|
+
//
|
|
3
|
+
// `gtk_center_box_set_css_name (widget_class, I_("box"))` (gtkcenterbox.c:345) means the
|
|
4
|
+
// theme's `box` rule styles this widget, and libadwaita ships NO `box` rule — a box draws
|
|
5
|
+
// nothing, it only places. `justify-content: space-between` IS the placement: the centre
|
|
6
|
+
// layout puts the start child at the start, the end child at the end and the centre between
|
|
7
|
+
// them, growing the centre into whatever is left when it expands
|
|
8
|
+
// (gtkcenterlayout.c:174-186).
|
|
9
|
+
//
|
|
10
|
+
// The `shrink-center-last` weights and a `baseline-position` are written INLINE by the
|
|
11
|
+
// element, because both are per-instance values a selector cannot express: the weights
|
|
12
|
+
// differ per child, and the position is a fraction.
|
|
13
|
+
//
|
|
14
|
+
// Reference: refs/gtk/gtk/gtkcenterbox.c:345-346
|
|
15
|
+
// Reference: refs/gtk/gtk/gtkcenterlayout.c:144-186
|
|
16
|
+
// Copyright (c) The GTK Team. LGPLv2.1+.
|
|
17
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components.
|
|
18
|
+
|
|
19
|
+
gtk-center-box {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
// A child's default `valign` is FILL, and the centre layout's one line takes the whole
|
|
23
|
+
// cross axis — the same thing `_box.scss` states for `<gtk-box>`.
|
|
24
|
+
align-items: stretch;
|
|
25
|
+
}
|
package/scss/_checks.scss
CHANGED
|
@@ -103,7 +103,9 @@ adw-radio {
|
|
|
103
103
|
display: block;
|
|
104
104
|
width: 100%;
|
|
105
105
|
height: 100%;
|
|
106
|
-
|
|
106
|
+
// Transparent until a state supplies a glyph: an unmasked currentColor box is a
|
|
107
|
+
// solid square, which is what an unchecked control used to paint.
|
|
108
|
+
background-color: transparent;
|
|
107
109
|
mask-repeat: no-repeat;
|
|
108
110
|
mask-position: center;
|
|
109
111
|
mask-size: 14px; // -gtk-icon-size: 14px (:25)
|
|
@@ -187,11 +189,13 @@ adw-radio .adw-check-indicator {
|
|
|
187
189
|
|
|
188
190
|
// `check:checked` → check.svg (:70) / `radio:checked` → bullet.svg (:76)
|
|
189
191
|
gtk-check-button[checked] .adw-check-indicator::after {
|
|
192
|
+
background-color: currentColor;
|
|
190
193
|
mask-image: $check-glyph;
|
|
191
194
|
-webkit-mask-image: $check-glyph;
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
adw-radio[checked] .adw-check-indicator::after {
|
|
198
|
+
background-color: currentColor;
|
|
195
199
|
mask-image: $bullet-glyph;
|
|
196
200
|
-webkit-mask-image: $bullet-glyph;
|
|
197
201
|
}
|
|
@@ -203,6 +207,7 @@ adw-radio[checked] .adw-check-indicator::after {
|
|
|
203
207
|
// in `@gjsify/adwaita-core` encodes for the a11y value.
|
|
204
208
|
gtk-check-button[indeterminate] .adw-check-indicator::after,
|
|
205
209
|
adw-radio[indeterminate] .adw-check-indicator::after {
|
|
210
|
+
background-color: currentColor;
|
|
206
211
|
mask-image: $dash-glyph;
|
|
207
212
|
-webkit-mask-image: $dash-glyph;
|
|
208
213
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// _clamp_scrollable.scss — <adw-clamp-scrollable>.
|
|
2
|
+
//
|
|
3
|
+
// The widget has NO node of its own: `adw_clamp_scrollable_class_init` ends with
|
|
4
|
+
// `set_layout_manager_type(ADW_TYPE_CLAMP_LAYOUT)` and `set_css_name("clamp")`
|
|
5
|
+
// (adw-clamp-scrollable.c:328-329), so it draws exactly what `<adw-clamp>` draws — which
|
|
6
|
+
// is nothing, since there is no `clamp {}` block in the libadwaita stylesheet either. A
|
|
7
|
+
// clamp measures; the cap and the `small`/`medium`/`large` classes are written onto the
|
|
8
|
+
// CHILD by the element, out of `clampAllocate`.
|
|
9
|
+
//
|
|
10
|
+
// What this element adds is `overflow`. In C the CHILD is the `Gtk.Scrollable` and four
|
|
11
|
+
// `g_object_bind_property` calls forward the adjustments onto it
|
|
12
|
+
// (adw-clamp-scrollable.c:440-455); a DOM scrollport is the element itself, so the
|
|
13
|
+
// scrolling moves one level up and the element writes `overflow-x`/`overflow-y` from
|
|
14
|
+
// `hscroll-policy`/`vscroll-policy`. This rule is the floor for an author who set
|
|
15
|
+
// neither policy — GTK's default is GTK_POLICY_AUTOMATIC, which shows a scrollbar only
|
|
16
|
+
// when there is something to scroll, which is `auto` here.
|
|
17
|
+
//
|
|
18
|
+
// Reference: refs/libadwaita/src/adw-clamp-scrollable.c:328-329 (the `clamp` node)
|
|
19
|
+
// Reference: refs/libadwaita/src/adw-clamp-layout.c (adw_clamp_layout_allocate — the
|
|
20
|
+
// size classes the element stamps on the child)
|
|
21
|
+
// Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
|
|
22
|
+
// Modifications: Adapted for @gjsify/adwaita-web Web Components; the scrollport is the
|
|
23
|
+
// element where C's is the child, for the reason the element's header records.
|
|
24
|
+
|
|
25
|
+
adw-clamp-scrollable {
|
|
26
|
+
display: block;
|
|
27
|
+
overflow: auto;
|
|
28
|
+
}
|