@grantcodes/ui 2.9.2 → 2.10.1

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 (97) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/src/components/accordion/accordion.component.js +3 -1
  4. package/src/components/accordion/accordion.css +78 -57
  5. package/src/components/accordion/accordion.react.js +4 -4
  6. package/src/components/app-bar/app-bar.component.js +15 -9
  7. package/src/components/app-bar/app-bar.css +256 -250
  8. package/src/components/app-bar/app-bar.react.js +4 -4
  9. package/src/components/app-bar/app-bar.test.js +1 -3
  10. package/src/components/app-bar/nav-link.component.js +3 -1
  11. package/src/components/app-bar/nav-link.css +50 -45
  12. package/src/components/app-bar/nav-link.react.js +4 -4
  13. package/src/components/avatar/avatar.css +19 -21
  14. package/src/components/avatar/avatar.react.js +4 -4
  15. package/src/components/badge/badge.css +51 -51
  16. package/src/components/badge/badge.react.js +4 -4
  17. package/src/components/breadcrumb/breadcrumb.component.js +3 -1
  18. package/src/components/breadcrumb/breadcrumb.css +73 -73
  19. package/src/components/breadcrumb/breadcrumb.react.js +8 -5
  20. package/src/components/button/button.component.js +3 -1
  21. package/src/components/button/button.css +38 -38
  22. package/src/components/button/button.react.js +4 -4
  23. package/src/components/button-group/button-group.css +33 -33
  24. package/src/components/button-group/button-group.react.js +4 -4
  25. package/src/components/card/card.css +150 -150
  26. package/src/components/card/card.react.js +4 -4
  27. package/src/components/code-preview/code-preview.css +11 -12
  28. package/src/components/code-preview/code-preview.react.js +4 -4
  29. package/src/components/container/container.css +37 -37
  30. package/src/components/container/container.react.js +4 -4
  31. package/src/components/countdown/countdown.component.js +5 -3
  32. package/src/components/countdown/countdown.stories.js +1 -2
  33. package/src/components/cta/cta.css +55 -55
  34. package/src/components/cta/cta.react.js +4 -4
  35. package/src/components/dialog/dialog.css +48 -49
  36. package/src/components/dialog/dialog.react.js +4 -4
  37. package/src/components/dropdown/dropdown.css +123 -121
  38. package/src/components/dropdown/dropdown.react.js +5 -5
  39. package/src/components/dropzone/dropzone.css +5 -3
  40. package/src/components/dropzone/dropzone.react.js +4 -4
  41. package/src/components/feature-list/feature-list.css +71 -71
  42. package/src/components/feature-list/feature-list.react.js +4 -4
  43. package/src/components/footer/footer-column.css +39 -39
  44. package/src/components/footer/footer.css +68 -69
  45. package/src/components/footer/footer.react.js +5 -5
  46. package/src/components/form-field/form-field.css +40 -40
  47. package/src/components/form-field/form-field.react.js +4 -4
  48. package/src/components/gallery/gallery-image.react.js +4 -4
  49. package/src/components/gallery/gallery.css +72 -72
  50. package/src/components/gallery/gallery.react.js +4 -4
  51. package/src/components/gallery/gallery.test.js +5 -1
  52. package/src/components/hero/hero.css +61 -57
  53. package/src/components/hero/hero.react.js +4 -4
  54. package/src/components/icon/icon.css +27 -27
  55. package/src/components/icon/icon.react.js +4 -4
  56. package/src/components/loading/loading.css +30 -31
  57. package/src/components/loading/loading.react.js +4 -4
  58. package/src/components/logo-cloud/logo-cloud.css +60 -60
  59. package/src/components/logo-cloud/logo-cloud.react.js +4 -4
  60. package/src/components/map/map.component.js +3 -4
  61. package/src/components/map/map.css +36 -36
  62. package/src/components/media-text/media-text.css +58 -58
  63. package/src/components/media-text/media-text.react.js +4 -4
  64. package/src/components/newsletter/newsletter.css +78 -78
  65. package/src/components/newsletter/newsletter.react.js +4 -4
  66. package/src/components/notice/notice.css +38 -38
  67. package/src/components/notice/notice.react.js +4 -4
  68. package/src/components/pagination/pagination.css +6 -7
  69. package/src/components/pagination/pagination.react.js +4 -4
  70. package/src/components/pricing/pricing.css +137 -137
  71. package/src/components/pricing/pricing.react.js +4 -4
  72. package/src/components/sidebar/sidebar.component.js +3 -1
  73. package/src/components/sidebar/sidebar.css +180 -180
  74. package/src/components/sidebar/sidebar.react.js +4 -4
  75. package/src/components/stats/stats.css +58 -58
  76. package/src/components/stats/stats.react.js +4 -4
  77. package/src/components/tabs/internal/tabs-button.component.js +3 -1
  78. package/src/components/tabs/internal/tabs-button.react.js +4 -4
  79. package/src/components/tabs/tab.component.js +3 -1
  80. package/src/components/tabs/tab.react.js +4 -4
  81. package/src/components/tabs/tabs.component.js +3 -1
  82. package/src/components/tabs/tabs.css +82 -82
  83. package/src/components/tabs/tabs.react.js +4 -4
  84. package/src/components/testimonials/testimonials.css +72 -72
  85. package/src/components/testimonials/testimonials.react.js +4 -4
  86. package/src/components/toast/toast.component.js +3 -1
  87. package/src/components/toast/toast.css +198 -198
  88. package/src/components/toast/toast.react.js +5 -5
  89. package/src/components/tooltip/tooltip.css +52 -51
  90. package/src/components/tooltip/tooltip.react.js +4 -4
  91. package/src/css/reset.css +7 -3
  92. package/src/css/typography.css +13 -11
  93. package/src/exports.test.js +101 -95
  94. package/src/lib/styles/all.css +37 -37
  95. package/src/lib/styles/focus-ring.css +20 -20
  96. package/src/react.js +45 -39
  97. package/vite-plugin-css-import-attributes.js +5 -2
