@gsa-tts/graymatter-ui 0.2.8 → 0.3.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 (65) hide show
  1. package/README.md +111 -0
  2. package/assets/images/ai-icons/check-circle.svg +3 -0
  3. package/assets/images/ai-icons/console-icon.svg +6 -6
  4. package/assets/images/ai-icons/pause-button.svg +5 -0
  5. package/assets/images/ai-icons/play-button.svg +4 -0
  6. package/assets/images/api-hero-image.webp +0 -0
  7. package/assets/images/api-icon-w.svg +3 -0
  8. package/assets/images/chat-hero-image.webp +0 -0
  9. package/assets/images/chat-icon-b.svg +4 -0
  10. package/assets/images/console-hero-image.webp +0 -0
  11. package/assets/images/console-icon-w.svg +6 -0
  12. package/assets/images/favicon-dark.ico +0 -0
  13. package/assets/images/favicon-dark.svg +7 -0
  14. package/assets/images/favicon-light.svg +7 -0
  15. package/assets/images/favicon.ico +0 -0
  16. package/assets/images/favicon.svg +5 -6
  17. package/assets/images/og-preview.webp +0 -0
  18. package/assets/images/partners/gemini-government-logo.svg +129 -0
  19. package/assets/images/partners/microsoft-logo.svg +14 -0
  20. package/dist/graymatter-ui.js +1864 -1790
  21. package/dist/graymatter-ui.umd.cjs +60 -34
  22. package/package.json +3 -4
  23. package/src/component-options/componentOptions.ts +27 -13
  24. package/src/components/Button.svelte +191 -37
  25. package/src/components/Button.webcomponent.svelte +13 -11
  26. package/src/components/DesktopHeader.svelte +70 -53
  27. package/src/components/DesktopHeader.webcomponent.svelte +13 -9
  28. package/src/components/DesktopSideNav.svelte +200 -158
  29. package/src/components/DesktopSideNav.webcomponent.svelte +9 -5
  30. package/src/components/GoogleTagManager.astro +1 -1
  31. package/src/components/Head.astro +62 -7
  32. package/src/components/Logo.svelte +48 -41
  33. package/src/components/Logo.webcomponent.svelte +16 -16
  34. package/src/components/MobileBottomNav.svelte +102 -69
  35. package/src/components/MobileBottomNav.webcomponent.svelte +13 -4
  36. package/src/components/MobileSideMenu.svelte +70 -42
  37. package/src/components/MobileSideMenu.webcomponent.svelte +6 -4
  38. package/src/components/MobileTopNav.svelte +24 -19
  39. package/src/components/MobileTopNav.webcomponent.svelte +6 -6
  40. package/src/components/NavigationInitializer.svelte +10 -2
  41. package/src/components/ProfileMenu.svelte +116 -27
  42. package/src/components/UsaSkipNav.svelte +23 -0
  43. package/src/components/icons/ApiIcon.svelte +182 -33
  44. package/src/components/icons/ChatIcon.svelte +10 -10
  45. package/src/components/icons/CloseIcon.svelte +10 -10
  46. package/src/components/icons/ConsoleIcon.svelte +68 -13
  47. package/src/components/icons/DiscoverIcon.svelte +14 -14
  48. package/src/components/icons/ExclamationIcon.svelte +24 -0
  49. package/src/components/icons/HelpIcon.svelte +2 -1
  50. package/src/components/icons/MenuIcon.svelte +47 -7
  51. package/src/components/icons/index.ts +1 -0
  52. package/src/components/index.ts +1 -1
  53. package/src/helpers/url.ts +13 -4
  54. package/src/layouts/BaseLayout.astro +3 -5
  55. package/src/layouts/GlobalAppLayout.astro +3 -1
  56. package/src/styles/base/theme.css +6 -1
  57. package/src/utils/getAppUrls.ts +27 -4
  58. package/assets/images/lp-bg-hero-1024.webp +0 -0
  59. package/assets/images/lp-bg-hero-1920.webp +0 -0
  60. package/assets/images/lp-bg-hero-640.webp +0 -0
  61. package/assets/images/lp-bg-hero.png +0 -0
  62. package/src/components/UsaSkipNav.astro +0 -5
  63. /package/assets/images/{api-icon.svg → api-icon-b.svg} +0 -0
  64. /package/assets/images/{chat-icon.svg → chat-icon-w.svg} +0 -0
  65. /package/assets/images/{console-icon.svg → console-icon-b.svg} +0 -0
@@ -1,19 +1,31 @@
1
1
  ---
2
- const { title } = Astro.props;
2
+ import { siteName } from '../constants';
3
+ const { title, description, openGraphImage, gtmID } = Astro.props;
3
4
  import { Font } from 'astro:assets';
4
5
  import { getUrlFromBase } from '@gsa-tts/graymatter-ui/helpers';
