@grantcodes/ui 2.0.0 → 2.1.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 (181) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/custom-elements.json +1926 -191
  3. package/package.json +7 -6
  4. package/src/components/accordion/accordion.component.js +33 -0
  5. package/src/components/accordion/accordion.js +6 -0
  6. package/src/components/accordion/accordion.stories.js +88 -0
  7. package/src/components/accordion/accordion.styles.js +66 -0
  8. package/src/components/accordion/index.js +6 -0
  9. package/src/components/app-bar/app-bar.component.js +1 -3
  10. package/src/components/app-bar/app-bar.js +0 -2
  11. package/src/components/app-bar/app-bar.styles.js +222 -221
  12. package/src/components/app-bar/app-bar.test.js +58 -17
  13. package/src/components/app-bar/index.js +0 -2
  14. package/src/components/avatar/avatar.js +0 -12
  15. package/src/components/avatar/avatar.stories.js +0 -12
  16. package/src/components/avatar/avatar.styles.js +19 -19
  17. package/src/components/avatar/avatar.test.js +4 -4
  18. package/src/components/avatar/index.js +1 -13
  19. package/src/components/badge/badge.js +0 -2
  20. package/src/components/badge/badge.styles.js +78 -81
  21. package/src/components/badge/badge.test.js +18 -5
  22. package/src/components/badge/index.js +0 -2
  23. package/src/components/breadcrumb/breadcrumb.component.js +9 -10
  24. package/src/components/breadcrumb/breadcrumb.js +6 -4
  25. package/src/components/breadcrumb/breadcrumb.styles.js +86 -90
  26. package/src/components/breadcrumb/breadcrumb.test.js +15 -5
  27. package/src/components/breadcrumb/index.js +0 -2
  28. package/src/components/button/button.component.js +2 -2
  29. package/src/components/button/button.styles.js +58 -86
  30. package/src/components/button/button.test.js +8 -4
  31. package/src/components/button/index.js +1 -1
  32. package/src/components/button-group/button-group.test.js +0 -2
  33. package/src/components/button-group/index.js +1 -1
  34. package/src/components/card/card.component.js +40 -9
  35. package/src/components/card/card.js +3 -1
  36. package/src/components/card/card.stories.js +18 -5
  37. package/src/components/card/card.styles.js +46 -20
  38. package/src/components/card/card.test.js +0 -2
  39. package/src/components/card/index.js +1 -1
  40. package/src/components/code-preview/code-preview.component.js +9 -9
  41. package/src/components/code-preview/code-preview.js +0 -1
  42. package/src/components/code-preview/code-preview.styles.js +3 -3
  43. package/src/components/code-preview/code-preview.test.js +29 -8
  44. package/src/components/code-preview/index.js +1 -1
  45. package/src/components/container/container.component.js +1 -0
  46. package/src/components/container/container.js +0 -1
  47. package/src/components/container/container.stories.js +12 -4
  48. package/src/components/container/container.styles.js +37 -35
  49. package/src/components/container/container.test.js +0 -2
  50. package/src/components/container/index.js +1 -1
  51. package/src/components/cta/cta.component.js +108 -0
  52. package/src/components/cta/cta.js +6 -0
  53. package/src/components/cta/cta.stories.js +56 -0
  54. package/src/components/cta/cta.styles.js +64 -0
  55. package/src/components/cta/index.js +1 -0
  56. package/src/components/dialog/dialog.js +0 -1
  57. package/src/components/dialog/dialog.styles.js +8 -8
  58. package/src/components/dialog/dialog.test.js +11 -5
  59. package/src/components/dialog/index.js +1 -1
  60. package/src/components/dropdown/dropdown.component.js +5 -3
  61. package/src/components/dropdown/dropdown.js +6 -4
  62. package/src/components/dropdown/dropdown.styles.js +5 -5
  63. package/src/components/dropdown/dropdown.test.js +20 -4
  64. package/src/components/dropdown/index.js +0 -2
  65. package/src/components/dropzone/dropzone.component.js +7 -6
  66. package/src/components/dropzone/dropzone.styles.js +4 -4
  67. package/src/components/dropzone/dropzone.test.js +6 -4
  68. package/src/components/dropzone/index.js +1 -1
  69. package/src/components/feature-list/feature-list.component.js +130 -0
  70. package/src/components/feature-list/feature-list.js +6 -0
  71. package/src/components/feature-list/feature-list.stories.js +117 -0
  72. package/src/components/feature-list/feature-list.styles.js +82 -0
  73. package/src/components/feature-list/index.js +1 -0
  74. package/src/components/footer/footer-column.styles.js +46 -47
  75. package/src/components/footer/footer.js +6 -2
  76. package/src/components/footer/footer.styles.js +6 -6
  77. package/src/components/footer/footer.test.js +9 -4
  78. package/src/components/footer/index.js +1 -1
  79. package/src/components/form-field/form-field.component.js +1 -3
  80. package/src/components/form-field/form-field.js +0 -1
  81. package/src/components/form-field/form-field.styles.js +35 -37
  82. package/src/components/form-field/form-field.test.js +9 -4
  83. package/src/components/form-field/index.js +1 -1
  84. package/src/components/gallery/gallery-image.js +0 -1
  85. package/src/components/gallery/gallery.js +0 -1
  86. package/src/components/gallery/gallery.styles.js +1 -1
  87. package/src/components/gallery/gallery.test.js +5 -3
  88. package/src/components/gallery/index.js +2 -2
  89. package/src/components/hero/hero.component.js +66 -0
  90. package/src/components/hero/hero.js +6 -0
  91. package/src/components/hero/hero.stories.js +53 -0
  92. package/src/components/hero/hero.styles.js +46 -0
  93. package/src/components/hero/index.js +1 -0
  94. package/src/components/icon/icon.js +3 -2
  95. package/src/components/icon/icon.stories.js +2 -1
  96. package/src/components/icon/icon.styles.js +23 -21
  97. package/src/components/icon/icon.test.js +2 -3
  98. package/src/components/icon/index.js +1 -1
  99. package/src/components/loading/index.js +1 -1
  100. package/src/components/loading/loading.js +3 -2
  101. package/src/components/loading/loading.styles.js +1 -1
  102. package/src/components/loading/loading.test.js +0 -2
  103. package/src/components/logo-cloud/index.js +1 -0
  104. package/src/components/logo-cloud/logo-cloud.component.js +81 -0
  105. package/src/components/logo-cloud/logo-cloud.js +6 -0
  106. package/src/components/logo-cloud/logo-cloud.stories.js +107 -0
  107. package/src/components/logo-cloud/logo-cloud.styles.js +68 -0
  108. package/src/components/media-text/index.js +1 -0
  109. package/src/components/media-text/media-text.component.js +100 -0
  110. package/src/components/media-text/media-text.js +6 -0
  111. package/src/components/media-text/media-text.stories.js +69 -0
  112. package/src/components/media-text/media-text.styles.js +66 -0
  113. package/src/components/newsletter/index.js +1 -0
  114. package/src/components/newsletter/newsletter.component.js +101 -0
  115. package/src/components/newsletter/newsletter.js +6 -0
  116. package/src/components/newsletter/newsletter.stories.js +59 -0
  117. package/src/components/newsletter/newsletter.styles.js +89 -0
  118. package/src/components/notice/index.js +1 -1
  119. package/src/components/notice/notice.js +0 -1
  120. package/src/components/notice/notice.styles.js +7 -7
  121. package/src/components/notice/notice.test.js +15 -5
  122. package/src/components/pagination/index.js +1 -1
  123. package/src/components/pagination/pagination.stories.js +1 -3
  124. package/src/components/pagination/pagination.styles.js +1 -1
  125. package/src/components/pagination/pagination.test.js +9 -4
  126. package/src/components/pricing/index.js +1 -0
  127. package/src/components/pricing/pricing.component.js +119 -0
  128. package/src/components/pricing/pricing.js +6 -0
  129. package/src/components/pricing/pricing.stories.js +123 -0
  130. package/src/components/pricing/pricing.styles.js +135 -0
  131. package/src/components/sidebar/index.js +0 -2
  132. package/src/components/sidebar/sidebar.component.js +12 -10
  133. package/src/components/sidebar/sidebar.js +3 -3
  134. package/src/components/sidebar/sidebar.stories.js +0 -2
  135. package/src/components/sidebar/sidebar.styles.js +181 -186
  136. package/src/components/sidebar/sidebar.test.js +48 -13
  137. package/src/components/stats/index.js +1 -0
  138. package/src/components/stats/stats.component.js +73 -0
  139. package/src/components/stats/stats.js +6 -0
  140. package/src/components/stats/stats.stories.js +64 -0
  141. package/src/components/stats/stats.styles.js +66 -0
  142. package/src/components/tabs/index.js +2 -2
  143. package/src/components/tabs/internal/tabs-button.component.js +1 -1
  144. package/src/components/tabs/internal/tabs-button.js +0 -1
  145. package/src/components/tabs/tab.js +0 -1
  146. package/src/components/tabs/tabs.js +3 -2
  147. package/src/components/tabs/tabs.styles.js +84 -74
  148. package/src/components/testimonials/index.js +1 -0
  149. package/src/components/testimonials/testimonials.component.js +97 -0
  150. package/src/components/testimonials/testimonials.js +6 -0
  151. package/src/components/testimonials/testimonials.stories.js +78 -0
  152. package/src/components/testimonials/testimonials.styles.js +82 -0
  153. package/src/components/toast/index.js +0 -2
  154. package/src/components/toast/toast.component.js +1 -3
  155. package/src/components/toast/toast.js +10 -5
  156. package/src/components/toast/toast.stories.js +9 -5
  157. package/src/components/toast/toast.styles.js +199 -201
  158. package/src/components/toast/toast.test.js +38 -10
  159. package/src/components/tooltip/index.js +1 -1
  160. package/src/components/tooltip/tooltip.js +3 -2
  161. package/src/components/tooltip/tooltip.styles.js +3 -3
  162. package/src/components/tooltip/tooltip.test.js +10 -4
  163. package/src/css/base.css +8 -5
  164. package/src/css/colors.stories.js +27 -28
  165. package/src/css/elements/forms/input.css +9 -41
  166. package/src/css/elements/media/image.css +1 -1
  167. package/src/css/themes/grantcodes.css +3 -3
  168. package/src/css/themes/todomap.css +3 -2
  169. package/src/css/themes/wireframe.css +2 -2
  170. package/src/css/tokens.stories.js +26 -21
  171. package/src/css/typography.css +1 -3
  172. package/src/css/util/focus-ring.css +30 -0
  173. package/src/css/util/index.css +1 -2
  174. package/src/lib/styles/focus-ring.styles.js +34 -0
  175. package/src/main.js +10 -1
  176. package/src/pages/agency.stories.js +164 -0
  177. package/src/pages/blog-post.stories.js +381 -0
  178. package/src/pages/saas-landing.stories.js +307 -0
  179. package/src/test-utils/assert-helpers.js +10 -8
  180. package/src/css/util/functions.css +0 -16
  181. package/src/css/util/mixins.css +0 -63