@@ -1,253 +1,259 @@
1
- *,
2
- *::before,
3
- *::after {
4
- box-sizing: border-box;
5
- }
6
-
7
- :host {
8
- display: block;
9
- container-type: inline-size;
10
- container-name: app-bar;
11
- }
12
-
13
- .app-bar {
14
- background-color: var(--g-theme-color-background-default);
15
- border-block-end: 1px solid var(--g-theme-color-border-default);
16
- position: relative;
17
- z-index: 100;
18
- }
19
-
20
- .app-bar--sticky {
21
- position: sticky;
22
- inset-block-start: 0;
23
- }
24
-
25
- .app-bar--transparent {
26
- background-color: transparent;
27
- border-block-end-color: transparent;
28
- box-shadow: none;
29
- }
30
-
31
- /* Top bar row — always visible */
32
- .app-bar__bar {
33
- display: flex;
34
- align-items: center;
35
- gap: var(--g-theme-spacing-lg);
36
- padding-inline: var(--g-theme-spacing-md);
37
- padding-block: var(--g-theme-spacing-md);
38
- max-inline-size: 1400px;
39
- margin-inline: auto;
40
- }
41
-
42
- /* Logo */
43
- .app-bar__logo {
44
- display: flex;
45
- align-items: center;
46
- flex-shrink: 0;
47
- }
48
-
49
- /* Navigation — hidden on mobile, shown on desktop */
50
- .app-bar__nav {
51
- display: none;
52
- }
53
-
54
- /* Actions */
55
- .app-bar__actions {
56
- display: flex;
57
- align-items: center;
58
- gap: var(--g-theme-spacing-sm);
59
- margin-inline-start: auto;
60
- }
61
-
62
- /* Mobile Menu Button */
63
- .app-bar__menu-button {
64
- all: unset;
65
- display: flex;
66
- align-items: center;
67
- justify-content: center;
68
- inline-size: 2.75rem;
69
- block-size: 2.75rem;
70
- padding: var(--g-theme-spacing-sm);
71
- border-radius: var(--g-theme-border-radius-md);
72
- cursor: pointer;
73
- color: var(--g-theme-color-content-default);
74
- transition: background-color 0.2s ease;
75
- }
76
-
77
- .app-bar__menu-button:hover {
78
- background-color: var(--g-theme-color-background-subtle-hover);
79
- }
80
-
81
- /* Hamburger Icon */
82
- .app-bar__menu-icon {
83
- display: block;
84
- inline-size: 1.25rem;
85
- block-size: 1rem;
86
- position: relative;
87
- }
88
-
89
- .app-bar__menu-icon::before,
90
- .app-bar__menu-icon::after {
91
- content: "";
92
- position: absolute;
93
- inline-size: 100%;
94
- block-size: 2px;
95
- inset-inline-start: 0;
96
- background-color: currentColor;
97
- transition: transform 0.2s ease, inset 0.2s ease;
98
- }
99
-
100
- .app-bar__menu-icon::before {
101
- inset-block-start: 0;
102
- box-shadow: 0 0.4375rem 0 currentColor;
103
- }
104
-
105
- .app-bar__menu-icon::after {
106
- inset-block-end: 0;
107
- }
108
-
109
- /* Animated hamburger to X */
110
- .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::before {
111
- inset-block-start: calc(50% - 1px);
112
- transform: rotate(45deg);
113
- box-shadow: none;
114
- }
115
-
116
- .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::after {
117
- inset-block-end: calc(50% - 1px);
118
- transform: rotate(-45deg);
119
- }
120
-
121
- /*
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ :host {
8
+ display: block;
9
+ container-type: inline-size;
10
+ container-name: app-bar;
11
+ }
12
+
13
+ .app-bar {
14
+ background-color: var(--g-theme-color-background-default);
15
+ border-block-end: 1px solid var(--g-theme-color-border-default);
16
+ position: relative;
17
+ z-index: 100;
18
+ }
19
+
20
+ .app-bar--sticky {
21
+ position: sticky;
22
+ inset-block-start: 0;
23
+ }
24
+
25
+ .app-bar--transparent {
26
+ background-color: transparent;
27
+ border-block-end-color: transparent;
28
+ box-shadow: none;
29
+ }
30
+
31
+ /* Top bar row — always visible */
32
+ .app-bar__bar {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: var(--g-theme-spacing-lg);
36
+ padding-inline: var(--g-theme-spacing-md);
37
+ padding-block: var(--g-theme-spacing-md);
38
+ max-inline-size: 1400px;
39
+ margin-inline: auto;
40
+ }
41
+
42
+ /* Logo */
43
+ .app-bar__logo {
44
+ display: flex;
45
+ align-items: center;
46
+ flex-shrink: 0;
47
+ }
48
+
49
+ /* Navigation — hidden on mobile, shown on desktop */
50
+ .app-bar__nav {
51
+ display: none;
52
+ }
53
+
54
+ /* Actions */
55
+ .app-bar__actions {
56
+ display: flex;
57
+ align-items: center;
58
+ gap: var(--g-theme-spacing-sm);
59
+ margin-inline-start: auto;
60
+ }
61
+
62
+ /* Mobile Menu Button */
63
+ .app-bar__menu-button {
64
+ all: unset;
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ inline-size: 2.75rem;
69
+ block-size: 2.75rem;
70
+ padding: var(--g-theme-spacing-sm);
71
+ border-radius: var(--g-theme-border-radius-md);
72
+ cursor: pointer;
73
+ color: var(--g-theme-color-content-default);
74
+ transition: background-color 0.2s ease;
75
+ }
76
+
77
+ .app-bar__menu-button:hover {
78
+ background-color: var(--g-theme-color-background-subtle-hover);
79
+ }
80
+
81
+ /* Hamburger Icon */
82
+ .app-bar__menu-icon {
83
+ display: block;
84
+ inline-size: 1.25rem;
85
+ block-size: 1rem;
86
+ position: relative;
87
+ }
88
+
89
+ .app-bar__menu-icon::before,
90
+ .app-bar__menu-icon::after {
91
+ content: "";
92
+ position: absolute;
93
+ inline-size: 100%;
94
+ block-size: 2px;
95
+ inset-inline-start: 0;
96
+ background-color: currentColor;
97
+ transition:
98
+ transform 0.2s ease,
99
+ inset 0.2s ease;
100
+ }
101
+
102
+ .app-bar__menu-icon::before {
103
+ inset-block-start: 0;
104
+ box-shadow: 0 0.4375rem 0 currentColor;
105
+ }
106
+
107
+ .app-bar__menu-icon::after {
108
+ inset-block-end: 0;
109
+ }
110
+
111
+ /* Animated hamburger to X */
112
+ .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::before {
113
+ inset-block-start: calc(50% - 1px);
114
+ transform: rotate(45deg);
115
+ box-shadow: none;
116
+ }
117
+
118
+ .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::after {
119
+ inset-block-end: calc(50% - 1px);
120
+ transform: rotate(-45deg);
121
+ }
122
+
123
+ /*
122
124
  * Mobile menu — full-width panel below the app bar.
123
125
  * Uses clip-path for a clean slide-down reveal animation.
124
126
  */