6
+ import GoogleTagManager from './GoogleTagManager.astro';
7
+
8
+ // Default values for Open Graph
9
+ const defaultDescription =
10
+ 'Accelerating trustworthy adoption of AI across the federal government. Three powerful AI tools. Industry-leading models. One integrated platform.';
11
+ const defaultOgImage = getUrlFromBase('/common/assets/images/og-preview.webp');
12
+
13
+ const pageTitle = `${title} | USAi`;
14
+ const ogTitle = title || siteName;
15
+ const ogDescription = description || defaultDescription;
16
+ const ogImage = openGraphImage || defaultOgImage;
17
+ const siteUrl = Astro.site || Astro.url.origin;
18
+ const canonicalUrl = new URL(Astro.url.pathname, siteUrl).href;
5
19
  ---
6
20
 
7
21
  <meta name="viewport" content="width=device-width" />
8
- <link rel="icon" sizes="any" href=`${getUrlFromBase('favicon.ico')}` />
9
- <link rel="icon" type="image/svg+xml" href=`${getUrlFromBase('favicon.svg')}` />
10
- <meta name="generator" content={Astro.generator} />
11
- <title>{title}</title>
22
+ <title>{pageTitle}</title>
12
23
  <script is:inline>
13
24
  if ('performance' in window) {
14
- performance.mark('gsa:documenthead:start');
25
+ performance.mark('usai:documenthead:start');
15
26
  }
16
27
  </script>
28
+ {gtmID && <GoogleTagManager {gtmID} />}
17
29
  <script is:inline src=`${getUrlFromBase('uswds/js/uswds-init.min.js')}`
18
30
  ></script>
19
31
  <Font cssVariable="--ai-font-family-sans" preload />
@@ -25,9 +37,52 @@ import { getUrlFromBase } from '@gsa-tts/graymatter-ui/helpers';
25
37
  <script>
26
38
  import '../../static/uswds/js/uswds.js';
27
39
  </script>
40
+
41
+ <!-- Open Graph -->
42
+ <meta property="og:type" content="website" />
43
+ <meta property="og:url" content={canonicalUrl} />
44
+ <meta property="og:title" content={ogTitle} />
45
+ <meta property="og:description" content={ogDescription} />
46
+ <meta property="og:image" content={ogImage} />
47
+ <meta property="og:site_name" content={ogTitle} />
48
+
49
+ <meta property="twitter:card" content="summary_large_image" />
50
+ <meta property="twitter:url" content={canonicalUrl} />
51
+ <meta property="twitter:title" content={ogTitle} />
52
+ <meta property="twitter:description" content={ogDescription} />
53
+ <meta property="twitter:image" content={ogImage} />
54
+
55
+ <!-- Additional meta tags -->
56
+ <meta name="description" content={ogDescription} />
57
+ <link rel="canonical" href={canonicalUrl} />
58
+
59
+ <link
60
+ rel="icon"
61
+ sizes="any"
62
+ href=`${getUrlFromBase('/common/assets/images/favicon.ico')}`
63
+ media="(prefers-color-scheme: light)"
64
+ />
65
+ <link
66
+ rel="icon"
67
+ type="image/svg+xml"
68
+ href=`${getUrlFromBase('/common/assets/images/favicon-light.svg')}`
69
+ media="(prefers-color-scheme: light)"
70
+ />
71
+ <link
72
+ rel="icon"
73
+ sizes="any"
74
+ href=`${getUrlFromBase('/common/assets/images/favicon-dark.ico')}`
75
+ media="(prefers-color-scheme: dark)"
76
+ />
77
+ <link
78
+ rel="icon"
79
+ type="image/svg+xml"
80
+ href=`${getUrlFromBase('/common/assets/images/favicon-dark.svg')}`
81
+ media="(prefers-color-scheme: dark)"
82
+ />
28
83
  <!-- This belongs at the very bottom of the head -->
29
84
  <script is:inline>
30
85
  if ('performance' in window) {
31
- performance.mark('gsa:documenthead:end');
86
+ performance.mark('usai:documenthead:end');
32
87
  }
33
88
  </script>
@@ -8,56 +8,63 @@
8
8
  ...restProps
9
9
  } = $props();
10
10
 
11
- const logoColor = isInverted ? 'var(--ai-color-white)' : 'var(--ai-color-black)';
11
+ const logoColor = isInverted
12
+ ? 'var(--ai-color-white)'
13
+ : 'var(--ai-color-black)';
12
14
  </script>
13
15
 