@@ -1,227 +1,228 @@
1
1
  import { css } from "lit";
2
+ import { focusRingStyles } from "../../lib/styles/focus-ring.styles.js";
2
3
 
3
4
  export const appBarStyles = css`
4
- *,
5
+ ${focusRingStyles}
6
+
7
+ *,
5
8
  *::before,
6
9
  *::after {
7
- box-sizing: border-box;
8
- }
9
-
10
- :host {
11
- display: block;
12
- container-type: inline-size;
13
- container-name: app-bar;
14
- }
15
-
16
- .app-bar {
17
- background-color: var(--g-theme-color-background-default);
18
- border-block-end: 1px solid var(--g-theme-color-border-default);
19
- position: sticky;
20
- inset-block-start: 0;
21
- z-index: 100;
22
- }
23
-
24
- .app-bar--transparent {
25
- background-color: transparent;
26
- border-block-end-color: transparent;
27
- box-shadow: none;
28
- }
29
-
30
- .app-bar__container {
31
- display: flex;
32
- align-items: center;
33
- gap: 1.5rem;
34
- padding-inline: 1rem;
35
- padding-block: 1rem;
36
- max-inline-size: 1400px;
37
- margin-inline: auto;
38
- flex-wrap: wrap;
39
- }
40
-
41
- /* Logo */
42
- .app-bar__logo {
43
- display: flex;
44
- align-items: center;
45
- flex-shrink: 0;
46
- }
47
-
48
- /* Navigation */
49
- .app-bar__nav {
50
- display: none;
51
- flex: 1;
52
- align-items: center;
53
- gap: 1.5rem;
54
- order: 5;
55
- inline-size: 100%;
56
- }
57
-
58
- /* Mobile: when menu is open, show nav stacked vertically */
59
- .app-bar__nav--mobile-open {
60
- display: flex;
61
- flex-direction: column;
62
- gap: 0.5rem;
63
- padding-inline: 1rem;
64
- padding-block: 1rem;
65
- border-block-start: 1px solid var(--g-theme-color-border-default);
66
- width: 100%;
67
- }
68
-
69
- /* Show nav on larger screens using container queries */
70
- @container app-bar (min-width: 768px) {
71
- .app-bar__nav {
72
- display: flex;
73
- }
74
- }
75
-
76
- /* Actions */
77
- .app-bar__actions {
78
- display: flex;
79
- align-items: center;
80
- gap: 0.75rem;
81
- margin-inline-start: auto;
82
- }
83
-
84
- /* Mobile Menu Button */
85
- .app-bar__menu-button {
86
- all: unset;
87
- display: flex;
88
- align-items: center;
89
- justify-content: center;
90
- inline-size: 2.5rem;
91
- block-size: 2.5rem;
92
- padding: 0.5rem;
93
- border-radius: var(--g-theme-border-radius-md);
94
- cursor: pointer;
95
- color: var(--g-theme-color-content-default);
96
- transition: background-color 0.2s ease;
97
- }
98
-
99
- .app-bar__menu-button:hover {
100
- background-color: var(--g-theme-color-background-subtle-hover);
101
- }
102
-
103
- .app-bar__menu-button:focus-visible {
104
- outline: 2px solid var(--component-focus-ring-color);
105
- outline-offset: 2px;
106
- }
107
-
108
- /* Hide menu button on larger screens */
109
- @container app-bar (min-width: 768px) {
110
- .app-bar__menu-button {
111
- display: none;
112
- }
113
- }
114
-
115
- /* Hamburger Icon */
116
- .app-bar__menu-icon {
117
- display: block;
118
- inline-size: 1.5rem;
119
- block-size: 1.5rem;
120
- position: relative;
121
- }
122
-
123
- .app-bar__menu-icon::before,
124
- .app-bar__menu-icon::after {
125
- content: "";
126
- position: absolute;
127
- inline-size: 100%;
128
- block-size: 2px;
129
- inset-inline-start: 0;
130
- background-color: currentColor;
131
- transition: transform 0.2s ease;
132
- }
133
-
134
- .app-bar__menu-icon::before {
135
- inset-block-start: 0.25rem;
136
- box-shadow: 0 0.5rem 0 currentColor;
137
- }
138
-
139
- .app-bar__menu-icon::after {
140
- inset-block-end: 0.25rem;
141
- }
142
-
143
- /* Animated hamburger to X */
144
- .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::before {
145
- inset-block-start: 0.5rem;
146
- transform: rotate(45deg);
147
- box-shadow: none;
148
- }
149
-
150
- .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::after {
151
- inset-block-end: 0.5rem;
152
- transform: rotate(-45deg);
153
- }
154
-
155
- /* Mobile Navigation */
156
- .app-bar__mobile-nav {
157
- display: flex;
158
- flex-direction: column;
159
- gap: 0.5rem;
160
- padding-inline: 1rem;
161
- padding-block: 1rem;
162
- border-block-start: 1px solid var(--g-theme-color-border-default);
163
- animation: slide-down 0.2s ease-out;
164
- }
165
-
166
- /* Desktop: show nav inline and reset mobile styles */
167
- @container app-bar (min-width: 768px) {
168
- .app-bar__container {
169
- flex-wrap: nowrap;
170
- }
171
-
172
- .app-bar__nav {
173
- display: flex;
174
- flex-direction: row;
175
- gap: 1.5rem;
176
- padding: 0;
177
- border: 0;
178
- width: auto;
179
- order: 2;
180
- }
181
-
182
- .app-bar__actions {
183
- order: 3;
184
- }
185
-
186
- .app-bar__menu-button {
187
- order: 4;
188
- }
189
-
190
- /* Ensure mobile-open class doesn't affect desktop */
191
- .app-bar__nav--mobile-open {
192
- display: flex;
193
- }
194
- }
195
-
196
- @keyframes slide-down {
197
- from {
198
- opacity: 0;
199
- transform: translateY(-0.5rem);
200
- }
201
- to {
202
- opacity: 1;
203
- transform: translateY(0);
204
- }
205
- }
206
-
207
- /* Slotted content styling helpers */
208
- ::slotted(a) {
209
- color: var(--g-theme-color-content-default);
210
- text-decoration: none;
211
- padding-block: 0.5rem;
212
- padding-inline: 0.75rem;
213
- border-radius: var(--g-theme-border-radius-md);
214
- transition: all 0.2s ease;
215
- font-weight: 500;
216
- }
217
-
218
- ::slotted(a:hover) {
219
- color: var(--g-theme-color-content-default);
220
- background-color: var(--g-theme-color-background-subtle-hover);
221
- }
222
-
223
- ::slotted(a:focus-visible) {
224
- outline: 2px solid var(--component-focus-ring-color);
225
- outline-offset: 2px;
226
- }
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ :host {
14
+ display: block;
15
+ container-type: inline-size;
16
+ container-name: app-bar;
17
+ }
18
+
19
+ .app-bar {
20
+ background-color: var(--g-theme-color-background-default);
21
+ border-block-end: 1px solid var(--g-theme-color-border-default);
22
+ position: sticky;
23
+ inset-block-start: 0;
24
+ z-index: 100;
25
+ }
26
+
27
+ .app-bar--transparent {
28
+ background-color: transparent;
29
+ border-block-end-color: transparent;
30
+ box-shadow: none;
31
+ }
32
+
33
+ .app-bar__container {
34
+ display: flex;
35
+ align-items: center;
36
+ gap: var(--g-theme-spacing-lg);
37
+ padding-inline: var(--g-theme-spacing-md);
38
+ padding-block: var(--g-theme-spacing-md);
39
+ max-inline-size: 1400px;
40
+ margin-inline: auto;
41
+ flex-wrap: wrap;
42
+ }
43
+
44
+ /* Logo */
45
+ .app-bar__logo {
46
+ display: flex;
47
+ align-items: center;
48
+ flex-shrink: 0;
49
+ }
50
+
51
+ /* Navigation */
52
+ .app-bar__nav {
53
+ display: none;
54
+ flex: 1;
55
+ align-items: center;
56
+ gap: var(--g-theme-spacing-lg);
57
+ order: 5;
58
+ inline-size: 100%;
59
+ }
60
+
61
+ /* Mobile: when menu is open, show nav stacked vertically */
62
+ .app-bar__nav--mobile-open {
63
+ display: flex;
64
+ flex-direction: column;
65
+ gap: var(--g-theme-spacing-sm);
66
+ padding-inline: var(--g-theme-spacing-md);
67
+ padding-block: var(--g-theme-spacing-md);
68
+ border-block-start: 1px solid var(--g-theme-color-border-default);
69
+ width: 100%;
70
+ }
71
+
72
+ /* Show nav on larger screens using container queries */
73
+ @container app-bar (min-width: 768px) {
74
+ .app-bar__nav {
75
+ display: flex;
76
+ }
77
+ }
78
+
79
+ /* Actions */
80
+ .app-bar__actions {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: var(--g-spacing-12);
84
+ margin-inline-start: auto;
85
+ }
86
+
87
+ /* Mobile Menu Button */
88
+ .app-bar__menu-button {
89
+ all: unset;
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ inline-size: 2.5rem;
94
+ block-size: 2.5rem;
95
+ padding: var(--g-theme-spacing-sm);
96
+ border-radius: var(--g-theme-border-radius-md);
97
+ cursor: pointer;
98
+ color: var(--g-theme-color-content-default);
99
+ transition: background-color 0.2s ease;
100
+ }
101
+
102
+ .app-bar__menu-button:hover {
103
+ background-color: var(--g-theme-color-background-subtle-hover);
104
+ }
105
+
106
+ /* Hide menu button on larger screens */
107
+ @container app-bar (min-width: 768px) {
108
+ .app-bar__menu-button {
109
+ display: none;
110
+ }
111
+ }
112
+
113
+ /* Hamburger Icon */
114
+ .app-bar__menu-icon {
115
+ display: block;
116
+ inline-size: 1.5rem;
117
+ block-size: 1.5rem;
118
+ position: relative;
119
+ }
120
+
121
+ .app-bar__menu-icon::before,
122
+ .app-bar__menu-icon::after {
123
+ content: "";
124
+ position: absolute;
125
+ inline-size: 100%;
126
+ block-size: 2px;
127
+ inset-inline-start: 0;
128
+ background-color: currentColor;
129
+ transition: transform 0.2s ease;
130
+ }
131
+
132
+ .app-bar__menu-icon::before {
133
+ inset-block-start: 0.25rem;
134
+ box-shadow: 0 0.5rem 0 currentColor;
135
+ }
136
+
137
+ .app-bar__menu-icon::after {
138
+ inset-block-end: 0.25rem;
139
+ }
140
+
141
+ /* Animated hamburger to X */
142
+ .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::before {
143
+ inset-block-start: 0.5rem;
144
+ transform: rotate(45deg);
145
+ box-shadow: none;
146
+ }
147
+
148
+ .app-bar__menu-button[aria-expanded="true"] .app-bar__menu-icon::after {
149
+ inset-block-end: 0.5rem;
150
+ transform: rotate(-45deg);
151
+ }
152
+
153
+ /* Mobile Navigation */
154
+ .app-bar__mobile-nav {
155
+ display: flex;
156
+ flex-direction: column;
157
+ gap: var(--g-theme-spacing-sm);
158
+ padding-inline: var(--g-theme-spacing-md);
159
+ padding-block: var(--g-theme-spacing-md);
160
+ border-block-start: 1px solid var(--g-theme-color-border-default);
161
+ animation: slide-down 0.2s ease-out;
162
+ }
163
+
164
+ /* Desktop: show nav inline and reset mobile styles */
165
+ @container app-bar (min-width: 768px) {
166
+ .app-bar__container {
167
+ flex-wrap: nowrap;
168
+ }
169
+
170
+ .app-bar__nav {
171
+ display: flex;
172
+ flex-direction: row;
173
+ gap: var(--g-theme-spacing-lg);
174
+ padding: 0;
175
+ border: 0;
176
+ width: auto;
177
+ order: 2;
178
+ }
179
+
180
+ .app-bar__actions {
181
+ order: 3;
182
+ }
183
+
184
+ .app-bar__menu-button {
185
+ order: 4;
186
+ }
187
+
188
+ /* Ensure mobile-open class doesn't affect desktop */
189
+ .app-bar__nav--mobile-open {
190
+ display: flex;
191
+ }
192
+ }
193
+
194
+ @keyframes slide-down {
195
+ from {
196
+ opacity: 0;
197
+ transform: translateY(-0.5rem);
198
+ }
199
+ to {
200
+ opacity: 1;
201
+ transform: translateY(0);
202
+ }
203
+ }
204
+
205
+ /* Slotted content styling helpers */
206
+ ::slotted(a) {
207
+ color: var(--g-theme-color-content-default);
208
+ text-decoration: none;
209
+ padding-block: var(--g-theme-spacing-sm);
210
+ padding-inline: var(--g-spacing-12);
211
+ border-radius: var(--g-theme-border-radius-md);
212
+ transition: all 0.2s ease;
213
+ font-weight: var(--g-typography-font-weight-500);
214
+ }
215
+
216
+ ::slotted(a:hover) {
217
+ color: var(--g-theme-color-content-default);
218
+ background-color: var(--g-theme-color-background-subtle-hover);
219
+ }
220
+
221
+ ::slotted(ul) {
222
+ display: flex;
223
+ flex-direction: row;
224
+ margin: 0;
225
+ padding: 0;
226
+ list-style: none;
227
+ }
227
228
  `;
