@gsa-tts/graymatter-ui 0.1.0 → 0.2.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/assets/images/ai-icons/chevron-up-down.svg +4 -0
- package/dist/graymatter-ui.js +4082 -0
- package/dist/graymatter-ui.umd.cjs +40 -0
- package/index.ts +1 -0
- package/package.json +7 -5
- package/src/components/Button.svelte +11 -23
- package/src/components/Button.webcomponent.svelte +44 -0
- package/src/components/DesktopHeader.svelte +30 -18
- package/src/components/DesktopHeader.webcomponent.svelte +17 -0
- package/src/components/DesktopSideNav.svelte +327 -57
- package/src/components/DesktopSideNav.webcomponent.svelte +19 -0
- package/src/components/Logo.webcomponent.svelte +26 -0
- package/src/components/MobileBottomNav.svelte +57 -11
- package/src/components/MobileBottomNav.webcomponent.svelte +14 -0
- package/src/components/MobileSideMenu.svelte +69 -14
- package/src/components/MobileSideMenu.webcomponent.svelte +11 -0
- package/src/components/MobileTopNav.svelte +136 -2
- package/src/components/MobileTopNav.webcomponent.svelte +14 -0
- package/src/index.ts +16 -0
- package/src/layouts/GlobalAppLayout.astro +24 -15
- package/src/stores/navigationStore.ts +0 -15
- package/src/styles/components/globalAppLayout.css +9 -12
- package/src/styles/components/globalAppNav.css +30 -483
- package/src/utils/getAppUrls.ts +29 -0
- package/src/utils/index.ts +1 -0
|
@@ -1,75 +1,12 @@
|
|
|
1
|
-
/* Visually hidden utility for accessibility */
|
|
2
|
-
.sr-only {
|
|
3
|
-
position: absolute;
|
|
4
|
-
width: 1px;
|
|
5
|
-
height: 1px;
|
|
6
|
-
padding: 0;
|
|
7
|
-
margin: -1px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
clip: rect(0, 0, 0, 0);
|
|
10
|
-
border: 0;
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
}
|
|
13
|
-
/* =====================
|
|
14
|
-
Shared/Utility Styles
|
|
15
|
-
===================== */
|
|
16
|
-
.user-profile-container,
|
|
17
|
-
.user-profile-icon {
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.menu-button,
|
|
24
|
-
.profile-button {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
border: none;
|
|
29
|
-
background: none;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
border-radius: var(--ai-size-8);
|
|
32
|
-
transition: background-color 0.2s ease;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.menu-button:disabled,
|
|
36
|
-
.menu-button.disabled {
|
|
37
|
-
cursor: not-allowed;
|
|
38
|
-
opacity: 0.5;
|
|
39
|
-
background-color: transparent;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Shared user profile styles */
|
|
43
|
-
.user-profile-icon {
|
|
44
|
-
border-radius: var(--ai-size-6);
|
|
45
|
-
background: var(--ai-color-steel-700);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.user-initials {
|
|
49
|
-
color: var(--ai-color-white);
|
|
50
|
-
text-align: center;
|
|
51
|
-
font-weight: 400;
|
|
52
|
-
line-height: 1.3;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
1
|
/* DesktopHeader styles */
|
|
56
|
-
.global-header
|
|
2
|
+
.global-header,
|
|
3
|
+
graymatter-desktop-header::part(global-header) {
|
|
57
4
|
display: none;
|
|
58
5
|
}
|
|
59
|
-
|
|
60
|
-
display: flex;
|
|
61
|
-
align-items: center;
|
|
62
|
-
gap: var(--ai-size-16);
|
|
63
|
-
align-self: stretch;
|
|
64
|
-
}
|
|
65
|
-
.header-text {
|
|
66
|
-
color: var(--ai-color-black);
|
|
67
|
-
font-size: var(--ai-size-16);
|
|
68
|
-
font-weight: 400;
|
|
69
|
-
line-height: 1.3;
|
|
70
|
-
}
|
|
6
|
+
|
|
71
7
|
/* MobileTopNav styles */
|
|
72
|
-
.mobile-top-nav
|
|
8
|
+
.mobile-top-nav,
|
|
9
|
+
graymatter-mobile-top-nav::part(mobile-top-nav) {
|
|
73
10
|
position: sticky;
|
|
74
11
|
top: 0;
|
|
75
12
|
left: 0;
|
|
@@ -82,287 +19,12 @@
|
|
|
82
19
|
padding-top: env(safe-area-inset-top);
|
|
83
20
|
background: var(--ai-color-white);
|
|
84
21
|
border-bottom: 0.0625rem solid var(--ai-color-neutral-200);
|
|
85
|
-
z-index:
|
|
86
|
-
}
|
|
87
|
-
/* MobileTopNav specific menu button */
|
|
88
|
-
.mobile-top-nav .menu-button {
|
|
89
|
-
width: var(--ai-size-40);
|
|
90
|
-
height: var(--ai-size-40);
|
|
91
|
-
color: var(--ai-color-neutral-700);
|
|
92
|
-
}
|
|
93
|
-
.menu-button:hover {
|
|
94
|
-
background-color: var(--ai-color-neutral-100);
|
|
95
|
-
}
|
|
96
|
-
/* MobileTopNav specific disabled state */
|
|
97
|
-
.mobile-top-nav .menu-button.disabled,
|
|
98
|
-
.mobile-top-nav .menu-button:disabled {
|
|
99
|
-
cursor: not-allowed;
|
|
100
|
-
opacity: 0.5;
|
|
101
|
-
background-color: transparent;
|
|
102
|
-
}
|
|
103
|
-
.brand {
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: center;
|
|
106
|
-
gap: var(--ai-size-12);
|
|
107
|
-
flex: 1;
|
|
108
|
-
margin-left: var(--ai-size-8);
|
|
109
|
-
}
|
|
110
|
-
.brand-text {
|
|
111
|
-
color: var(--ai-color-neutral-900);
|
|
112
|
-
font-size: var(--ai-size-16);
|
|
113
|
-
font-weight: 600;
|
|
114
|
-
line-height: 1;
|
|
115
|
-
}
|
|
116
|
-
.profile-button {
|
|
117
|
-
width: var(--ai-size-40);
|
|
118
|
-
height: var(--ai-size-40);
|
|
119
|
-
}
|
|
120
|
-
.profile-button:hover {
|
|
121
|
-
background-color: var(--ai-color-neutral-100);
|
|
122
|
-
}
|
|
123
|
-
/* MobileTopNav specific user profile */
|
|
124
|
-
.mobile-top-nav .user-profile-icon {
|
|
125
|
-
width: var(--ai-size-32);
|
|
126
|
-
height: var(--ai-size-32);
|
|
127
|
-
border-radius: 0.3125rem;
|
|
128
|
-
}
|
|
129
|
-
.mobile-top-nav .user-initials {
|
|
130
|
-
font-size: var(--ai-size-14);
|
|
131
|
-
line-height: 1;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* DesktopSideNav styles */
|
|
135
|
-
.side-nav-container {
|
|
136
|
-
display: none;
|
|
137
|
-
}
|
|
138
|
-
.side-nav-container.expanded {
|
|
139
|
-
width: 16.875rem;
|
|
140
|
-
}
|
|
141
|
-
.expanded-content {
|
|
142
|
-
display: flex;
|
|
143
|
-
width: 12.5rem;
|
|
144
|
-
opacity: 1;
|
|
145
|
-
flex: none;
|
|
146
|
-
height: 100%;
|
|
147
|
-
background: var(--ai-color-steel-100);
|
|
148
|
-
border-right: 0.0625rem solid var(--ai-color-steel-100);
|
|
149
|
-
overflow: hidden;
|
|
150
|
-
flex-direction: column;
|
|
151
|
-
}
|
|
152
|
-
.side-nav-container.expanded .expanded-content {
|
|
153
|
-
width: 12.5rem;
|
|
154
|
-
opacity: 1;
|
|
155
|
-
overflow-y: auto;
|
|
156
|
-
}
|
|
157
|
-
.side-nav-container:not(.expanded) .expanded-content {
|
|
158
|
-
width: 0;
|
|
159
|
-
opacity: 0;
|
|
160
|
-
}
|
|
161
|
-
.logo-container {
|
|
162
|
-
display: flex;
|
|
163
|
-
height: var(--ai-size-56);
|
|
164
|
-
flex-direction: column;
|
|
165
|
-
justify-content: center;
|
|
166
|
-
align-items: flex-start;
|
|
167
|
-
}
|
|
168
|
-
.logo-wrapper {
|
|
169
|
-
display: flex;
|
|
170
|
-
width: var(--ai-size-80);
|
|
171
|
-
height: var(--ai-size-30);
|
|
172
|
-
align-items: center;
|
|
173
|
-
gap: var(--ai-size-32);
|
|
174
|
-
flex-shrink: 0;
|
|
175
|
-
aspect-ratio: 27/10;
|
|
176
|
-
}
|
|
177
|
-
.logo-inner {
|
|
178
|
-
display: flex;
|
|
179
|
-
align-items: center;
|
|
180
|
-
gap: var(--ai-size-16);
|
|
181
|
-
}
|
|
182
|
-
.logo-component {
|
|
183
|
-
height: var(--ai-size-22);
|
|
184
|
-
}
|
|
185
|
-
.nav-content {
|
|
186
|
-
display: flex;
|
|
187
|
-
width: var(--ai-size-72);
|
|
188
|
-
height: 100%;
|
|
189
|
-
padding-bottom: var(--ai-size-16);
|
|
190
|
-
flex-direction: column;
|
|
191
|
-
align-items: flex-start;
|
|
192
|
-
gap: var(--ai-size-4);
|
|
193
|
-
flex: none;
|
|
194
|
-
background: var(--ai-color-steel-200);
|
|
195
|
-
border-right: 0.0625rem solid var(--ai-color-steel-200);
|
|
196
|
-
}
|
|
197
|
-
.nav-main {
|
|
198
|
-
display: flex;
|
|
199
|
-
flex-direction: column;
|
|
200
|
-
align-items: flex-start;
|
|
201
|
-
gap: var(--ai-size-4);
|
|
202
|
-
flex: 1 0 0;
|
|
203
|
-
align-self: stretch;
|
|
204
|
-
}
|
|
205
|
-
.nav-footer {
|
|
206
|
-
display: flex;
|
|
207
|
-
padding: var(--ai-size-8) var(--ai-size-4);
|
|
208
|
-
flex-direction: column;
|
|
209
|
-
justify-content: center;
|
|
210
|
-
align-items: center;
|
|
211
|
-
gap: var(--ai-size-4);
|
|
212
|
-
align-self: stretch;
|
|
213
|
-
margin-top: auto;
|
|
214
|
-
}
|
|
215
|
-
.user-profile-button {
|
|
216
|
-
background: none;
|
|
217
|
-
border: none;
|
|
218
|
-
padding: 0;
|
|
219
|
-
cursor: pointer;
|
|
220
|
-
display: flex;
|
|
221
|
-
justify-content: center;
|
|
222
|
-
align-items: center;
|
|
223
|
-
}
|
|
224
|
-
.user-profile-button:focus {
|
|
225
|
-
outline: var(--ai-size-2) solid var(--ai-color-blue-600);
|
|
226
|
-
outline-offset: var(--ai-size-2);
|
|
227
|
-
border-radius: var(--ai-size-4);
|
|
228
|
-
}
|
|
229
|
-
/* DesktopSideNav specific user profile */
|
|
230
|
-
.user-profile-container {
|
|
231
|
-
width: var(--ai-size-40);
|
|
232
|
-
height: var(--ai-size-40);
|
|
233
|
-
aspect-ratio: 1/1;
|
|
234
|
-
}
|
|
235
|
-
.user-profile-icon {
|
|
236
|
-
padding: 0.5556rem 0.4931rem 0.5694rem 0.3819rem;
|
|
237
|
-
}
|
|
238
|
-
.user-initials {
|
|
239
|
-
font-size: var(--ai-size-16);
|
|
240
|
-
font-style: normal;
|
|
241
|
-
}
|
|
242
|
-
.menu-section {
|
|
243
|
-
display: flex;
|
|
244
|
-
padding: var(--ai-size-4);
|
|
245
|
-
justify-content: center;
|
|
246
|
-
align-items: center;
|
|
247
|
-
align-self: stretch;
|
|
248
|
-
}
|
|
249
|
-
/* DesktopSideNav specific menu button */
|
|
250
|
-
.menu-button {
|
|
251
|
-
display: flex;
|
|
252
|
-
padding: var(--ai-size-4);
|
|
253
|
-
justify-content: center;
|
|
254
|
-
align-items: center;
|
|
255
|
-
background: none;
|
|
256
|
-
border: none;
|
|
257
|
-
cursor: pointer;
|
|
258
|
-
opacity: 1;
|
|
259
|
-
transition: opacity 0.2s ease;
|
|
260
|
-
will-change: opacity;
|
|
261
|
-
}
|
|
262
|
-
.menu-button.disabled {
|
|
263
|
-
cursor: not-allowed;
|
|
264
|
-
opacity: 0.5;
|
|
265
|
-
will-change: opacity;
|
|
266
|
-
}
|
|
267
|
-
.menu-button:focus,
|
|
268
|
-
.nav-item:focus {
|
|
269
|
-
outline: none;
|
|
270
|
-
}
|
|
271
|
-
.menu-button:focus .icon-container,
|
|
272
|
-
.nav-item:focus .icon-container {
|
|
273
|
-
outline: var(--ai-size-2) solid var(--ai-color-blue-600);
|
|
274
|
-
outline-offset: var(--ai-size-2);
|
|
275
|
-
border-radius: var(--ai-size-4);
|
|
276
|
-
}
|
|
277
|
-
.nav-items {
|
|
278
|
-
display: flex;
|
|
279
|
-
width: var(--ai-size-72);
|
|
280
|
-
flex-direction: column;
|
|
281
|
-
align-items: flex-start;
|
|
282
|
-
gap: var(--ai-size-4);
|
|
283
|
-
}
|
|
284
|
-
.nav-item {
|
|
285
|
-
display: flex;
|
|
286
|
-
height: 4.125rem;
|
|
287
|
-
padding: var(--ai-size-4);
|
|
288
|
-
flex-direction: column;
|
|
289
|
-
justify-content: center;
|
|
290
|
-
align-items: center;
|
|
291
|
-
gap: var(--ai-size-2);
|
|
292
|
-
align-self: stretch;
|
|
293
|
-
cursor: pointer;
|
|
294
|
-
text-decoration: none;
|
|
295
|
-
color: inherit;
|
|
296
|
-
position: relative;
|
|
297
|
-
flex-shrink: 0;
|
|
298
|
-
}
|
|
299
|
-
.icon-container {
|
|
300
|
-
display: flex;
|
|
301
|
-
width: var(--ai-size-40);
|
|
302
|
-
height: var(--ai-size-40);
|
|
303
|
-
padding: var(--ai-size-8);
|
|
304
|
-
justify-content: center;
|
|
305
|
-
align-items: center;
|
|
306
|
-
flex-shrink: 0;
|
|
307
|
-
position: relative;
|
|
308
|
-
contain: layout style;
|
|
309
|
-
transition:
|
|
310
|
-
background-color 0.3s ease,
|
|
311
|
-
border-radius 0.3s ease;
|
|
312
|
-
}
|
|
313
|
-
.icon-wrapper {
|
|
314
|
-
display: flex;
|
|
315
|
-
width: var(--ai-size-28);
|
|
316
|
-
height: var(--ai-size-28);
|
|
317
|
-
justify-content: center;
|
|
318
|
-
align-items: center;
|
|
319
|
-
flex-shrink: 0;
|
|
320
|
-
aspect-ratio: 1/1;
|
|
321
|
-
position: relative;
|
|
322
|
-
overflow: hidden;
|
|
323
|
-
transition: transform 0.3s ease;
|
|
324
|
-
}
|
|
325
|
-
.icon-wrapper :global(svg) {
|
|
326
|
-
width: var(--ai-size-24);
|
|
327
|
-
height: var(--ai-size-24);
|
|
328
|
-
flex-shrink: 0;
|
|
329
|
-
position: absolute;
|
|
330
|
-
top: 50%;
|
|
331
|
-
left: 50%;
|
|
332
|
-
transform: translate(-50%, -50%);
|
|
333
|
-
transition: all 0.3s ease;
|
|
334
|
-
}
|
|
335
|
-
.icon-wrapper :global(svg path) {
|
|
336
|
-
stroke-width: 1.5;
|
|
337
|
-
vector-effect: non-scaling-stroke;
|
|
338
|
-
transition:
|
|
339
|
-
stroke 0.3s ease,
|
|
340
|
-
fill 0.3s ease,
|
|
341
|
-
stroke-width 0.3s ease;
|
|
342
|
-
}
|
|
343
|
-
.nav-text {
|
|
344
|
-
font-size: var(--ai-size-12);
|
|
345
|
-
text-align: center;
|
|
346
|
-
color: var(--ai-color-neutral-900);
|
|
347
|
-
line-height: 1.3;
|
|
348
|
-
}
|
|
349
|
-
.menu-button.disabled:hover .icon-container,
|
|
350
|
-
.menu-button:disabled:hover .icon-container {
|
|
351
|
-
background: none !important;
|
|
352
|
-
border-radius: var(--ai-size-4);
|
|
353
|
-
}
|
|
354
|
-
.nav-item.hovered .icon-container,
|
|
355
|
-
.nav-item:active .icon-container,
|
|
356
|
-
.nav-item.selected .icon-container,
|
|
357
|
-
.nav-item.selected.hovered .icon-container,
|
|
358
|
-
.menu-button:hover .icon-container,
|
|
359
|
-
.menu-button:active .icon-container {
|
|
360
|
-
background-color: var(--ai-color-steel-300);
|
|
361
|
-
border-radius: var(--ai-size-4);
|
|
22
|
+
z-index: var(--ai-layer-30);
|
|
362
23
|
}
|
|
363
24
|
|
|
364
25
|
/* MobileBottomNav styles */
|
|
365
|
-
.mobile-bottom-nav
|
|
26
|
+
.mobile-bottom-nav,
|
|
27
|
+
graymatter-mobile-bottom-nav::part(mobile-bottom-nav) {
|
|
366
28
|
display: flex;
|
|
367
29
|
position: fixed;
|
|
368
30
|
bottom: 0;
|
|
@@ -372,49 +34,12 @@
|
|
|
372
34
|
border-top: 0.0625rem solid var(--ai-neutral-200);
|
|
373
35
|
height: 3.125rem;
|
|
374
36
|
padding-bottom: env(safe-area-inset-bottom);
|
|
375
|
-
z-index:
|
|
376
|
-
}
|
|
377
|
-
.nav-item {
|
|
378
|
-
flex: 1;
|
|
379
|
-
display: flex;
|
|
380
|
-
flex-direction: column;
|
|
381
|
-
align-items: center;
|
|
382
|
-
justify-content: center;
|
|
383
|
-
padding: var(--ai-size-4);
|
|
384
|
-
text-decoration: none;
|
|
385
|
-
color: var(--ai-color-neutral-600);
|
|
386
|
-
transition: color 0.2s ease;
|
|
387
|
-
height: 100%;
|
|
388
|
-
}
|
|
389
|
-
.nav-item.active {
|
|
390
|
-
color: var(--ai-color-neutral-900);
|
|
391
|
-
}
|
|
392
|
-
.nav-item.active .icon {
|
|
393
|
-
background-color: var(--ai-color-neutral-200);
|
|
394
|
-
border-radius: var(--ai-size-8);
|
|
395
|
-
}
|
|
396
|
-
.nav-item:hover {
|
|
397
|
-
color: var(--ai-color-neutral-700);
|
|
398
|
-
}
|
|
399
|
-
.icon {
|
|
400
|
-
width: var(--ai-size-24);
|
|
401
|
-
height: var(--ai-size-24);
|
|
402
|
-
margin-bottom: var(--ai-size-2);
|
|
403
|
-
display: flex;
|
|
404
|
-
align-items: center;
|
|
405
|
-
justify-content: center;
|
|
406
|
-
padding: var(--ai-size-2);
|
|
407
|
-
transition: background-color 0.2s ease;
|
|
408
|
-
}
|
|
409
|
-
.label {
|
|
410
|
-
font-size: 0.6875rem; /* 11px */
|
|
411
|
-
font-weight: 500;
|
|
412
|
-
line-height: 1;
|
|
413
|
-
text-align: center;
|
|
37
|
+
z-index: var(--ai-layer-30);
|
|
414
38
|
}
|
|
415
39
|
|
|
416
40
|
/* MobileSideMenu styles */
|
|
417
|
-
.mobile-overlay
|
|
41
|
+
.mobile-overlay,
|
|
42
|
+
graymatter-mobile-side-menu::part(mobile-overlay) {
|
|
418
43
|
display: block;
|
|
419
44
|
position: fixed;
|
|
420
45
|
top: 0;
|
|
@@ -422,103 +47,17 @@
|
|
|
422
47
|
right: 0;
|
|
423
48
|
bottom: 0;
|
|
424
49
|
background: #00000080;
|
|
425
|
-
z-index:
|
|
50
|
+
z-index: var(--ai-layer-40);
|
|
426
51
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
top: 0;
|
|
431
|
-
left: 0;
|
|
432
|
-
bottom: 0;
|
|
433
|
-
width: 15rem;
|
|
434
|
-
max-width: 85vw;
|
|
435
|
-
background: var(--ai-color-white);
|
|
436
|
-
transform: translateX(-100%);
|
|
437
|
-
transition: transform 0.3s ease;
|
|
438
|
-
z-index: 210;
|
|
439
|
-
flex-direction: column;
|
|
440
|
-
box-shadow: var(--ai-size-2) 0 var(--ai-size-10) #0000001a;
|
|
441
|
-
}
|
|
442
|
-
.mobile-side-menu.open {
|
|
443
|
-
transform: translateX(0);
|
|
444
|
-
}
|
|
445
|
-
.menu-header {
|
|
446
|
-
display: flex;
|
|
447
|
-
align-items: center;
|
|
448
|
-
justify-content: space-between;
|
|
449
|
-
padding: var(--ai-size-16) var(--ai-size-20);
|
|
450
|
-
border-bottom: 0.0625rem solid var(--ai-color-neutral-200);
|
|
451
|
-
}
|
|
452
|
-
/* MobileSideMenu specific logo container */
|
|
453
|
-
.mobile-side-menu .logo-container {
|
|
454
|
-
display: flex;
|
|
455
|
-
}
|
|
456
|
-
.close-button {
|
|
457
|
-
display: flex;
|
|
458
|
-
align-items: center;
|
|
459
|
-
justify-content: center;
|
|
460
|
-
width: var(--ai-size-32);
|
|
461
|
-
height: var(--ai-size-32);
|
|
462
|
-
border: none;
|
|
463
|
-
background: none;
|
|
464
|
-
color: var(--ai-color-neutral-700);
|
|
465
|
-
cursor: pointer;
|
|
466
|
-
border-radius: var(--ai-size-6);
|
|
467
|
-
transition: background-color 0.2s ease;
|
|
468
|
-
}
|
|
469
|
-
.close-button:hover {
|
|
470
|
-
background-color: var(--ai-color-neutral-100);
|
|
471
|
-
}
|
|
472
|
-
.menu-content {
|
|
473
|
-
flex: 1;
|
|
474
|
-
overflow-y: auto;
|
|
475
|
-
padding: 0;
|
|
476
|
-
}
|
|
477
|
-
.main-nav-section {
|
|
478
|
-
border-bottom: 0.0625rem solid var(--ai-color-neutral-200);
|
|
479
|
-
padding: var(--ai-size-16) 0;
|
|
480
|
-
}
|
|
481
|
-
.main-nav-item {
|
|
52
|
+
|
|
53
|
+
.mobile-side-menu,
|
|
54
|
+
graymatter-mobile-side-menu::part(mobile-side-menu) {
|
|
482
55
|
display: flex;
|
|
483
|
-
align-items: center;
|
|
484
|
-
gap: var(--ai-size-16);
|
|
485
|
-
padding: var(--ai-size-12) var(--ai-size-20);
|
|
486
|
-
text-decoration: none;
|
|
487
|
-
color: var(--ai-color-neutral-700);
|
|
488
|
-
transition:
|
|
489
|
-
background-color 0.2s ease,
|
|
490
|
-
color 0.2s ease;
|
|
491
|
-
border: none;
|
|
492
|
-
background: none;
|
|
493
|
-
width: 100%;
|
|
494
|
-
text-align: left;
|
|
495
|
-
}
|
|
496
|
-
.main-nav-item:hover {
|
|
497
|
-
background-color: var(--ai-color-neutral-50);
|
|
498
|
-
color: var(--ai-color-neutral-900);
|
|
499
|
-
}
|
|
500
|
-
.main-nav-item.active {
|
|
501
|
-
background-color: var(--ai-color-primary-50);
|
|
502
|
-
color: var(--ai-color-primary-700);
|
|
503
|
-
}
|
|
504
|
-
.nav-icon {
|
|
505
|
-
width: var(--ai-size-24);
|
|
506
|
-
height: var(--ai-size-24);
|
|
507
|
-
flex-shrink: 0;
|
|
508
|
-
}
|
|
509
|
-
.nav-label {
|
|
510
|
-
font-size: var(--ai-size-16);
|
|
511
|
-
font-weight: 500;
|
|
512
|
-
line-height: 1.5;
|
|
513
|
-
}
|
|
514
|
-
.subnav-section {
|
|
515
|
-
padding: var(--ai-size-16) 0;
|
|
516
|
-
overflow-y: auto;
|
|
517
|
-
max-height: calc(100vh - 4rem); /* leave space for header/close */
|
|
518
56
|
}
|
|
519
57
|
|
|
520
58
|
@media (--ai-size-breakpoint-tablet) {
|
|
521
|
-
.global-header
|
|
59
|
+
.global-header,
|
|
60
|
+
graymatter-desktop-header::part(global-header) {
|
|
522
61
|
position: absolute;
|
|
523
62
|
top: 0;
|
|
524
63
|
left: 0;
|
|
@@ -531,18 +70,26 @@
|
|
|
531
70
|
justify-content: center;
|
|
532
71
|
align-items: flex-start;
|
|
533
72
|
background: var(--ai-color-white);
|
|
534
|
-
z-index:
|
|
73
|
+
z-index: var(--ai-layer-20);
|
|
535
74
|
}
|
|
536
|
-
|
|
75
|
+
|
|
76
|
+
.mobile-top-nav,
|
|
77
|
+
graymatter-mobile-top-nav::part(mobile-top-nav) {
|
|
537
78
|
display: none;
|
|
538
79
|
}
|
|
539
|
-
|
|
80
|
+
|
|
81
|
+
.mobile-bottom-nav,
|
|
82
|
+
graymatter-mobile-bottom-nav::part(mobile-bottom-nav) {
|
|
540
83
|
display: none;
|
|
541
84
|
}
|
|
542
|
-
|
|
85
|
+
|
|
86
|
+
.mobile-overlay,
|
|
87
|
+
graymatter-mobile-side-menu::part(mobile-overlay) {
|
|
543
88
|
display: none;
|
|
544
89
|
}
|
|
545
|
-
|
|
90
|
+
|
|
91
|
+
.mobile-side-menu,
|
|
92
|
+
graymatter-mobile-side-menu::part(mobile-side-menu) {
|
|
546
93
|
display: none;
|
|
547
94
|
}
|
|
548
95
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
function warnIfMissing(name: string, value: string | undefined) {
|
|
2
|
+
if (!value) {
|
|
3
|
+
console.warn(`[getAppUrls] Environment variable for ${name} is missing!`);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function getAppUrls(envArg?: Record<string, string | undefined>) {
|
|
8
|
+
const env = envArg || import.meta.env;
|
|
9
|
+
const fallback = '#';
|
|
10
|
+
|
|
11
|
+
const chatUrl = env.PUBLIC_CHAT_URL;
|
|
12
|
+
const consoleUrl = env.PUBLIC_CONSOLE_URL;
|
|
13
|
+
// NOTE: The Discover and API docs/pages are served as part of the Astro site app itself,
|
|
14
|
+
// so the API link typically points to a local route (e.g., /api) within the same deployment.
|
|
15
|
+
// We may not need to use the external FCS URLs for API here, since the content is bundled and deployed together with the site app.
|
|
16
|
+
|
|
17
|
+
// const apiUrl = env.PUBLIC_API_URL;
|
|
18
|
+
|
|
19
|
+
warnIfMissing('chat', chatUrl);
|
|
20
|
+
warnIfMissing('console', consoleUrl);
|
|
21
|
+
// warnIfMissing('api', api);
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
chat: chatUrl || fallback,
|
|
25
|
+
console: consoleUrl || fallback,
|
|
26
|
+
api: '/api',
|
|
27
|
+
discover: '/discover',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getAppUrls';
|