14
16
  {#if !showServiceMark}
15
- <svg
16
- {width}
17
- {height}
18
- viewBox="0 0 102 30"
19
- fill="none"
20
- xmlns="http://www.w3.org/2000/svg"
21
- style="fill: {logoColor};"
22
- {...restProps}
23
- >
24
- <g>
17
+ <svg
18
+ {width}
19
+ {height}
20
+ viewBox="0 0 102 30"
21
+ fill="none"
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ style="fill: {logoColor};"
24
+ {...restProps}
25
+ >
26
+ <g>
27
+ <path
28
+ d="M57.5791 20.4177C57.5791 15.5645 53.7309 11.6187 48.9988 11.6187H40.188C38.6688 11.6187 37.4304 10.3567 37.4304 8.80197C37.4304 7.24729 38.6658 5.98522 40.188 5.98522H56.2373V0H38.8757C34.1466 0 30.2983 3.94877 30.2983 8.80197C30.2983 13.6552 34.1466 17.6039 38.8757 17.6039H47.6865C49.2057 17.6039 50.4442 18.866 50.4442 20.4207C50.4442 21.9754 49.2087 23.2374 47.6865 23.2374H31.0284V29.2197H48.9988C53.7309 29.2197 57.5791 25.2709 57.5791 20.4207V20.4177Z"
29
+ />
30
+ <path
31
+ d="M82.1466 24.7153L82.188 24.7685L83.6747 29.2197H90.6914L80.917 0H68.3525L58.5781 29.2167H65.5949L67.0993 24.7153H82.1466ZM69.186 18.4818L73.3653 5.98522H75.9013L75.919 6.03547L80.1161 18.5793H69.1535L69.186 18.4818Z"
32
+ />
33
+ <path
34
+ d="M27.198 0H20.5626V15.8158C20.5626 21.4345 16.9626 23.4355 13.5961 23.4355C9.03842 23.4355 6.62956 20.799 6.62956 15.8158V0H0V17.0069C0 20.6985 1.46305 24.0532 4.11724 26.4532C6.64729 28.7409 10.0138 30 13.599 30C20.3586 30 27.198 25.5369 27.198 17.0039V0Z"
35
+ />
36
+ <path d="M101.708 9.78915H93.8662V29.2197H101.708V9.78915Z" />
37
+ <path d="M101.823 0H93.8662V5.98227H101.823V0Z" />
38
+ </g>
39
+ </svg>
40
+ {:else}
41
+ <svg
42
+ {width}
43
+ {height}
44
+ viewBox="0 0 75 20"
45
+ fill="none"
46
+ xmlns="http://www.w3.org/2000/svg"
47
+ style="fill: {logoColor};"
48
+ {...restProps}
49
+ >
25
50
  <path
26
- d="M57.5791 20.4177C57.5791 15.5645 53.7309 11.6187 48.9988 11.6187H40.188C38.6688 11.6187 37.4304 10.3567 37.4304 8.80197C37.4304 7.24729 38.6658 5.98522 40.188 5.98522H56.2373V0H38.8757C34.1466 0 30.2983 3.94877 30.2983 8.80197C30.2983 13.6552 34.1466 17.6039 38.8757 17.6039H47.6865C49.2057 17.6039 50.4442 18.866 50.4442 20.4207C50.4442 21.9754 49.2087 23.2374 47.6865 23.2374H31.0284V29.2197H48.9988C53.7309 29.2197 57.5791 25.2709 57.5791 20.4207V20.4177Z"
51
+ d="M38.1538 13.6118C38.1538 10.3764 35.6038 7.74581 32.4682 7.74581H26.6298C25.6231 7.74581 24.8025 6.90443 24.8025 5.86798C24.8025 4.83153 25.6211 3.99015 26.6298 3.99015H37.2646V0H25.7602C22.6266 0 20.0765 2.63251 20.0765 5.86798C20.0765 9.10345 22.6266 11.736 25.7602 11.736H31.5986C32.6053 11.736 33.4259 12.5773 33.4259 13.6138C33.4259 14.6502 32.6072 15.4916 31.5986 15.4916H20.5603V19.4798H32.4682C35.6038 19.4798 38.1538 16.8473 38.1538 13.6138V13.6118Z"
27
52
  />
28
53
  <path
29
- d="M82.1466 24.7153L82.188 24.7685L83.6747 29.2197H90.6914L80.917 0H68.3525L58.5781 29.2167H65.5949L67.0993 24.7153H82.1466ZM69.186 18.4818L73.3653 5.98522H75.9013L75.919 6.03547L80.1161 18.5793H69.1535L69.186 18.4818Z"
54
+ d="M54.4317 16.4768L54.4591 16.5123L55.4442 19.4798H60.0938L53.6169 0H45.2912L38.8143 19.4778H43.4639L44.4608 16.4768H54.4317ZM48.6129 3.99015H50.2933L50.305 4.02365L53.0861 12.3862H45.822L48.6129 3.99015Z"
30
55
  />
31
56
  <path
32
- d="M27.198 0H20.5626V15.8158C20.5626 21.4345 16.9626 23.4355 13.5961 23.4355C9.03842 23.4355 6.62956 20.799 6.62956 15.8158V0H0V17.0069C0 20.6985 1.46305 24.0532 4.11724 26.4532C6.64729 28.7409 10.0138 30 13.599 30C20.3586 30 27.198 25.5369 27.198 17.0039V0Z"
57
+ d="M18.0224 0H13.6255V10.5438C13.6255 14.2897 11.24 15.6236 9.00924 15.6236C5.98918 15.6236 4.39298 13.866 4.39298 10.5438V0H0V11.3379C0 13.799 0.969472 16.0355 2.72823 17.6355C4.40473 19.1606 6.6355 20 9.01119 20C13.4903 20 18.0224 17.0246 18.0224 11.336V0Z"
33
58
  />
34
- <path d="M101.708 9.78915H93.8662V29.2197H101.708V9.78915Z" />
35
- <path d="M101.823 0H93.8662V5.98227H101.823V0Z" />
36
- </g>
37
- </svg>
38
- {:else}
39
- <svg
40
- {width}
41
- {height}
42
- viewBox="0 0 75 20"
43
- fill="none"
44
- xmlns="http://www.w3.org/2000/svg"
45
- style="fill: {logoColor};"
46
- {...restProps}
47
- >
48
- <path
49
- d="M38.1538 13.6118C38.1538 10.3764 35.6038 7.74581 32.4682 7.74581H26.6298C25.6231 7.74581 24.8025 6.90443 24.8025 5.86798C24.8025 4.83153 25.6211 3.99015 26.6298 3.99015H37.2646V0H25.7602C22.6266 0 20.0765 2.63251 20.0765 5.86798C20.0765 9.10345 22.6266 11.736 25.7602 11.736H31.5986C32.6053 11.736 33.4259 12.5773 33.4259 13.6138C33.4259 14.6502 32.6072 15.4916 31.5986 15.4916H20.5603V19.4798H32.4682C35.6038 19.4798 38.1538 16.8473 38.1538 13.6138V13.6118Z"/>
50
- <path
51
- d="M54.4317 16.4768L54.4591 16.5123L55.4442 19.4798H60.0938L53.6169 0H45.2912L38.8143 19.4778H43.4639L44.4608 16.4768H54.4317ZM48.6129 3.99015H50.2933L50.305 4.02365L53.0861 12.3862H45.822L48.6129 3.99015Z"/>
52
- <path
53
- d="M18.0224 0H13.6255V10.5438C13.6255 14.2897 11.24 15.6236 9.00924 15.6236C5.98918 15.6236 4.39298 13.866 4.39298 10.5438V0H0V11.3379C0 13.799 0.969472 16.0355 2.72823 17.6355C4.40473 19.1606 6.6355 20 9.01119 20C13.4903 20 18.0224 17.0246 18.0224 11.336V0Z"/>
54
- <path d="M67.3965 6.52612H62.2005V19.4798H67.3965V6.52612Z"/>
55
- <path
56
- d="M70.6978 2.72727C70.5495 2.72727 70.4078 2.71191 70.2726 2.68118C70.1374 2.64789 70.0178 2.59795 69.9138 2.53137C69.8097 2.46223 69.7278 2.37772 69.668 2.27785C69.6082 2.17542 69.5783 2.05506 69.5783 1.91677C69.5783 1.90141 69.5783 1.88604 69.5783 1.87068C69.5809 1.85531 69.5822 1.84379 69.5822 1.83611H70.0932C70.0932 1.84123 70.0919 1.85147 70.0893 1.86684C70.0893 1.87964 70.0893 1.89117 70.0893 1.90141C70.0893 1.98592 70.114 2.0589 70.1634 2.12036C70.2128 2.17926 70.2843 2.22535 70.3779 2.25864C70.4715 2.28937 70.582 2.30474 70.7095 2.30474C70.7953 2.30474 70.8707 2.29962 70.9357 2.28937C71.0033 2.27913 71.0605 2.26504 71.1073 2.24712C71.1567 2.22663 71.197 2.20359 71.2282 2.17798C71.2594 2.14981 71.2815 2.11908 71.2945 2.08579C71.3101 2.0525 71.3179 2.01665 71.3179 1.97823C71.3179 1.90397 71.2945 1.84251 71.2477 1.79385C71.2009 1.7452 71.1372 1.70423 71.0566 1.67093C70.9786 1.63764 70.8889 1.60819 70.7875 1.58259C70.6887 1.55442 70.586 1.52625 70.4793 1.49808C70.3753 1.46991 70.2726 1.43662 70.1712 1.39821C70.0724 1.35723 69.9827 1.30858 69.9021 1.25224C69.824 1.1959 69.7616 1.12548 69.7148 1.04097C69.668 0.953905 69.6446 0.850192 69.6446 0.729833C69.6446 0.606914 69.6706 0.49936 69.7226 0.40717C69.7772 0.314981 69.8526 0.239437 69.9489 0.180538C70.0477 0.119078 70.1621 0.0742637 70.2921 0.0460946C70.4221 0.0153649 70.5638 0 70.7173 0C70.8603 0 70.9942 0.0153649 71.119 0.0460946C71.2464 0.0742637 71.3582 0.120358 71.4545 0.184379C71.5507 0.245839 71.6261 0.325224 71.6807 0.422535C71.7353 0.517286 71.7626 0.631242 71.7626 0.764405V0.810499H71.2594V0.772087C71.2594 0.697823 71.236 0.635083 71.1892 0.583867C71.145 0.53265 71.0813 0.492958 70.9981 0.464789C70.9175 0.43662 70.8226 0.422535 70.7134 0.422535C70.5963 0.422535 70.4962 0.434059 70.413 0.457106C70.3298 0.477593 70.2661 0.509603 70.2219 0.553137C70.1777 0.59411 70.1556 0.645326 70.1556 0.706786C70.1556 0.770807 70.179 0.824584 70.2258 0.868118C70.2726 0.911652 70.335 0.948784 70.413 0.979513C70.4936 1.01024 70.5833 1.03841 70.6822 1.06402C70.7836 1.08963 70.8863 1.1178 70.9903 1.14853C71.0969 1.1767 71.1996 1.20999 71.2984 1.2484C71.3999 1.28681 71.4896 1.33547 71.5676 1.39437C71.6482 1.4507 71.7119 1.52113 71.7587 1.60563C71.8055 1.69014 71.8289 1.79129 71.8289 1.90909C71.8289 2.10627 71.7795 2.26504 71.6807 2.3854C71.5845 2.50576 71.4506 2.59283 71.2789 2.64661C71.1099 2.70038 70.9162 2.72727 70.6978 2.72727Z"/>
57
- <path
58
- d="M72.3008 2.68118V0.0460946H73.1004L73.5217 1.51344C73.5373 1.56466 73.5529 1.62228 73.5685 1.6863C73.5841 1.75032 73.5984 1.81178 73.6114 1.87068C73.627 1.92958 73.6387 1.98079 73.6465 2.02433H73.6777C73.6829 1.98592 73.6907 1.93854 73.7011 1.8822C73.7115 1.82586 73.7232 1.76568 73.7362 1.70166C73.7518 1.63508 73.7687 1.57106 73.7869 1.5096L74.2082 0.0460946H75V2.68118H74.4929V1.34827C74.4929 1.23047 74.4942 1.11268 74.4968 0.994878C74.4994 0.877081 74.502 0.775928 74.5046 0.691421C74.5098 0.606914 74.5124 0.556978 74.5124 0.541613H74.4812C74.476 0.564661 74.463 0.614597 74.4422 0.691421C74.4214 0.768246 74.3993 0.851472 74.3759 0.941101C74.3525 1.03073 74.3317 1.10755 74.3135 1.17157L73.8727 2.68118H73.4047L72.9639 1.17542C72.9483 1.12164 72.9301 1.05762 72.9093 0.983355C72.8911 0.90653 72.8716 0.828425 72.8508 0.74904C72.8326 0.669654 72.8157 0.600512 72.8001 0.541613H72.7689C72.7715 0.610755 72.7741 0.693982 72.7767 0.791293C72.7793 0.886043 72.7819 0.983355 72.7845 1.08323C72.7871 1.18054 72.7884 1.26889 72.7884 1.34827V2.68118H72.3008Z"/>
59
- <path d="M67.4728 0H62.2005V3.98818H67.4728V0Z"/>
60
- </svg>
59
+ <path d="M67.3965 6.52612H62.2005V19.4798H67.3965V6.52612Z" />
60
+ <path
61
+ d="M70.6978 2.72727C70.5495 2.72727 70.4078 2.71191 70.2726 2.68118C70.1374 2.64789 70.0178 2.59795 69.9138 2.53137C69.8097 2.46223 69.7278 2.37772 69.668 2.27785C69.6082 2.17542 69.5783 2.05506 69.5783 1.91677C69.5783 1.90141 69.5783 1.88604 69.5783 1.87068C69.5809 1.85531 69.5822 1.84379 69.5822 1.83611H70.0932C70.0932 1.84123 70.0919 1.85147 70.0893 1.86684C70.0893 1.87964 70.0893 1.89117 70.0893 1.90141C70.0893 1.98592 70.114 2.0589 70.1634 2.12036C70.2128 2.17926 70.2843 2.22535 70.3779 2.25864C70.4715 2.28937 70.582 2.30474 70.7095 2.30474C70.7953 2.30474 70.8707 2.29962 70.9357 2.28937C71.0033 2.27913 71.0605 2.26504 71.1073 2.24712C71.1567 2.22663 71.197 2.20359 71.2282 2.17798C71.2594 2.14981 71.2815 2.11908 71.2945 2.08579C71.3101 2.0525 71.3179 2.01665 71.3179 1.97823C71.3179 1.90397 71.2945 1.84251 71.2477 1.79385C71.2009 1.7452 71.1372 1.70423 71.0566 1.67093C70.9786 1.63764 70.8889 1.60819 70.7875 1.58259C70.6887 1.55442 70.586 1.52625 70.4793 1.49808C70.3753 1.46991 70.2726 1.43662 70.1712 1.39821C70.0724 1.35723 69.9827 1.30858 69.9021 1.25224C69.824 1.1959 69.7616 1.12548 69.7148 1.04097C69.668 0.953905 69.6446 0.850192 69.6446 0.729833C69.6446 0.606914 69.6706 0.49936 69.7226 0.40717C69.7772 0.314981 69.8526 0.239437 69.9489 0.180538C70.0477 0.119078 70.1621 0.0742637 70.2921 0.0460946C70.4221 0.0153649 70.5638 0 70.7173 0C70.8603 0 70.9942 0.0153649 71.119 0.0460946C71.2464 0.0742637 71.3582 0.120358 71.4545 0.184379C71.5507 0.245839 71.6261 0.325224 71.6807 0.422535C71.7353 0.517286 71.7626 0.631242 71.7626 0.764405V0.810499H71.2594V0.772087C71.2594 0.697823 71.236 0.635083 71.1892 0.583867C71.145 0.53265 71.0813 0.492958 70.9981 0.464789C70.9175 0.43662 70.8226 0.422535 70.7134 0.422535C70.5963 0.422535 70.4962 0.434059 70.413 0.457106C70.3298 0.477593 70.2661 0.509603 70.2219 0.553137C70.1777 0.59411 70.1556 0.645326 70.1556 0.706786C70.1556 0.770807 70.179 0.824584 70.2258 0.868118C70.2726 0.911652 70.335 0.948784 70.413 0.979513C70.4936 1.01024 70.5833 1.03841 70.6822 1.06402C70.7836 1.08963 70.8863 1.1178 70.9903 1.14853C71.0969 1.1767 71.1996 1.20999 71.2984 1.2484C71.3999 1.28681 71.4896 1.33547 71.5676 1.39437C71.6482 1.4507 71.7119 1.52113 71.7587 1.60563C71.8055 1.69014 71.8289 1.79129 71.8289 1.90909C71.8289 2.10627 71.7795 2.26504 71.6807 2.3854C71.5845 2.50576 71.4506 2.59283 71.2789 2.64661C71.1099 2.70038 70.9162 2.72727 70.6978 2.72727Z"
62
+ />
63
+ <path
64
+ d="M72.3008 2.68118V0.0460946H73.1004L73.5217 1.51344C73.5373 1.56466 73.5529 1.62228 73.5685 1.6863C73.5841 1.75032 73.5984 1.81178 73.6114 1.87068C73.627 1.92958 73.6387 1.98079 73.6465 2.02433H73.6777C73.6829 1.98592 73.6907 1.93854 73.7011 1.8822C73.7115 1.82586 73.7232 1.76568 73.7362 1.70166C73.7518 1.63508 73.7687 1.57106 73.7869 1.5096L74.2082 0.0460946H75V2.68118H74.4929V1.34827C74.4929 1.23047 74.4942 1.11268 74.4968 0.994878C74.4994 0.877081 74.502 0.775928 74.5046 0.691421C74.5098 0.606914 74.5124 0.556978 74.5124 0.541613H74.4812C74.476 0.564661 74.463 0.614597 74.4422 0.691421C74.4214 0.768246 74.3993 0.851472 74.3759 0.941101C74.3525 1.03073 74.3317 1.10755 74.3135 1.17157L73.8727 2.68118H73.4047L72.9639 1.17542C72.9483 1.12164 72.9301 1.05762 72.9093 0.983355C72.8911 0.90653 72.8716 0.828425 72.8508 0.74904C72.8326 0.669654 72.8157 0.600512 72.8001 0.541613H72.7689C72.7715 0.610755 72.7741 0.693982 72.7767 0.791293C72.7793 0.886043 72.7819 0.983355 72.7845 1.08323C72.7871 1.18054 72.7884 1.26889 72.7884 1.34827V2.68118H72.3008Z"
65
+ />
66
+ <path d="M67.4728 0H62.2005V3.98818H67.4728V0Z" />
67
+ </svg>
61
68
  {/if}
62
69
 
63
70
  <style>
@@ -1,12 +1,18 @@
1
- <svelte:options customElement={{
2
- tag: 'graymatter-logo',
3
- props: {
4
- isInverted: { reflect: true, type: 'Boolean', attribute: 'is-inverted' },
5
- width: { reflect: true, type: 'Number', attribute: 'width' },
6
- height: { reflect: true, type: 'Number', attribute: 'height' },
7
- showServiceMark: { reflect: true, type: 'Boolean', attribute: 'show-service-mark' },
8
- }
9
- }} />
1
+ <svelte:options
2
+ customElement={{
3
+ tag: 'graymatter-logo',
4
+ props: {
5
+ isInverted: { reflect: true, type: 'Boolean', attribute: 'is-inverted' },
6
+ width: { reflect: true, type: 'Number', attribute: 'width' },
7
+ height: { reflect: true, type: 'Number', attribute: 'height' },
8
+ showServiceMark: {
9
+ reflect: true,
10
+ type: 'Boolean',
11
+ attribute: 'show-service-mark',
12
+ },
13
+ },
14
+ }}
15
+ />
10
16
 
11
17
  <script lang="ts">
12
18
  import Logo from './Logo.svelte';
@@ -20,10 +26,4 @@
20
26
  } = $props();