@@ -18,12 +18,20 @@ describe("App Bar Component", () => {
18
18
 
19
19
  it("should not be sticky by default", async () => {
20
20
  element = await fixture("grantcodes-app-bar");
21
- assert.strictEqual(element.sticky, false, "Should not be sticky by default");
21
+ assert.strictEqual(
22
+ element.sticky,
23
+ false,
24
+ "Should not be sticky by default",
25
+ );
22
26
  });
23
27
 
24
28
  it("should not be transparent by default", async () => {
25
29
  element = await fixture("grantcodes-app-bar");
26
- assert.strictEqual(element.transparent, false, "Should not be transparent by default");
30
+ assert.strictEqual(
31
+ element.transparent,
32
+ false,
33
+ "Should not be transparent by default",
34
+ );
27
35
  });
28
36
 
29
37
  it("should render header element", async () => {
@@ -64,19 +72,27 @@ describe("App Bar Component", () => {
64
72
 
65
73
  it("should have actions slot", async () => {
66
74
  element = await fixture("grantcodes-app-bar");
67
- const actionsSlot = element.shadowRoot.querySelector('slot[name="actions"]');
75
+ const actionsSlot = element.shadowRoot.querySelector(
76
+ 'slot[name="actions"]',
77
+ );
68
78
  assert.ok(actionsSlot, "Actions slot should exist");
69
79
  });
70
80
 
71
81
  it("should render mobile menu button", async () => {
72
82
  element = await fixture("grantcodes-app-bar");
73
- const menuButton = element.shadowRoot.querySelector(".app-bar__menu-button");
83
+ const menuButton = element.shadowRoot.querySelector(
84
+ ".app-bar__menu-button",
85
+ );
74
86
  assert.ok(menuButton, "Mobile menu button should exist");
75
87
  });
76
88
 
77
89
  it("should have mobile menu closed by default", async () => {
78
90
  element = await fixture("grantcodes-app-bar");
79
- assert.strictEqual(element._mobileMenuOpen, false, "Mobile menu should be closed by default");
91
+ assert.strictEqual(
92
+ element._mobileMenuOpen,
93
+ false,
94
+ "Mobile menu should be closed by default",
95
+ );
80
96
  });
81
97
 
82
98
  it("should not render mobile nav when closed", async () => {
@@ -91,25 +107,37 @@ describe("App Bar Component", () => {
91
107
 
92
108
  await element.updateComplete;
93
109
 
94
- const mobileNav = element.shadowRoot.querySelector(".app-bar__nav--mobile-open");
110
+ const mobileNav = element.shadowRoot.querySelector(
111
+ ".app-bar__nav--mobile-open",
112
+ );
95
113
  assert.ok(mobileNav, "Mobile nav should be rendered when open");
96
114
  });
97
115
 
98
116
  it("should toggle mobile menu when button is clicked", async () => {
99
117
  element = await fixture("grantcodes-app-bar");
100
- const menuButton = element.shadowRoot.querySelector(".app-bar__menu-button");
118
+ const menuButton = element.shadowRoot.querySelector(
119
+ ".app-bar__menu-button",
120
+ );
101
121
 
102
122
  assert.strictEqual(element._mobileMenuOpen, false, "Should start closed");
103
123
 
104
124
  click(menuButton);
105
125
  await element.updateComplete;
106
126
 
107
- assert.strictEqual(element._mobileMenuOpen, true, "Should be open after click");
127
+ assert.strictEqual(
128
+ element._mobileMenuOpen,
129
+ true,
130
+ "Should be open after click",
131
+ );
108
132
 
109
133
  click(menuButton);
110
134
  await element.updateComplete;
111
135
 
112
- assert.strictEqual(element._mobileMenuOpen, false, "Should be closed after second click");
136
+ assert.strictEqual(
137
+ element._mobileMenuOpen,
138
+ false,
139
+ "Should be closed after second click",
140
+ );
113
141
  });
114
142
 
115
143
  it("should emit menu-toggle event when menu is toggled", async () => {
@@ -120,23 +148,36 @@ describe("App Bar Component", () => {
120
148
  toggledState = e.detail.open;
121
149
  });
122
150
 
123
- const menuButton = element.shadowRoot.querySelector(".app-bar__menu-button");
151
+ const menuButton = element.shadowRoot.querySelector(
152
+ ".app-bar__menu-button",
153
+ );
124
154
  click(menuButton);
125
155
 
126
156
  await element.updateComplete;
127
157
 
128
- assert.strictEqual(toggledState, true, "Toggle event should fire with open state");
158
+ assert.strictEqual(
159
+ toggledState,
160
+ true,
161
+ "Toggle event should fire with open state",
162
+ );
129
163
  });
130
164
 
131
165
  it("should have aria-label on menu button", async () => {
132
166
  element = await fixture("grantcodes-app-bar");
133
- const menuButton = element.shadowRoot.querySelector(".app-bar__menu-button");
134
- assert.ok(menuButton.hasAttribute("aria-label"), "Menu button should have aria-label");
167
+ const menuButton = element.shadowRoot.querySelector(
168
+ ".app-bar__menu-button",
169
+ );
170
+ assert.ok(
171
+ menuButton.hasAttribute("aria-label"),
172
+ "Menu button should have aria-label",
173
+ );
135
174
  });
136
175
 
137
176
  it("should have aria-expanded on menu button", async () => {
138
177
  element = await fixture("grantcodes-app-bar");
139
- const menuButton = element.shadowRoot.querySelector(".app-bar__menu-button");
178
+ const menuButton = element.shadowRoot.querySelector(
179
+ ".app-bar__menu-button",
180
+ );
140
181
  assert.ok(
141
182
  menuButton.hasAttribute("aria-expanded"),
142
183
  "Menu button should have aria-expanded",
@@ -145,7 +186,9 @@ describe("App Bar Component", () => {
145
186
 
146
187
  it("should update aria-expanded when menu is toggled", async () => {
147
188
  element = await fixture("grantcodes-app-bar");
148
- const menuButton = element.shadowRoot.querySelector(".app-bar__menu-button");
189
+ const menuButton = element.shadowRoot.querySelector(
190
+ ".app-bar__menu-button",
191
+ );
149
192
 
150
193
  assert.strictEqual(
151
194
  menuButton.getAttribute("aria-expanded"),
@@ -170,5 +213,3 @@ describe("App Bar Component", () => {
170
213
  assert.ok(nav.hasAttribute("aria-label"), "Nav should have aria-label");
171
214
  });
172
215
  });
173
-
174
-
@@ -1,3 +1 @@
1
1
  export * from "./app-bar.js";
2
-
3
-
@@ -4,15 +4,3 @@ export * from "./avatar.component.js";
4
4
  export default GrantCodesAvatar;
5
5
 
6
6
  customElements.define("grantcodes-avatar", GrantCodesAvatar);
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
@@ -31,15 +31,3 @@ export const Initials = {
31
31
  src: undefined,
32
32
  },
33
33
  };
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-