@gjsify/adwaita-web 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +5 -5
  2. package/dist/adwaita-web.css +2742 -263
  3. package/dist/adwaita-web.css.map +1 -1
  4. package/lib/types/elements/adw-about-dialog.d.ts +77 -0
  5. package/lib/types/elements/adw-action-row.d.ts +15 -0
  6. package/lib/types/elements/adw-alert-dialog.d.ts +80 -0
  7. package/lib/types/elements/adw-avatar.d.ts +9 -0
  8. package/lib/types/elements/adw-banner.d.ts +9 -0
  9. package/lib/types/elements/adw-bottom-sheet.d.ts +35 -0
  10. package/lib/types/elements/adw-button-content.d.ts +10 -0
  11. package/lib/types/elements/adw-button-row.d.ts +11 -0
  12. package/lib/types/elements/adw-button.d.ts +11 -0
  13. package/lib/types/elements/adw-carousel.d.ts +64 -0
  14. package/lib/types/elements/adw-clamp.d.ts +6 -0
  15. package/lib/types/elements/adw-combo-row.d.ts +3 -0
  16. package/lib/types/elements/adw-entry-row.d.ts +10 -0
  17. package/lib/types/elements/adw-entry.d.ts +11 -0
  18. package/lib/types/elements/adw-expander-row.d.ts +26 -0
  19. package/lib/types/elements/adw-header-bar.d.ts +4 -0
  20. package/lib/types/elements/adw-inline-view-switcher.d.ts +30 -0
  21. package/lib/types/elements/adw-navigation-split-view.d.ts +15 -0
  22. package/lib/types/elements/adw-navigation-view.d.ts +66 -0
  23. package/lib/types/elements/adw-password-entry-row.d.ts +16 -0
  24. package/lib/types/elements/adw-preferences-dialog.d.ts +36 -0
  25. package/lib/types/elements/adw-preferences-group.d.ts +8 -0
  26. package/lib/types/elements/adw-sidebar.d.ts +29 -0
  27. package/lib/types/elements/adw-spin-row.d.ts +3 -0
  28. package/lib/types/elements/adw-spinner.d.ts +6 -0
  29. package/lib/types/elements/adw-split-button.d.ts +18 -0
  30. package/lib/types/elements/adw-status-page.d.ts +11 -0
  31. package/lib/types/elements/adw-switch-row.d.ts +3 -0
  32. package/lib/types/elements/adw-tab-view.d.ts +24 -0
  33. package/lib/types/elements/adw-toast-overlay.d.ts +19 -4
  34. package/lib/types/elements/adw-toggle-group.d.ts +19 -0
  35. package/lib/types/elements/adw-toolbar-view.d.ts +13 -0
  36. package/lib/types/elements/adw-view-switcher.d.ts +29 -0
  37. package/lib/types/elements/adw-window-title.d.ts +9 -0
  38. package/lib/types/elements/adw-wrap-box.d.ts +13 -0
  39. package/lib/types/index.d.ts +29 -0
  40. package/lib/types/styles.generated.d.ts +1 -0
  41. package/package.json +5 -5
  42. package/scss/_about_dialog.scss +257 -0
  43. package/scss/_action_row.scss +65 -0
  44. package/scss/_alert_dialog.scss +151 -0
  45. package/scss/_avatar.scss +31 -0
  46. package/scss/_banner.scss +46 -0
  47. package/scss/_bottom_sheet.scss +113 -0
  48. package/scss/_button.scss +168 -0
  49. package/scss/_button_content.scss +48 -0
  50. package/scss/_button_row.scss +100 -0
  51. package/scss/_carousel.scss +130 -0
  52. package/scss/_clamp.scss +11 -0
  53. package/scss/_entry.scss +49 -0
  54. package/scss/_entry_row.scss +54 -0
  55. package/scss/_expander_row.scss +150 -0
  56. package/scss/_headerbar.scss +1 -1
  57. package/scss/_inline_view_switcher.scss +174 -0
  58. package/scss/_navigation_split_view.scss +48 -0
  59. package/scss/_navigation_view.scss +80 -0
  60. package/scss/_overlay_split_view.scss +19 -0
  61. package/scss/_password_entry_row.scss +67 -0
  62. package/scss/_preferences.scss +26 -3
  63. package/scss/_preferences_dialog.scss +154 -0
  64. package/scss/_row.scss +31 -0
  65. package/scss/_sidebar.scss +213 -0
  66. package/scss/_spin_row.scss +0 -1
  67. package/scss/_spinner.scss +28 -0
  68. package/scss/_split_button.scss +222 -0
  69. package/scss/_status_page.scss +40 -0
  70. package/scss/_switch_row.scss +0 -1
  71. package/scss/_tab_view.scss +193 -0
  72. package/scss/_theme.scss +12 -0
  73. package/scss/_toast.scss +122 -12
  74. package/scss/_toggle_group.scss +124 -0
  75. package/scss/_toolbar_view.scss +31 -0
  76. package/scss/_variables.scss +19 -0
  77. package/scss/_view_switcher.scss +133 -0
  78. package/scss/_window_title.scss +33 -0
  79. package/scss/_wrap_box.scss +20 -0
  80. package/scss/adwaita-skin.scss +38 -0
  81. package/src/elements/adw-about-dialog.ts +629 -0
  82. package/src/elements/adw-action-row.ts +82 -0
  83. package/src/elements/adw-alert-dialog.ts +385 -0
  84. package/src/elements/adw-avatar.ts +108 -0
  85. package/src/elements/adw-banner.ts +57 -0
  86. package/src/elements/adw-bottom-sheet.ts +205 -0
  87. package/src/elements/adw-button-content.ts +69 -0
  88. package/src/elements/adw-button-row.ts +75 -0
  89. package/src/elements/adw-button.ts +81 -0
  90. package/src/elements/adw-carousel.ts +321 -0
  91. package/src/elements/adw-clamp.ts +28 -0
  92. package/src/elements/adw-combo-row.ts +32 -20
  93. package/src/elements/adw-entry-row.ts +69 -0
  94. package/src/elements/adw-entry.ts +61 -0
  95. package/src/elements/adw-expander-row.ts +167 -0
  96. package/src/elements/adw-header-bar.ts +21 -8
  97. package/src/elements/adw-inline-view-switcher.ts +222 -0
  98. package/src/elements/adw-navigation-split-view.ts +89 -0
  99. package/src/elements/adw-navigation-view.ts +344 -0
  100. package/src/elements/adw-password-entry-row.ts +121 -0
  101. package/src/elements/adw-preferences-dialog.ts +240 -0
  102. package/src/elements/adw-preferences-group.ts +79 -12
  103. package/src/elements/adw-sidebar.ts +238 -0
  104. package/src/elements/adw-spin-row.ts +28 -14
  105. package/src/elements/adw-spinner.ts +31 -0
  106. package/src/elements/adw-split-button.ts +206 -0
  107. package/src/elements/adw-status-page.ts +66 -0
  108. package/src/elements/adw-switch-row.ts +29 -23
  109. package/src/elements/adw-tab-view.ts +184 -0
  110. package/src/elements/adw-toast-overlay.ts +98 -19
  111. package/src/elements/adw-toggle-group.ts +126 -0
  112. package/src/elements/adw-toolbar-view.ts +60 -0
  113. package/src/elements/adw-view-switcher.ts +200 -0
  114. package/src/elements/adw-window-title.ts +48 -0
  115. package/src/elements/adw-wrap-box.ts +139 -0
  116. package/src/index.js +1 -1
  117. package/src/index.ts +46 -3
  118. package/src/styles.generated.js +2976 -0
  119. package/src/styles2.generated.js +2976 -0
  120. package/style.css.d.ts +17 -4