125
- .app-bar__nav--open {
126
- display: flex;
127
- flex-direction: column;
128
- gap: var(--g-theme-spacing-xs, 0.25rem);
129
- position: absolute;
130
- inset-inline: 0;
131
- inset-block-start: 100%;
132
- z-index: 99;
133
- background-color: var(--g-theme-color-background-default);
134
- border-block-end: 1px solid var(--g-theme-color-border-default);
135
- padding-block: var(--g-theme-spacing-md);
136
- padding-inline: var(--g-theme-spacing-md);
137
- box-shadow: var(--g-theme-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
138
- animation: menu-open 0.25s ease-out;
139
- }
140
-
141
- @keyframes menu-open {
142
- from {
143
- opacity: 0;
144
- transform: translateY(-0.5rem);
145
- }
146
- to {
147
- opacity: 1;
148
- transform: translateY(0);
149
- }
150
- }
151
-
152
- /* Slotted nav content stacks vertically in mobile menu */
153
- .app-bar__nav--open ::slotted(ul),
154
- .app-bar__nav--open ::slotted(div[slot="nav"]) {
155
- display: flex;
156
- flex-direction: column;
157
- gap: var(--g-theme-spacing-xs, 0.25rem);
158
- margin: 0;
159
- padding: 0;
160
- list-style: none;
161
- }
162
-
163
- /* Backdrop overlay — covers viewport below app bar when menu is open */
164
- .app-bar__overlay {
165
- display: none;
166
- }
167
-
168
- .app-bar__overlay--visible {
169
- display: block;
170
- position: fixed;
171
- inset: 0;
172
- z-index: 98;
173
- background-color: rgba(0, 0, 0, 0.2);
174
- animation: overlay-fade 0.2s ease-out;
175
- }
176
-
177
- @keyframes overlay-fade {
178
- from { opacity: 0; }
179
- to { opacity: 1; }
180
- }
181
-
182
- /* Reduced motion preferences */
183
- @media (prefers-reduced-motion: reduce) {
184
- .app-bar__menu-icon::before,
185
- .app-bar__menu-icon::after {
186
- transition: none;
187
- }
188
-
189
- .app-bar__menu-button {
190
- transition: none;
191
- }
192
-
193
- .app-bar__nav--open {
194
- animation: none;
195
- }
196
-
197
- .app-bar__overlay--visible {
198
- animation: none;
199
- }
200
- }
201
-
202
- /* Desktop: show nav inline, hide hamburger */
203
- @container app-bar (min-width: 768px) {
204
- .app-bar__nav {
205
- display: flex;
206
- flex-direction: row;
207
- align-items: center;
208
- gap: var(--g-theme-spacing-xs, 0.25rem);
209
- flex: 1;
210
- }
211
-
212
- /* Reset mobile-open styles at desktop — nav is always inline */
213
- .app-bar__nav--open {
214
- position: static;
215
- background-color: transparent;
216
- border: 0;
217
- padding: 0;
218
- box-shadow: none;
219
- animation: none;
220
- flex-direction: row;
221
- }
222
-
223
- .app-bar__actions {
224
- order: 3;
225
- }
226
-
227
- .app-bar__menu-button {
228
- display: none;
229
- }
230
-
231
- /* Overlay is never visible on desktop */
232
- .app-bar__overlay--visible {
233
- display: none;
234
- }
235
- }
236
-
237
- /* Slotted content styling */
238
- ::slotted(a[slot="logo"]) {
239
- color: var(--g-theme-color-content-default) !important;
240
- text-decoration: none !important;
241
- font-family: var(--g-theme-typography-label-font-family);
242
- font-weight: var(--g-theme-typography-label-font-weight);
243
- }
244
-
245
- ::slotted(ul),
246
- ::slotted(div[slot="nav"]) {
247
- display: flex;
248
- flex-direction: row;
249
- gap: var(--g-theme-spacing-xs, 0.25rem);
250
- margin: 0;
251
- padding: 0;
252
- list-style: none;
253
- }
127
+ .app-bar__nav--open {
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: var(--g-theme-spacing-xs, 0.25rem);
131
+ position: absolute;
132
+ inset-inline: 0;
133
+ inset-block-start: 100%;
134
+ z-index: 99;
135
+ background-color: var(--g-theme-color-background-default);
136
+ border-block-end: 1px solid var(--g-theme-color-border-default);
137
+ padding-block: var(--g-theme-spacing-md);
138
+ padding-inline: var(--g-theme-spacing-md);
139
+ box-shadow: var(--g-theme-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
140
+ animation: menu-open 0.25s ease-out;
141
+ }
142
+
143
+ @keyframes menu-open {
144
+ from {
145
+ opacity: 0;
146
+ transform: translateY(-0.5rem);
147
+ }
148
+ to {
149
+ opacity: 1;
150
+ transform: translateY(0);
151
+ }
152
+ }
153
+
154
+ /* Slotted nav content stacks vertically in mobile menu */
155
+ .app-bar__nav--open ::slotted(ul),
156
+ .app-bar__nav--open ::slotted(div[slot="nav"]) {
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: var(--g-theme-spacing-xs, 0.25rem);
160
+ margin: 0;
161
+ padding: 0;
162
+ list-style: none;
163
+ }
164
+
165
+ /* Backdrop overlay — covers viewport below app bar when menu is open */
166
+ .app-bar__overlay {
167
+ display: none;
168
+ }
169
+
170
+ .app-bar__overlay--visible {
171
+ display: block;
172
+ position: fixed;
173
+ inset: 0;
174
+ z-index: 98;
175
+ background-color: rgba(0, 0, 0, 0.2);
176
+ animation: overlay-fade 0.2s ease-out;
177
+ }
178
+
179
+ @keyframes overlay-fade {
180
+ from {
181
+ opacity: 0;
182
+ }
183
+ to {
184
+ opacity: 1;
185
+ }
186
+ }
187
+
188
+ /* Reduced motion preferences */
189
+ @media (prefers-reduced-motion: reduce) {
190
+ .app-bar__menu-icon::before,
191
+ .app-bar__menu-icon::after {
192
+ transition: none;
193
+ }
194
+
195
+ .app-bar__menu-button {
196
+ transition: none;
197
+ }
198
+
199
+ .app-bar__nav--open {
200
+ animation: none;
201
+ }
202
+
203
+ .app-bar__overlay--visible {
204
+ animation: none;
205
+ }
206
+ }
207
+
208
+ /* Desktop: show nav inline, hide hamburger */
209
+ @container app-bar (min-width: 768px) {
210
+ .app-bar__nav {
211
+ display: flex;
212
+ flex-direction: row;
213
+ align-items: center;
214
+ gap: var(--g-theme-spacing-xs, 0.25rem);
215
+ flex: 1;
216
+ }
217
+
218
+ /* Reset mobile-open styles at desktop — nav is always inline */
219
+ .app-bar__nav--open {
220
+ position: static;
221
+ background-color: transparent;
222
+ border: 0;
223
+ padding: 0;
224
+ box-shadow: none;
225
+ animation: none;
226
+ flex-direction: row;
227
+ }
228
+
229
+ .app-bar__actions {
230
+ order: 3;
231
+ }
232
+
233
+ .app-bar__menu-button {
234
+ display: none;
235
+ }
236
+
237
+ /* Overlay is never visible on desktop */
238
+ .app-bar__overlay--visible {
239
+ display: none;
240
+ }
241
+ }
242
+
243
+ /* Slotted content styling */
244
+ ::slotted(a[slot="logo"]) {
245
+ color: var(--g-theme-color-content-default) !important;
246
+ text-decoration: none !important;
247
+ font-family: var(--g-theme-typography-label-font-family);
248
+ font-weight: var(--g-theme-typography-label-font-weight);
249
+ }
250
+
251
+ ::slotted(ul),
252
+ ::slotted(div[slot="nav"]) {
253
+ display: flex;
254
+ flex-direction: row;
255
+ gap: var(--g-theme-spacing-xs, 0.25rem);
256
+ margin: 0;
257
+ padding: 0;
258
+ list-style: none;
259
+ }
@@ -1,6 +1,6 @@
1
- import React from "react"
2
- import { createComponent } from "@lit/react"
3
- import { GrantCodesAppBar } from "./app-bar.js"
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { GrantCodesAppBar } from "./app-bar.js";
4
4
 
5
5
  export const AppBar = createComponent({
6
6
  tagName: "grantcodes-app-bar",
@@ -9,4 +9,4 @@ export const AppBar = createComponent({
9
9
  events: {
10
10
  onMenuToggle: "menu-toggle",
11
11
  },
12
- })
12
+ });
@@ -113,9 +113,7 @@ describe("App Bar Component", () => {
113
113
 
114
114
  await element.updateComplete;
115
115
 
116
- const mobileNav = element.shadowRoot.querySelector(
117
- ".app-bar__nav--open",
118
- );
116
+ const mobileNav = element.shadowRoot.querySelector(".app-bar__nav--open");
119
117
  assert.ok(mobileNav, "Mobile nav should be rendered when open");
120
118
  });
121
119
 
@@ -1,5 +1,7 @@
1
1
  import { LitElement, html } from "lit";
2
- import focusRingStyles from "../../lib/styles/focus-ring.css" with { type: "css" };
2
+ import focusRingStyles from "../../lib/styles/focus-ring.css" with {
3
+ type: "css",
4
+ };
3
5
  import navLinkStyles from "./nav-link.css" with { type: "css" };
4
6
 
5
7
  export class GrantCodesNavLink extends LitElement {
@@ -1,26 +1,30 @@
1
- *,
2
- *::before,
3
- *::after {
4
- box-sizing: border-box;
5
- }
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
6
 
7
- :host {
8
- display: inline-flex;
9
- }
7
+ :host {
8
+ display: inline-flex;
9
+ }
10
10
 
11
- .nav-link {
12
- display: inline-flex;
13
- align-items: center;
14
- border-radius: var(--g-theme-border-radius-md);
15
- background-color: transparent;
16
- transition: background-color 0.15s ease;
17
- }
11
+ .nav-link {
12
+ display: inline-flex;
13
+ align-items: center;
14
+ border-radius: var(--g-theme-border-radius-md);
15
+ background-color: transparent;
16
+ transition: background-color 0.15s ease;
17
+ }
18
18
 
19
- .nav-link:hover {
20
- background-color: color-mix(in srgb, var(--g-theme-color-content-default) 8%, transparent);
21
- }
19
+ .nav-link:hover {
20
+ background-color: color-mix(
21
+ in srgb,
22
+ var(--g-theme-color-content-default) 8%,
23
+ transparent
24
+ );
25
+ }
22
26
 
23
- /*
27
+ /*
24
28
  * Override light-DOM :where(a) base styles for slotted links.
25
29
  * ::slotted() has lower cascade priority than outer-tree normal rules,
26
30
  * so !important is needed for properties that the base layer also sets
@@ -28,31 +32,32 @@
28
32
  * use-case — nav links must look like ghost buttons regardless of what
29
33
  * global link styles exist in the light DOM.
30
34
  */
31
- ::slotted(a),
32
- ::slotted(a:visited),
33
- ::slotted(a:hover),
34
- ::slotted(a:active),
35
- ::slotted(a:focus-visible) {
36
- display: inline-flex;
37
- align-items: center;
38
- color: var(--g-theme-color-content-default) !important;
39
- text-decoration: none !important;
40
- opacity: 1 !important;
41
- padding-block: var(--g-theme-spacing-xs, 0.25rem);
42
- padding-inline: var(--g-theme-spacing-sm);
43
- font-family: var(--g-theme-typography-label-font-family);
44
- font-weight: var(--g-theme-typography-label-font-weight);
45
- white-space: nowrap;
46
- }
35
+ ::slotted(a),
36
+ ::slotted(a:visited),
37
+ ::slotted(a:hover),
38
+ ::slotted(a:active),
39
+ ::slotted(a:focus-visible) {
40
+ display: inline-flex;
41
+ align-items: center;
42
+ color: var(--g-theme-color-content-default) !important;
43
+ text-decoration: none !important;
44
+ opacity: 1 !important;
45
+ padding-block: var(--g-theme-spacing-xs, 0.25rem);
46
+ padding-inline: var(--g-theme-spacing-sm);
47
+ font-family: var(--g-theme-typography-label-font-family);
48
+ font-weight: var(--g-theme-typography-label-font-weight);
49
+ white-space: nowrap;
50
+ }
47
51
 
48
- ::slotted(a:focus-visible) {
49
- outline: var(--g-theme-focus-ring-width-default) solid var(--g-theme-focus-ring-color-default);
50
- outline-offset: var(--g-theme-focus-ring-offset-default);
51
- border-radius: var(--g-theme-border-radius-md);
52
- }
52
+ ::slotted(a:focus-visible) {
53
+ outline: var(--g-theme-focus-ring-width-default) solid
54
+ var(--g-theme-focus-ring-color-default);
55
+ outline-offset: var(--g-theme-focus-ring-offset-default);
56
+ border-radius: var(--g-theme-border-radius-md);
57
+ }
53
58
 
54
- @media (prefers-reduced-motion: reduce) {
55
- .nav-link {
56
- transition: none;
57
- }
58
- }
59
+ @media (prefers-reduced-motion: reduce) {
60
+ .nav-link {
61
+ transition: none;
62
+ }
63
+ }
@@ -1,9 +1,9 @@
1
- import React from "react"
2
- import { createComponent } from "@lit/react"
3
- import { GrantCodesNavLink } from "./nav-link.js"
1
+ import React from "react";
2
+ import { createComponent } from "@lit/react";
3
+ import { GrantCodesNavLink } from "./nav-link.js";
4
4
 
5
5
  export const NavLink = createComponent({
6
6
  tagName: "grantcodes-nav-link",
7
7
  elementClass: GrantCodesNavLink,
8
8
  react: React,
9
- })
9
+ });