21
27
  </script>
22
28
 
23
- <Logo
24
- {isInverted}
25
- {width}
26
- {height}
27
- {showServiceMark}
28
- {...props}
29
- />
29
+ <Logo {isInverted} {width} {height} {showServiceMark} {...props} />
@@ -6,105 +6,138 @@
6
6
  import ConsoleIcon from './icons/ConsoleIcon.svelte';
7
7
  import ApiIcon from './icons/ApiIcon.svelte';
8
8
  import { getAppUrls } from '../utils/getAppUrls';
9
- import slugify from "slugify";
9
+ import slugify from 'slugify';
10
10
 
11
- let {onNavItemClick, showAppIcons = true, apiUrl, chatUrl, consoleUrl, discoverUrl}: {
12
- onNavItemClick?: (data: { item: NavigationItem; expanded: boolean }) => void,
13
- showAppIcons: boolean,
14
- apiUrl?: string,
15
- chatUrl?: string,
16
- consoleUrl?: string,
17
- discoverUrl?: string,
11
+ let {
12
+ onNavItemClick,
13
+ showAppIcons = true,
14
+ apiUrl,
15
+ chatUrl,
16
+ consoleUrl,
17
+ discoverUrl,
18
+ }: {
19
+ onNavItemClick?: (data: {
20
+ item: NavigationItem;
21
+ expanded: boolean;
22
+ }) => void;
23
+ showAppIcons: boolean;
24
+ apiUrl?: string;
25
+ chatUrl?: string;
26
+ consoleUrl?: string;
27
+ discoverUrl?: string;
18
28
  } = $props();
19
29
 
20
30
  const urls = getAppUrls();
21
31
 
22
32
  const navItems = [
23
- { id: 'discover', label: 'Discover', icon: DiscoverIcon, href: discoverUrl || urls.discover },
33
+ {
34
+ id: 'discover',
35
+ label: 'Discover',
36
+ icon: DiscoverIcon,
37
+ href: discoverUrl || urls.discover,
38
+ },
24
39
  { id: 'chat', label: 'Chat', icon: ChatIcon, href: chatUrl || urls.chat },
25
- { id: 'console', label: 'Console', icon: ConsoleIcon, href: consoleUrl || urls.console },
26
- { id: 'api', label: 'API', icon: ApiIcon, href: apiUrl || urls.api }
40
+ {
41
+ id: 'console',
42
+ label: 'Console',
43
+ icon: ConsoleIcon,
44
+ href: consoleUrl || urls.console,
45
+ },
46
+ { id: 'api', label: 'API', icon: ApiIcon, href: apiUrl || urls.api },
27
47
  ] as const;
28
48
 
29
- function handleNavItemClick(item: NavigationItem) {
49
+ function handleNavItemClick(item: NavigationItem) {
30
50
  // Set navigation flag immediately to prevent header restoration
31
51
  if (item !== 'discover' && typeof window !== 'undefined') {
32
52
  sessionStorage.setItem('navigatingToMainNav', 'true');
33
53
  }
34
-
54
+
35
55
  navigationStore.setSelectedItem(item);
36
-
56
+
37
57
  // Clear header state for main navigation items (including discover)
38
58
  if (item !== 'discover') {
39
59
  try {
40
- import('@gsa-tts/graymatter-ui/stores/navigationStore').then(({ selectedSubNavItemTitle }) => {
41
- // Clear the store value immediately
42
- selectedSubNavItemTitle.set('');
43
- if (typeof window !== 'undefined') {
44
- sessionStorage.removeItem('subNav-selectedTitle');
45
- sessionStorage.removeItem('subNav-selectedId');
46
- }
47
-
48
- // Set default header from first submenu item after a short delay
49
- setTimeout(() => {
50
- const mainContent = document.getElementById('main-content');
51
- if (mainContent) {
52
- const firstSection = mainContent.querySelector('h2[id], h3[id], h4[id], h5[id], h6[id]');
53
- if (firstSection && firstSection.textContent) {
54
- const firstSectionTitle = firstSection.textContent.trim();
55
- selectedSubNavItemTitle.set(firstSectionTitle);
56
- if (typeof window !== 'undefined') {
57
- sessionStorage.setItem('subNav-selectedTitle', JSON.stringify(firstSectionTitle));
60
+ import('@gsa-tts/graymatter-ui/stores/navigationStore')
61
+ .then(({ selectedSubNavItemTitle }) => {
62
+ // Clear the store value immediately
63
+ selectedSubNavItemTitle.set('');
64
+ if (typeof window !== 'undefined') {
65
+ sessionStorage.removeItem('subNav-selectedTitle');
66
+ sessionStorage.removeItem('subNav-selectedId');
67
+ }
68
+
69
+ // Set default header from first submenu item after a short delay
70
+ setTimeout(() => {
71
+ const mainContent = document.getElementById('main-content');
72
+ if (mainContent) {
73
+ const firstSection = mainContent.querySelector(
74
+ 'h2[id], h3[id], h4[id], h5[id], h6[id]'
75
+ );
76
+ if (firstSection && firstSection.textContent) {
77
+ const firstSectionTitle = firstSection.textContent.trim();
78
+ selectedSubNavItemTitle.set(firstSectionTitle);
79
+ if (typeof window !== 'undefined') {
80
+ sessionStorage.setItem(
81
+ 'subNav-selectedTitle',
82
+ JSON.stringify(firstSectionTitle)
83
+ );
84
+ }
58
85
  }
59
86
  }
60
- }
61
- }, 200); // Delay to ensure page content is loaded
62
- }).catch((err) => {
63
- console.log('[MobileBottomNav] Error clearing header state:', err);
64
- });
87
+ }, 200); // Delay to ensure page content is loaded
88
+ })
89
+ .catch(err => {
90
+ console.log('[MobileBottomNav] Error clearing header state:', err);
91
+ });
65
92
  } catch (err) {
66
93
  console.log('[MobileBottomNav] Import failed for clearing state:', err);
67
94
  }
68
95
  } else {
69
96
  // Clear header state for Discover page
70
97
  try {
71
- import('@gsa-tts/graymatter-ui/stores/navigationStore').then(({ selectedSubNavItemTitle }) => {
72
- selectedSubNavItemTitle.set('');
73
- if (typeof window !== 'undefined') {
74
- sessionStorage.removeItem('subNav-selectedTitle');
75
- sessionStorage.removeItem('subNav-selectedId');
76
- }
77
- }).catch((err) => {
78
- console.log('[MobileBottomNav] Error clearing header state for Discover:', err);
79
- });
98
+ import('@gsa-tts/graymatter-ui/stores/navigationStore')
99
+ .then(({ selectedSubNavItemTitle }) => {
100
+ selectedSubNavItemTitle.set('');
101
+ if (typeof window !== 'undefined') {
102
+ sessionStorage.removeItem('subNav-selectedTitle');
103
+ sessionStorage.removeItem('subNav-selectedId');
104
+ }
105
+ })
106
+ .catch(err => {
107
+ console.log(
108
+ '[MobileBottomNav] Error clearing header state for Discover:',
109
+ err
110
+ );
111
+ });
80
112
  } catch (err) {
81
- console.log('[MobileBottomNav] Import failed for clearing Discover state:', err);
113
+ console.log(
114
+ '[MobileBottomNav] Import failed for clearing Discover state:',
115
+ err
116
+ );
82
117
  }
83
118
  }
84
-
119
+
85
120
  onNavItemClick?.({ item, expanded: false });
86
121
  }
87
122
  </script>
88
123
 
89
124
  {#if showAppIcons}
90
- <nav class="mobile-bottom-nav" part="mobile-bottom-nav">
91
- {#each navItems as navItem}
92
- <a
93
- href={navItem.href}
94
- class={`nav-item ${slugify(navItem.id)}-item`}
95
- class:active={$selectedItem === navItem.id}
96
- onclick={() => handleNavItemClick(navItem.id)}
97
- part={`${slugify(navItem.id)}-item`}
98
- >
99
- <div class="icon">
100
- <navItem.icon
101
- isSelected={$selectedItem === navItem.id}
102
- />
103
- </div>
104
- <span class="label">{navItem.label}</span>
105
- </a>
106
- {/each}
107
- </nav>
125
+ <nav class="mobile-bottom-nav" part="mobile-bottom-nav">
126
+ {#each navItems as navItem}
127
+ <a
128
+ href={navItem.href}
129
+ class={`nav-item ${slugify(navItem.id)}-item`}
130
+ class:active={$selectedItem === navItem.id}
131
+ onclick={() => handleNavItemClick(navItem.id)}
132
+ part={`${slugify(navItem.id)}-item`}
133
+ >
134
+ <div class="icon">
135
+ <navItem.icon isSelected={$selectedItem === navItem.id} />
136
+ </div>
137
+ <span class="label">{navItem.label}</span>
138
+ </a>
139
+ {/each}
140
+ </nav>
108
141
  {/if}
109
142
 
110
143
  <style>
@@ -117,7 +150,7 @@
117
150
  padding: var(--ai-size-4);
118
151
  text-decoration: none;
119
152
  color: var(--ai-color-neutral-600);
120
- transition: color 0.2s ease;
153
+ transition: color var(--ai-transition-ease-fast);
121
154
  height: 100%;
122
155
  }
123
156
 
@@ -133,7 +166,7 @@
133
166
  .nav-item:hover {
134
167
  color: var(--ai-color-neutral-700);
135
168
  }
136
-
169
+
137
170
  .icon {
138
171
  width: var(--ai-size-24);
139
172
  height: var(--ai-size-24);
@@ -142,7 +175,7 @@
142
175
  align-items: center;
143
176
  justify-content: center;
144
177
  padding: var(--ai-size-2);
145
- transition: background-color 0.2s ease;
178
+ transition: background-color var(--ai-transition-ease-fast);
146
179
  }
147
180
 
148
181
  .label {
@@ -1,12 +1,21 @@
1
- <svelte:options customElement={{
2
- tag: 'graymatter-mobile-bottom-nav'
3
- }} />
1
+ <svelte:options
2
+ customElement={{
3
+ tag: 'graymatter-mobile-bottom-nav',
4
+ }}
5
+ />
4
6
 
5
7
  <script lang="ts">
6
8
  import MobileBottomNav from './MobileBottomNav.svelte';
7
9
 
8
10
  // Props for the web component
9
- let { onNavItemClick, showAppIcons = true, apiUrl, chatUrl, consoleUrl, discoverUrl } = $props();
11
+ let {
12
+ onNavItemClick,
13
+ showAppIcons = true,
14
+ apiUrl,
15
+ chatUrl,
16
+ consoleUrl,
17
+ discoverUrl,
18
+ } = $props();
10
19
  </script>
11
20
 
12
21
  <MobileBottomNav