@@ -0,0 +1,168 @@
1
+ // _button.scss — adw-button + Adwaita button styles + symbolic icons + .linked.
2
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_buttons.scss
3
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
4
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
5
+
6
+ // <adw-button> is a thin host that renders an inner <button class="adw-button">;
7
+ // the class set is the real styling API and works on a plain <button> too.
8
+ adw-button {
9
+ display: inline-flex;
10
+ }
11
+
12
+ .adw-button {
13
+ box-sizing: border-box;
14
+ display: inline-flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ gap: 6px;
18
+ min-height: 34px;
19
+ min-width: 34px;
20
+ margin: 0;
21
+ padding: 4px 14px;
22
+ border: none;
23
+ border-radius: var(--button-radius);
24
+ background-color: var(--button-bg-color);
25
+ color: var(--window-fg-color);
26
+ font-family: var(--font-family);
27
+ font-size: var(--font-size-base);
28
+ font-weight: 700;
29
+ line-height: 1;
30
+ text-decoration: none;
31
+ cursor: pointer;
32
+ transition: background-color 0.1s ease;
33
+ user-select: none;
34
+ -webkit-user-select: none;
35
+
36
+ &:hover {
37
+ background-color: var(--button-hover-color);
38
+ }
39
+
40
+ &:active {
41
+ background-color: var(--button-active-color);
42
+ }
43
+
44
+ &:focus-visible {
45
+ outline: 2px solid var(--accent-color);
46
+ outline-offset: 1px;
47
+ }
48
+
49
+ &:disabled {
50
+ opacity: 0.45;
51
+ cursor: default;
52
+ }
53
+
54
+ // Flat — no resting background; only reacts on hover/active. The header bar's
55
+ // navigation buttons use this.
56
+ &.flat {
57
+ background-color: transparent;
58
+
59
+ &:hover {
60
+ background-color: var(--button-hover-color);
61
+ }
62
+
63
+ &:active {
64
+ background-color: var(--button-active-color);
65
+ }
66
+ }
67
+
68
+ // Suggested action — accent-coloured primary button.
69
+ &.suggested-action {
70
+ background-color: var(--accent-bg-color);
71
+ color: var(--accent-fg-color);
72
+
73
+ &:hover {
74
+ background-color: var(--accent-color);
75
+ }
76
+
77
+ &:active {
78
+ background-color: var(--accent-color);
79
+ filter: brightness(0.92);
80
+ }
81
+ }
82
+
83
+ // Destructive action — red.
84
+ &.destructive-action {
85
+ background-color: var(--destructive-bg-color);
86
+ color: var(--destructive-fg-color);
87
+
88
+ &:hover {
89
+ filter: brightness(1.06);
90
+ }
91
+
92
+ &:active {
93
+ filter: brightness(0.9);
94
+ }
95
+ }
96
+
97
+ // Icon-only square button (no label).
98
+ &.icon-only {
99
+ padding: 0;
100
+ width: 34px;
101
+ }
102
+
103
+ // Circular — round icon button.
104
+ &.circular {
105
+ padding: 0;
106
+ width: 34px;
107
+ border-radius: 9999px;
108
+ }
109
+
110
+ // Pill — fully-rounded ends.
111
+ &.pill {
112
+ padding: 6px 20px;
113
+ border-radius: 9999px;
114
+ }
115
+ }
116
+
117
+ // Symbolic icon rendered via a CSS mask so `currentColor` drives the fill,
118
+ // keeping it theme-aware (same technique as the combo-row dropdown arrow).
119
+ .adw-icon {
120
+ display: inline-block;
121
+ width: 16px;
122
+ height: 16px;
123
+ flex-shrink: 0;
124
+ background-color: currentColor;
125
+ mask-size: 16px;
126
+ mask-repeat: no-repeat;
127
+ mask-position: center;
128
+ -webkit-mask-size: 16px;
129
+ -webkit-mask-repeat: no-repeat;
130
+ -webkit-mask-position: center;
131
+
132
+ // `display: inline-block` (author CSS) otherwise beats the UA `[hidden]`
133
+ // rule, so a hidden icon (e.g. an avatar's fallback icon while initials
134
+ // show) would still render as a solid maskless square. Honor `hidden`.
135
+ &[hidden] {
136
+ display: none;
137
+ }
138
+ }
139
+
140
+ // The per-name `.adw-icon--<name>` mask classes are generated into
141
+ // scss/_icons.generated.scss by scripts/build-scss.mjs (one entry per icon in
142
+ // its ICONS map), so adding an icon is a single map edit.
143
+
144
+ // Linked group — adjacent buttons share edges (segmented control).
145
+ .adw-linked {
146
+ display: inline-flex;
147
+
148
+ > .adw-button,
149
+ > adw-button .adw-button {
150
+ border-radius: 0;
151
+ }
152
+
153
+ > :first-child .adw-button,
154
+ > .adw-button:first-child {
155
+ border-top-left-radius: var(--button-radius);
156
+ border-bottom-left-radius: var(--button-radius);
157
+ }
158
+
159
+ > :last-child .adw-button,
160
+ > .adw-button:last-child {
161
+ border-top-right-radius: var(--button-radius);
162
+ border-bottom-right-radius: var(--button-radius);
163
+ }
164
+
165
+ > * + * {
166
+ margin-left: 2px;
167
+ }
168
+ }
@@ -0,0 +1,48 @@
1
+ // _button_content.scss — adw-button-content styling (icon + label box used as a
2
+ // button child). Mirrors libadwaita's `buttoncontent > box > {image, label}`
3
+ // node: a horizontal box with 6px spacing between icon and label and a bold
4
+ // label, plus optional ellipsizing when `.can-shrink` is set.
5
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_buttons.scss (buttoncontent)
6
+ // Reference: refs/libadwaita/src/adw-button-content.c (AdwButtonContent)
7
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
8
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
9
+
10
+ adw-button-content {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ // Centered as a group, matching the box's halign:center in AdwButtonContent.
14
+ justify-content: center;
15
+ min-width: 0;
16
+
17
+ // The inner box holds the image + label nodes (border-spacing 6px upstream).
18
+ .adw-button-content-box {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ gap: 6px;
23
+ min-width: 0;
24
+ }
25
+
26
+ .adw-button-content-label {
27
+ // libadwaita: `buttoncontent > box > label { font-weight: bold; }` with a
28
+ // 2px trailing pad (LTR) so the label does not hug the button edge.
29
+ font-weight: 700;
30
+ line-height: 1;
31
+ padding-right: 2px;
32
+ }
33
+
34
+ // can-shrink — the label ellipsizes instead of forcing the button wider
35
+ // (Gtk.Label PANGO_ELLIPSIZE_END). The icon keeps its natural size.
36
+ &.can-shrink {
37
+ .adw-button-content-box {
38
+ min-width: 0;
39
+ }
40
+
41
+ .adw-button-content-label {
42
+ overflow: hidden;
43
+ text-overflow: ellipsis;
44
+ white-space: nowrap;
45
+ min-width: 0;
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,100 @@
1
+ // _button_row.scss — adw-button-row styling (a boxed-list row that acts as a
2
+ // button: centered title + optional start icon, with suggested/destructive
3
+ // recoloring).
4
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_lists.scss (row.button)
5
+ // Reference: refs/adwaita-web/adwaita-web/scss/_button_row.scss
6
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
7
+ // Copyright (c) 2025 csm (adwaita-web). MIT License.
8
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
9
+
10
+ adw-button-row {
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ width: 100%;
15
+ min-height: 50px;
16
+ padding: var(--spacing-xs) var(--spacing-m);
17
+ border-bottom: 1px solid var(--card-shade-color);
18
+ color: var(--card-fg-color);
19
+ cursor: pointer;
20
+ transition: background-color 0.1s ease;
21
+
22
+ &:last-child {
23
+ border-bottom: none;
24
+ }
25
+
26
+ // Contents are centered as a group (libadwaita's GtkBox halign:center), with
27
+ // the start icon hugging the title via a small gap (border-spacing 6px).
28
+ .adw-button-row-contents {
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ gap: var(--spacing-xs);
33
+ min-width: 0;
34
+ }
35
+
36
+ .adw-button-row-title {
37
+ font-size: var(--font-size-base);
38
+ font-weight: 700;
39
+ text-align: center;
40
+ color: inherit;
41
+ white-space: nowrap;
42
+ overflow: hidden;
43
+ text-overflow: ellipsis;
44
+ }
45
+
46
+ // Default (no style class): button-like hover/active feedback.
47
+ &.activatable {
48
+ &:hover {
49
+ background-color: var(--button-hover-color);
50
+ }
51
+
52
+ &:active {
53
+ background-color: var(--button-active-color);
54
+ }
55
+ }
56
+
57
+ // Suggested action — accent-coloured, full-bleed (no separator line).
58
+ &.suggested-action {
59
+ background-color: var(--accent-bg-color);
60
+ color: var(--accent-fg-color);
61
+ border-bottom: none;
62
+
63
+ &.activatable {
64
+ &:hover {
65
+ background-color: var(--accent-bg-color);
66
+ background-image: linear-gradient(
67
+ color-mix(in srgb, currentColor 10%, transparent),
68
+ color-mix(in srgb, currentColor 10%, transparent)
69
+ );
70
+ }
71
+
72
+ &:active {
73
+ background-color: var(--accent-bg-color);
74
+ background-image: linear-gradient(rgba(0, 0, 6, 0.2), rgba(0, 0, 6, 0.2));
75
+ }
76
+ }
77
+ }
78
+
79
+ // Destructive action — red, same full-bleed treatment as suggested.
80
+ &.destructive-action {
81
+ background-color: var(--destructive-bg-color);
82
+ color: var(--destructive-fg-color);
83
+ border-bottom: none;
84
+
85
+ &.activatable {
86
+ &:hover {
87
+ background-color: var(--destructive-bg-color);
88
+ background-image: linear-gradient(
89
+ color-mix(in srgb, currentColor 10%, transparent),
90
+ color-mix(in srgb, currentColor 10%, transparent)
91
+ );
92
+ }
93
+
94
+ &:active {
95
+ background-color: var(--destructive-bg-color);
96
+ background-image: linear-gradient(rgba(0, 0, 6, 0.2), rgba(0, 0, 6, 0.2));
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,130 @@
1
+ // _carousel.scss — adw-carousel + its dot/line page indicators.
2
+ //
3
+ // A horizontal scroll-snap pager (adw-carousel) plus two indicator widgets that
4
+ // bind to it. The indicators reproduce libadwaita's snapshot drawing as CSS: a
5
+ // per-marker `--adw-carousel-progress` (0 = inactive, 1 = focused) lerps between
6
+ // the inactive and selected size/opacity exactly as AdwCarousel does.
7
+ //
8
+ // Dots: DOTS_RADIUS 3 → DOTS_RADIUS_SELECTED 4 (6px → 8px), DOTS_SPACING 7,
9
+ // DOTS_OPACITY 0.3 → DOTS_OPACITY_SELECTED 0.9, active fill = accent.
10
+ // Lines: LINE_LENGTH 35, LINE_WIDTH 3, LINE_SPACING 5, LINE_OPACITY 0.3 →
11
+ // LINE_OPACITY_ACTIVE 0.9, active fill = accent.
12
+ //
13
+ // Reference: refs/libadwaita/src/adw-carousel.c
14
+ // Reference: refs/libadwaita/src/adw-carousel-indicator-dots.c
15
+ // Reference: refs/libadwaita/src/adw-carousel-indicator-lines.c
16
+ // Reference: refs/adwaita-web/adwaita-web/scss/_carousel_indicators.scss
17
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
18
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
19
+
20
+ adw-carousel {
21
+ display: block;
22
+ overflow: hidden;
23
+
24
+ .adw-carousel-track {
25
+ display: flex;
26
+ flex-direction: row;
27
+ height: 100%;
28
+ overflow-x: auto;
29
+ scroll-snap-type: x mandatory;
30
+ // Hide the scrollbar — the carousel is paged, not scrolled by chrome.
31
+ scrollbar-width: none;
32
+ -ms-overflow-style: none;
33
+
34
+ &::-webkit-scrollbar {
35
+ display: none;
36
+ }
37
+ }
38
+
39
+ .adw-carousel-page {
40
+ flex: 0 0 100%;
41
+ box-sizing: border-box;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ scroll-snap-align: start;
46
+ scroll-snap-stop: always;
47
+ }
48
+ }
49
+
50
+ // Shared layout for both indicator kinds — a centered, horizontally-laid-out
51
+ // row of markers (matching the AdwCarouselIndicator* widgets).
52
+ adw-carousel-indicator-dots,
53
+ adw-carousel-indicator-lines {
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ padding: var(--spacing-xs);
58
+
59
+ // The clickable marker resets the button chrome — the visible shape is drawn
60
+ // by the per-kind rules below.
61
+ button {
62
+ appearance: none;
63
+ -webkit-appearance: none;
64
+ margin: 0;
65
+ padding: 0;
66
+ border: none;
67
+ background: none;
68
+ cursor: pointer;
69
+ flex: 0 0 auto;
70
+ }
71
+ }
72
+
73
+ // Dots — DOTS_SPACING 7px between centers; base diameter 6px (radius 3) growing
74
+ // to 8px (radius 4) on the focused dot, opacity ramping 0.3 → 0.9.
75
+ adw-carousel-indicator-dots {
76
+ gap: 7px;
77
+
78
+ .adw-carousel-dot {
79
+ width: 8px;
80
+ height: 8px;
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+
85
+ // The painted disc lives in ::before so the 8px hit-target stays constant
86
+ // while the visible dot grows from 6px → 8px with progress.
87
+ &::before {
88
+ content: '';
89
+ display: block;
90
+ // 6px + (8px - 6px) * progress
91
+ width: calc(6px + 2px * var(--adw-carousel-progress, 0));
92
+ height: calc(6px + 2px * var(--adw-carousel-progress, 0));
93
+ border-radius: 50%;
94
+ background-color: var(--window-fg-color);
95
+ // 0.3 + (0.9 - 0.3) * progress
96
+ opacity: calc(0.3 + 0.6 * var(--adw-carousel-progress, 0));
97
+ transition:
98
+ width 0.2s ease,
99
+ height 0.2s ease,
100
+ opacity 0.2s ease,
101
+ background-color 0.2s ease;
102
+ }
103
+
104
+ &.active::before {
105
+ background-color: var(--window-fg-color);
106
+ }
107
+ }
108
+ }
109
+
110
+ // Lines — LINE_LENGTH 35px, LINE_WIDTH 3px, LINE_SPACING 5px; opacity ramps
111
+ // 0.3 → 0.9; the active line recolors to the accent.
112
+ adw-carousel-indicator-lines {
113
+ gap: 5px;
114
+
115
+ .adw-carousel-line {
116
+ width: 35px;
117
+ height: 3px;
118
+ border-radius: 1.5px;
119
+ background-color: var(--window-fg-color);
120
+ // 0.3 + (0.9 - 0.3) * progress
121
+ opacity: calc(0.3 + 0.6 * var(--adw-carousel-progress, 0));
122
+ transition:
123
+ opacity 0.2s ease,
124
+ background-color 0.2s ease;
125
+
126
+ &.active {
127
+ background-color: var(--window-fg-color);
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,11 @@
1
+ // _clamp.scss — adw-clamp styling (max-width + centered).
2
+ // Reference: refs/adwaita-web/adwaita-web/scss/_clamp.scss
3
+ // Reference: refs/libadwaita (Adw.Clamp)
4
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
5
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
6
+
7
+ adw-clamp {
8
+ display: block;
9
+ width: 100%;
10
+ margin-inline: auto;
11
+ }
@@ -0,0 +1,49 @@
1
+ // _entry.scss — adw-entry / .adw-entry text input (e.g. a browser URL bar).
2
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_entries.scss
3
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
4
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
5
+
6
+ // <adw-entry> hosts an inner <input class="adw-entry">; it fills its flex slot.
7
+ adw-entry {
8
+ display: flex;
9
+ flex: 1;
10
+ min-width: 0;
11
+ }
12
+
13
+ .adw-entry {
14
+ box-sizing: border-box;
15
+ width: 100%;
16
+ min-height: 34px;
17
+ margin: 0;
18
+ padding: 5px 12px;
19
+ border: none;
20
+ border-radius: var(--button-radius);
21
+ background-color: var(--entry-bg-color);
22
+ color: var(--view-fg-color);
23
+ font-family: var(--font-family);
24
+ font-size: var(--font-size-base);
25
+ box-shadow: inset 0 0 0 1px var(--entry-border-color);
26
+ transition: box-shadow 0.1s ease;
27
+
28
+ &::placeholder {
29
+ color: var(--view-fg-color);
30
+ opacity: var(--dim-opacity);
31
+ }
32
+
33
+ &:hover {
34
+ box-shadow: inset 0 0 0 1px var(--entry-border-hover-color);
35
+ }
36
+
37
+ &:focus,
38
+ &:focus-visible {
39
+ outline: none;
40
+ box-shadow: inset 0 0 0 2px var(--accent-color);
41
+ }
42
+
43
+ // Dimmed disabled state, mirroring .adw-button:disabled.
44
+ &:disabled {
45
+ opacity: 0.45;
46
+ cursor: default;
47
+ box-shadow: inset 0 0 0 1px var(--entry-border-color);
48
+ }
49
+ }
@@ -0,0 +1,54 @@
1
+ // _entry_row.scss — adw-entry-row styling (inline editable boxed-list row).
2
+ // Reference: refs/adwaita-web/adwaita-web/scss/_entry_row.scss
3
+ // Reference: refs/libadwaita/src/stylesheet/widgets/_entries.scss
4
+ // Copyright (c) GNOME contributors (libadwaita). LGPLv2.1+.
5
+ // Copyright (c) 2025 csm (adwaita-web). MIT License.
6
+ // Modifications: Adapted for @gjsify/adwaita-web Web Components.
7
+
8
+ adw-entry-row {
9
+ display: flex;
10
+ align-items: center;
11
+ gap: var(--spacing-m);
12
+ min-height: 50px;
13
+ padding: var(--spacing-xs) var(--spacing-m);
14
+ border-bottom: 1px solid var(--card-shade-color);
15
+
16
+ &:last-child {
17
+ border-bottom: none;
18
+ }
19
+
20
+ // Focus ring matching libadwaita's row focus (inset accent outline).
21
+ &:focus-within {
22
+ box-shadow: inset 0 0 0 2px var(--accent-color);
23
+ }
24
+
25
+ // Filled Adw.EntryRow layout: a small floating title above the value,
26
+ // both left-aligned in a column.
27
+ .adw-entry-row-text {
28
+ display: flex;
29
+ flex-direction: column;
30
+ justify-content: center;
31
+ flex: 1 1 auto;
32
+ min-width: 0;
33
+ gap: 1px;
34
+ }
35
+
36
+ .adw-row-title {
37
+ font-size: var(--font-size-small);
38
+ color: var(--card-fg-color);
39
+ opacity: var(--dim-opacity);
40
+ }
41
+
42
+ .adw-entry-row-input {
43
+ width: 100%;
44
+ min-width: 0;
45
+ border: none;
46
+ background: transparent;
47
+ color: var(--card-fg-color);
48
+ font-family: var(--font-family);
49
+ font-size: var(--font-size-base);
50
+ text-align: left;
51
+ outline: none;
52
+ padding: 0;
53
+ }
54
+ }