@uoguelph/web-components 1.1.3 → 1.2.0-rc.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 (82) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/{index-469a8261.js → index-06b58d35.js} +5 -5
  3. package/dist/cjs/{index-4e3091d0.js → index-cdb046b4.js} +134 -40
  4. package/dist/cjs/loader.cjs.js +5 -3
  5. package/dist/cjs/uofg-alert.cjs.entry.js +11 -10
  6. package/dist/cjs/uofg-back-to-top_5.cjs.entry.js +1374 -0
  7. package/dist/cjs/uofg-modal.cjs.entry.js +152 -142
  8. package/dist/cjs/uofg-web-components.cjs.js +6 -4
  9. package/dist/cjs/utils-3d4b7e2e.js +16 -0
  10. package/dist/collection/collection-manifest.json +2 -2
  11. package/dist/collection/components/uofg-alert/uofg-alert.css +1 -75
  12. package/dist/collection/components/uofg-alert/uofg-alert.js +15 -15
  13. package/dist/collection/components/uofg-back-to-top/uofg-back-to-top.css +1 -40
  14. package/dist/collection/components/uofg-back-to-top/uofg-back-to-top.js +66 -63
  15. package/dist/collection/components/uofg-card/uofg-card.css +1 -95
  16. package/dist/collection/components/uofg-card/uofg-card.js +42 -40
  17. package/dist/collection/components/uofg-footer/uofg-footer.css +1 -249
  18. package/dist/collection/components/uofg-footer/uofg-footer.js +132 -40
  19. package/dist/collection/components/uofg-header/uofg-header.css +1 -542
  20. package/dist/collection/components/uofg-header/uofg-header.js +238 -157
  21. package/dist/collection/components/uofg-menu/uofg-menu.js +414 -410
  22. package/dist/collection/components/uofg-modal/uofg-modal.css +1 -113
  23. package/dist/collection/components/uofg-modal/uofg-modal.js +393 -386
  24. package/dist/collection/utils/font-awesome-icon.js +4 -4
  25. package/dist/collection/utils/utils.js +5 -5
  26. package/dist/components/font-awesome-icon.js +4 -4
  27. package/dist/components/uofg-alert.d.ts +2 -2
  28. package/dist/components/uofg-alert.js +22 -21
  29. package/dist/components/uofg-back-to-top.d.ts +2 -2
  30. package/dist/components/uofg-back-to-top.js +38 -34
  31. package/dist/components/uofg-card.d.ts +2 -2
  32. package/dist/components/uofg-card.js +28 -25
  33. package/dist/components/uofg-footer.d.ts +2 -2
  34. package/dist/components/uofg-footer.js +243 -115
  35. package/dist/components/uofg-header.d.ts +2 -2
  36. package/dist/components/uofg-header.js +234 -143
  37. package/dist/components/uofg-menu.d.ts +2 -2
  38. package/dist/components/uofg-menu2.js +245 -239
  39. package/dist/components/uofg-modal.d.ts +2 -2
  40. package/dist/components/uofg-modal.js +176 -166
  41. package/dist/components/utils.js +4 -4
  42. package/dist/esm/app-globals-0f993ce5.js +3 -0
  43. package/dist/esm/{index-f644a780.js → index-0b0002d2.js} +134 -40
  44. package/dist/esm/{index-26c6582e.js → index-e685921a.js} +5 -5
  45. package/dist/esm/loader.js +6 -4
  46. package/dist/esm/uofg-alert.entry.js +11 -10
  47. package/dist/esm/uofg-back-to-top_5.entry.js +1366 -0
  48. package/dist/esm/uofg-modal.entry.js +152 -142
  49. package/dist/esm/uofg-web-components.js +7 -5
  50. package/dist/esm/utils-379bb71a.js +12 -0
  51. package/dist/types/components/uofg-alert/uofg-alert.d.ts +1 -1
  52. package/dist/types/components/uofg-back-to-top/uofg-back-to-top.d.ts +8 -8
  53. package/dist/types/components/uofg-card/uofg-card.d.ts +5 -5
  54. package/dist/types/components/uofg-footer/uofg-footer.d.ts +6 -6
  55. package/dist/types/components/uofg-header/uofg-header.d.ts +30 -29
  56. package/dist/types/components/uofg-menu/uofg-menu.d.ts +65 -65
  57. package/dist/types/components/uofg-modal/uofg-modal.d.ts +70 -70
  58. package/dist/types/components.d.ts +1 -1
  59. package/dist/types/stencil-public-runtime.d.ts +8 -0
  60. package/dist/types/utils/font-awesome-icon.d.ts +1 -1
  61. package/dist/uofg-web-components/{p-afff1fb0.js → p-6fa0f8f6.js} +1 -1
  62. package/dist/uofg-web-components/p-7569d8f2.entry.js +1 -0
  63. package/dist/uofg-web-components/p-c0449c39.entry.js +1 -0
  64. package/dist/uofg-web-components/p-e1255160.js +1 -0
  65. package/dist/uofg-web-components/p-ee27db22.js +2 -0
  66. package/dist/uofg-web-components/p-fde6370b.entry.js +1 -0
  67. package/dist/uofg-web-components/uofg-web-components.css +1 -1
  68. package/dist/uofg-web-components/uofg-web-components.esm.js +1 -1
  69. package/package.json +10 -5
  70. package/dist/cjs/uofg-back-to-top_4.cjs.entry.js +0 -1139
  71. package/dist/cjs/uofg-card.cjs.entry.js +0 -21
  72. package/dist/cjs/utils-582c8cb9.js +0 -16
  73. package/dist/components/_commonjsHelpers.js +0 -15
  74. package/dist/esm/uofg-back-to-top_4.entry.js +0 -1132
  75. package/dist/esm/uofg-card.entry.js +0 -17
  76. package/dist/esm/utils-cfa32fa2.js +0 -12
  77. package/dist/uofg-web-components/p-579599fd.js +0 -2
  78. package/dist/uofg-web-components/p-5f29369c.entry.js +0 -1
  79. package/dist/uofg-web-components/p-b55cb256.entry.js +0 -1
  80. package/dist/uofg-web-components/p-b81838c7.entry.js +0 -1
  81. package/dist/uofg-web-components/p-f42ff310.entry.js +0 -1
  82. /package/dist/uofg-web-components/{p-826dc478.js → p-fec87f9d.js} +0 -0
@@ -1,6 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { F as FontAwesomeIcon } from './font-awesome-icon.js';
3
- import { c as createCommonjsModule } from './_commonjsHelpers.js';
4
3
  import { d as defineCustomElement$2 } from './uofg-menu2.js';
5
4
 
6
5
  const Decoration = `<svg viewBox="0 0 68 90" xmlns="http://www.w3.org/2000/svg"><path d="M23.131 0l44.847 90H0V0" fill="#c20430"/><path d="M23.131 0l16.03 32.044L55.1 0" fill="#ffc500"/></svg>`;
@@ -9,7 +8,9 @@ const FullSizeLogo = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserv
9
8
 
10
9
  const ReducedSizeLogo = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M0 0h100v100H0V0z"/><path fill="#fff" d="M74.6 54.9l-.7 2c2.4 0 5.6 1.4 5.6 2.9v9.5c0-.2-.2 5.4-7.8 5.4-13.7 0-15.6-10-15.6-20 0-6.7 2.4-13 5.8-17 3.4-3.8 9.8-3.6 15-3 5 .4 6.8 8.7 6.8 8.7l1.7-.5.2-13.2s-.7-.7-1.2-.5c-.5.3-2.4 1-3.7 1-1 0-4.6-.7-8.3-.7-6.6 0-13 1.4-17.8 8a32 32 0 00-3.4 6.1V28c0-8 4.1-6.3 4.6-7 .5-1.3.5-1.3-.2-1.5H39.9s-2 1.4-.7 1.4c5.4.5 7.6 2.5 7.6 7.4v25.4c0 6.6-5.1 10.5-12.5 10.5C27 64.2 22 59.5 22 51.5v-23c0-8 4.1-6.6 4.4-7.6.7-1 .7-1.2 0-1.2 0 0-9.3.5-16.2 0 0 0-2 1.5-.7 1.5 5.4.5 5.4 2.9 5.4 8v26.2s-.5 13.9 17.8 13.9c7.8 0 12.5-3.2 15-6.4l1.1-1.7c.3 2.5.8 5 1.5 7.1 3 9.6 14 12.2 17.6 12.2 4.6 0 4.6 0 8.8-2.9 2.2-1.2 10.2-4.4 10.2-4.4V59.8c0-2.2 4-3.2 4-3.2l.2-1.7H74.6z"/></svg>`;
11
10
 
12
- var faBars = createCommonjsModule(function (module, exports) {
11
+ var faBars = {};
12
+
13
+ (function (exports) {
13
14
  Object.defineProperty(exports, '__esModule', { value: true });
14
15
  var prefix = 'fas';
15
16
  var iconName = 'bars';
@@ -39,9 +40,11 @@ exports.ligatures = aliases;
39
40
  exports.unicode = unicode;
40
41
  exports.svgPathData = svgPathData;
41
42
  exports.aliases = aliases;
42
- });
43
+ }(faBars));
44
+
45
+ var faRightToBracket = {};
43
46
 
44
- var faRightToBracket = createCommonjsModule(function (module, exports) {
47
+ (function (exports) {
45
48
  Object.defineProperty(exports, '__esModule', { value: true });
46
49
  var prefix = 'fas';
47
50
  var iconName = 'right-to-bracket';
@@ -71,9 +74,13 @@ exports.ligatures = aliases;
71
74
  exports.unicode = unicode;
72
75
  exports.svgPathData = svgPathData;
73
76
  exports.aliases = aliases;
74
- });
77
+ }(faRightToBracket));
78
+
79
+ var faSearch = {};
80
+
81
+ var faMagnifyingGlass = {};
75
82
 
76
- var faMagnifyingGlass = createCommonjsModule(function (module, exports) {
83
+ (function (exports) {
77
84
  Object.defineProperty(exports, '__esModule', { value: true });
78
85
  var prefix = 'fas';
79
86
  var iconName = 'magnifying-glass';
@@ -103,34 +110,36 @@ exports.ligatures = aliases;
103
110
  exports.unicode = unicode;
104
111
  exports.svgPathData = svgPathData;
105
112
  exports.aliases = aliases;
106
- });
113
+ }(faMagnifyingGlass));
107
114
 
108
- var faSearch = createCommonjsModule(function (module, exports) {
115
+ (function (exports) {
109
116
  Object.defineProperty(exports, '__esModule', { value: true });
110
-
117
+ var source = faMagnifyingGlass;
111
118
  exports.definition = {
112
- prefix: faMagnifyingGlass.prefix,
113
- iconName: faMagnifyingGlass.iconName,
119
+ prefix: source.prefix,
120
+ iconName: source.iconName,
114
121
  icon: [
115
- faMagnifyingGlass.width,
116
- faMagnifyingGlass.height,
117
- faMagnifyingGlass.aliases,
118
- faMagnifyingGlass.unicode,
119
- faMagnifyingGlass.svgPathData
122
+ source.width,
123
+ source.height,
124
+ source.aliases,
125
+ source.unicode,
126
+ source.svgPathData
120
127
  ]};
121
128
 
122
129
  exports.faSearch = exports.definition;
123
- exports.prefix = faMagnifyingGlass.prefix;
124
- exports.iconName = faMagnifyingGlass.iconName;
125
- exports.width = faMagnifyingGlass.width;
126
- exports.height = faMagnifyingGlass.height;
127
- exports.ligatures = faMagnifyingGlass.aliases;
128
- exports.unicode = faMagnifyingGlass.unicode;
129
- exports.svgPathData = faMagnifyingGlass.svgPathData;
130
- exports.aliases = faMagnifyingGlass.aliases;
131
- });
130
+ exports.prefix = source.prefix;
131
+ exports.iconName = source.iconName;
132
+ exports.width = source.width;
133
+ exports.height = source.height;
134
+ exports.ligatures = source.aliases;
135
+ exports.unicode = source.unicode;
136
+ exports.svgPathData = source.svgPathData;
137
+ exports.aliases = source.aliases;
138
+ }(faSearch));
139
+
140
+ var faCaretDown = {};
132
141
 
133
- var faCaretDown = createCommonjsModule(function (module, exports) {
142
+ (function (exports) {
134
143
  Object.defineProperty(exports, '__esModule', { value: true });
135
144
  var prefix = 'fas';
136
145
  var iconName = 'caret-down';
@@ -160,132 +169,214 @@ exports.ligatures = aliases;
160
169
  exports.unicode = unicode;
161
170
  exports.svgPathData = svgPathData;
162
171
  exports.aliases = aliases;
163
- });
172
+ }(faCaretDown));
164
173
 
165
- const uofgHeaderCss = ":focus-visible{outline:2px solid #ffc72a;outline-offset:0.5rem}*{box-sizing:border-box}button{border:none;background-color:transparent;cursor:pointer}a{color:inherit;text-decoration:none}ul{list-style:none;padding:0;margin:unset}ul>li{display:contents}:host{height:auto !important}a{display:flex;align-items:center;transition-property:color, background-color;transition-duration:0.2s;transition-timing-function:ease-in-out}li{display:contents}button{border:none;background:none;cursor:pointer;font-size:inherit;font-family:inherit;color:inherit;line-height:inherit;word-spacing:inherit;letter-spacing:inherit;transition-property:color, background-color;transition-duration:0.2s;transition-timing-function:ease-in-out}uofg-menu{--uofg-menu-animation-type:slide;--uofg-menu-animation-duration:0.2s;--uofg-menu-animation-easing:ease-in-out;display:block;position:relative}uofg-menu>[slot=button]{display:flex;align-items:center;gap:0.5rem;height:100%;padding:0 1rem}uofg-menu>[slot=button]>svg{height:1em;fill:currentColor;transition-property:transform;transition-duration:0.2s;transition-timing-function:ease-in-out}uofg-menu>[slot=content]{display:flex;flex-direction:column;position:absolute;z-index:1;min-width:20rem;right:0;background-color:white;color:black;box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0px 1px 5px 0px rgba(0, 0, 0, 0.2)}#uofg-header{position:relative;width:100%;z-index:1000;font-size:1.6rem;font-family:\"Roboto Condensed\", Arial, sans-serif}#uofg-header-top-content-container,#uofg-header-main-content-container,#uofg-header-sub-content-container{display:flex;position:relative;align-items:center;justify-content:flex-end;width:100%;padding:0 calc((100vw - 1320px) / 2)}#uofg-header-top-content-container{height:4rem;background-color:white;color:black;z-index:3;font-size:1.9rem}#uofg-header-top-content-container>ul{display:flex;align-items:center;height:100%}#uofg-header-top-content-container>ul>li>a{height:100%;padding:0 1rem}#uofg-header-top-content-container>ul>li>a:hover,#uofg-header-top-content-container>ul>li>a:focus-visible,#uofg-header-top-content-container>ul>li>a[aria-expanded=true]{background-color:#dddddd}#uofg-header-top-content-container>uofg-menu{height:100%}#uofg-header-top-content-container>uofg-menu>[slot=button]{padding:0 1rem;background-color:#ffc72a;color:black;font-weight:bold}#uofg-header-top-content-container>uofg-menu>[slot=button]:hover,#uofg-header-top-content-container>uofg-menu>[slot=button]:focus-visible,#uofg-header-top-content-container>uofg-menu>[slot=button][aria-expanded=true]{background-color:#ccc;color:black}#uofg-header-top-content-container>uofg-menu>[slot=button][aria-expanded=true]>svg{transform:rotate(180deg)}#uofg-header-top-content-container>uofg-menu>[slot=content]{background-color:#dddddd;color:black}#uofg-header-top-content-container>uofg-menu>[slot=content] a{height:100%;padding:0.75rem;border-bottom:1px solid rgba(0, 0, 0, 0.4)}#uofg-header-top-content-container>uofg-menu>[slot=content] a:hover,#uofg-header-top-content-container>uofg-menu>[slot=content] a:focus-visible{background-color:#ffc72a}#uofg-header-main-content-container{height:5rem;background-color:black;color:white;z-index:2}#uofg-header-main-content-container>*{height:100%}#uofg-header-main-content-container.full-height{height:10rem}#uofg-header-logo-container{display:flex;height:100%;margin-right:auto;overflow:hidden}#uofg-header-logo-container>*{height:100%}#uofg-header-logo-container svg{width:auto}#uofg-header-decorative-img{position:absolute;left:0}#uofg-header-decorative-img>svg{height:100%}#uofg-header-logo{height:100%;position:relative;margin-left:1rem;transition:opacity 0.2s ease-in-out}#uofg-header-logo>svg{height:100%}#uofg-header-logo:hover,#uofg-header-logo:focus-visible{opacity:0.8}#uofg-header-full-main-content,#uofg-header-reduced-main-content{display:flex}#uofg-header-full-main-content svg,#uofg-header-reduced-main-content svg{height:1em;fill:currentColor}#uofg-header-full-main-content>ul{display:flex;align-items:center}#uofg-header-full-main-content>ul>li>a,#uofg-header-full-main-content>a,#uofg-header-full-main-content>uofg-menu>[slot=button]{display:flex;align-items:center;justify-content:center;height:100%;font-size:2.2rem;border-bottom:7px solid transparent;padding:7px 1.5rem 0;transition-property:color, border-color;transition-duration:0.2s;transition-timing-function:ease-in-out}#uofg-header-full-main-content>ul>li>a>svg,#uofg-header-full-main-content>a>svg,#uofg-header-full-main-content>uofg-menu>[slot=button]>svg{transition-property:color;transition-duration:0.2s;transition-timing-function:ease-in-out}#uofg-header-full-main-content>ul>li>a:hover,#uofg-header-full-main-content>ul>li>a:focus-visible,#uofg-header-full-main-content>a:hover,#uofg-header-full-main-content>a:focus-visible,#uofg-header-full-main-content>uofg-menu>[slot=button]:hover,#uofg-header-full-main-content>uofg-menu>[slot=button]:focus-visible{color:#ffc72a;border-color:#ffc72a}#uofg-header-full-main-content>ul>li>a:hover>svg,#uofg-header-full-main-content>ul>li>a:focus-visible>svg,#uofg-header-full-main-content>a:hover>svg,#uofg-header-full-main-content>a:focus-visible>svg,#uofg-header-full-main-content>uofg-menu>[slot=button]:hover>svg,#uofg-header-full-main-content>uofg-menu>[slot=button]:focus-visible>svg{color:white}#uofg-header-full-main-content>uofg-menu>[slot=button]{color:#ffc72a}#uofg-header-full-main-content>uofg-menu>[slot=content]{color:black;background-color:white;padding:2rem;width:35rem}#uofg-header-full-main-content>uofg-menu>[slot=content]>span{display:block;font-size:2.4rem;font-weight:bold;padding:1rem 0}#uofg-header-full-main-content>a{color:#ffc72a}#uofg-header-reduced-main-content{font-size:2rem}#uofg-header-reduced-main-content>uofg-menu>[slot=button],#uofg-header-reduced-main-content>a{justify-content:center;padding:0 1.5rem;font-size:2rem;border-left:1px solid rgba(255, 255, 255, 0.15)}#uofg-header-reduced-main-content>uofg-menu>[slot=button]:hover,#uofg-header-reduced-main-content>uofg-menu>[slot=button]:focus-visible,#uofg-header-reduced-main-content>uofg-menu>[slot=button][aria-expanded=true],#uofg-header-reduced-main-content>a:hover,#uofg-header-reduced-main-content>a:focus-visible,#uofg-header-reduced-main-content>a[aria-expanded=true]{background-color:white;color:black}#uofg-header-reduced-main-content>uofg-menu{position:static;height:100%}#uofg-header-reduced-main-content>uofg-menu>[slot=content]{background-color:white;color:black;width:100%;padding:1rem 2rem 2rem}#uofg-header-reduced-main-content>uofg-menu>[slot=content] a{padding:1rem}#uofg-header-reduced-main-content>uofg-menu>[slot=content]>span{display:block;font-size:2.4rem;font-weight:bold;padding:1rem 0}#uofg-header-main-menu>[slot=content]{overflow-y:auto;max-height:calc(100vh - 5rem)}#uofg-header-main-menu uofg-menu{position:relative}#uofg-header-main-menu uofg-menu>[slot=button]{display:flex;padding:1rem;height:auto;width:100%;color:inherit;border-bottom:1px solid rgba(0, 0, 0, 0.1)}#uofg-header-main-menu uofg-menu>[slot=button]>svg{margin-left:auto}#uofg-header-main-menu uofg-menu>[slot=button]:hover,#uofg-header-main-menu uofg-menu>[slot=button]:focus-visible,#uofg-header-main-menu uofg-menu>[slot=button][aria-expanded=true]{background-color:rgba(0, 0, 0, 0.1)}#uofg-header-main-menu uofg-menu>[slot=button][aria-expanded=true]>svg{transform:rotate(180deg)}#uofg-header-main-menu uofg-menu>[slot=content]{position:relative;box-shadow:none;padding:0}#uofg-header-main-menu uofg-menu>[slot=content]>li>a{padding:1rem;border-bottom:1px solid rgba(0, 0, 0, 0.1);transition-property:color, background-color;transition-duration:0.2s;transition-timing-function:ease-in-out}#uofg-header-main-menu uofg-menu>[slot=content]>li>a:hover,#uofg-header-main-menu uofg-menu>[slot=content]>li>a:focus-visible{background-color:rgba(0, 0, 0, 0.1)}#uofg-header-main-menu uofg-menu.uofg-header-hello-you-menu>[slot=button]{background-color:#ffc72a;color:black;font-weight:bold}#uofg-header-main-menu uofg-menu.uofg-header-hello-you-menu>[slot=content]{background-color:rgba(0, 0, 0, 0.1);color:black}#uofg-header-main-menu ul>li>a{padding:1rem;width:100%;color:inherit;border-bottom:1px solid rgba(0, 0, 0, 0.1);transition-property:color, background-color;transition-duration:0.2s;transition-timing-function:ease-in-out}#uofg-header-main-menu ul>li>a:hover,#uofg-header-main-menu ul>li>a:focus-visible,#uofg-header-main-menu ul>li>a[aria-expanded=true]{background-color:rgba(0, 0, 0, 0.1)}#uofg-header-sub-content-container{height:4rem;background-color:#dddddd;color:black;z-index:1;font-size:2rem;white-space:nowrap;justify-content:flex-start}#uofg-header-sub-content-container #uofg-header-page-title{display:flex;align-items:center;margin-right:auto;padding:0 1rem;height:100%;font-weight:bold}#uofg-header-sub-content-container uofg-menu{position:relative;height:100%}#uofg-header-sub-content-container uofg-menu>[slot=button]{color:inherit}#uofg-header-sub-content-container uofg-menu>[slot=button]:hover,#uofg-header-sub-content-container uofg-menu>[slot=button]:focus-visible,#uofg-header-sub-content-container uofg-menu>[slot=button][aria-expanded=true]{background-color:#ffc72a;color:black}#uofg-header-sub-content-container uofg-menu>[slot=content]{position:absolute;background-color:#dddddd;color:black;white-space:normal}#uofg-header-sub-content-container uofg-menu>[slot=content]>li:not(:last-child)>a{border-bottom:1px solid rgba(0, 0, 0, 0.1)}#uofg-header-sub-content-container uofg-menu>[slot=content]>li>a{padding:0.75rem;justify-content:flex-start}#uofg-header-sub-content-container a{display:flex;align-items:center;justify-content:center;height:100%;transition-property:color, background-color;transition-duration:0.2s;transition-timing-function:ease-in-out}#uofg-header-sub-content-container a:hover,#uofg-header-sub-content-container a:focus-visible{background-color:#ffc72a;color:black}.uofg-header-sub-content{display:flex;margin-left:auto}#uofg-header-full-sub-content,#uofg-header-reduced-sub-content{height:100%}#uofg-header-full-sub-content a,#uofg-header-full-sub-content uofg-menu>[slot=button],#uofg-header-reduced-sub-content a,#uofg-header-reduced-sub-content uofg-menu>[slot=button]{padding:0 1.25rem}#uofg-header-full-sub-content{height:100%}#uofg-header-full-sub-content>ul{display:flex;align-items:center}#uofg-header-full-sub-content uofg-menu>[slot=button][aria-expanded=true]>svg{transform:rotate(180deg)}#uofg-header-full-sub-content .uofg-header-page-specific{display:flex;height:100%;align-items:center;margin-left:auto}#uofg-header-reduced-sub-content>uofg-menu{position:static;margin-left:auto}#uofg-header-reduced-sub-content>uofg-menu.overflowed{position:relative}#uofg-header-reduced-sub-content>uofg-menu.overflowed>[slot=content]{width:40rem}#uofg-header-reduced-sub-content>uofg-menu>[slot=button]{font-size:2rem;padding:0 1.5rem;text-align:left}#uofg-header-reduced-sub-content>uofg-menu>[slot=content]{background-color:white;color:black;padding:2rem;overflow-y:auto;max-height:calc(\n 100vh - 1rem\n );width:100%;white-space:normal}#uofg-header-reduced-sub-content>uofg-menu>[slot=content]>span{display:block;font-size:2.4rem;font-weight:bold;padding:1rem 0}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] a{height:auto;padding:1rem;width:100%;align-items:flex-start;justify-content:flex-start;border-bottom:1px solid rgba(0, 0, 0, 0.1)}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] a:hover,#uofg-header-reduced-sub-content>uofg-menu>[slot=content] a:focus-visible{background-color:rgba(0, 0, 0, 0.1);color:black}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu{height:auto}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=button]{width:100%;padding:1rem;border-bottom:1px solid rgba(0, 0, 0, 0.1);text-align:left}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=button]>svg{margin-left:auto}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=button]:hover,#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=button]:focus-visible,#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=button][aria-expanded=true]{background-color:rgba(0, 0, 0, 0.2);color:black}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=button][aria-expanded=true]>svg{transform:rotate(180deg)}#uofg-header-reduced-sub-content>uofg-menu>[slot=content] uofg-menu>[slot=content]{position:static;background-color:rgba(0, 0, 0, 0.1);box-shadow:none}@media screen and (max-width: 1320px){#uofg-header-decorative-img{position:static}}@media screen and (min-width: 1320px) and (max-width: 1405px){#uofg-header-logo{position:absolute;left:0;margin-left:8.5rem}}";
174
+ const uofgHeaderCss = "*{box-sizing:border-box}a{text-decoration:none;color:inherit}button{border:none;background:none;cursor:pointer;font-size:inherit;font-family:inherit;color:inherit;line-height:inherit;word-spacing:inherit;letter-spacing:inherit}ul{list-style:none;padding:0;margin:0}uofg-menu{--uofg-menu-animation-type:slide;--uofg-menu-animation-duration:0.2s;--uofg-menu-animation-easing:ease-in-out}@defaults border-spacing{--tw-border-spacing-x:0;--tw-border-spacing-y:0}@defaults transform{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1}@defaults touch-action{}@defaults scroll-snap-type{--tw-scroll-snap-strictness:proximity}@defaults gradient-color-stops{}@defaults font-variant-numeric{}@defaults box-shadow{--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}@defaults ring-width{--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgb(59 130 246 / 0.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}@defaults filter{}@defaults backdrop-filter{}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.tw-absolute{position:absolute!important}.tw-relative{position:relative!important}.tw-left-0{left:0!important}.tw-left-\\[max\\(calc\\(\\(100\\%-1320px\\)\\/2\\)\\,7\\.5rem\\)\\]{left:max(calc(50% - 660px),7.5rem)!important}.tw-right-0{right:0!important}.tw-top-full{top:100%!important}.tw-z-50{z-index:50!important}.tw-z-\\[1000\\]{z-index:1000!important}.tw-my-4{margin-bottom:1rem!important;margin-top:1rem!important}.tw-mr-auto{margin-right:auto!important}.tw-block{display:block!important}.tw-flex{display:flex!important}.tw-contents{display:contents!important}.tw-aspect-square{aspect-ratio:1/1!important}.tw-h-16{height:4rem!important}.tw-h-\\[10rem\\]{height:10rem!important}.tw-h-\\[5rem\\]{height:5rem!important}.tw-h-auto{height:auto!important}.tw-h-full{height:100%!important}.tw-w-\\[7\\.5rem\\]{width:7.5rem!important}.tw-w-full{width:100%!important}.tw-min-w-\\[20rem\\]{min-width:20rem!important}.tw-flex-col{flex-direction:column!important}.tw-items-center{align-items:center!important}.tw-justify-end{justify-content:flex-end!important}.tw-justify-center{justify-content:center!important}.tw-justify-between{justify-content:space-between!important}.tw-gap-2{gap:.5rem!important}.tw-border-0{border-width:0!important}.tw-border-b{border-bottom-width:1px!important}.tw-border-b-8{border-bottom-width:8px!important}.tw-border-l{border-left-width:1px!important}.tw-border-solid{border-style:solid!important}.tw-border-transparent{border-color:transparent!important}.tw-border-uofg-grey-300{--tw-border-opacity:1!important;border-color:rgb(209 209 209/var(--tw-border-opacity))!important}.tw-border-uofg-grey-400{--tw-border-opacity:1!important;border-color:rgb(180 180 180/var(--tw-border-opacity))!important}.tw-border-uofg-grey-500{--tw-border-opacity:1!important;border-color:rgb(154 154 154/var(--tw-border-opacity))!important}.tw-border-uofg-grey-950{--tw-border-opacity:1!important;border-color:rgb(40 40 40/var(--tw-border-opacity))!important}.tw-bg-black{--tw-bg-opacity:1!important;background-color:rgb(0 0 0/var(--tw-bg-opacity))!important}.tw-bg-uofg-grey{--tw-bg-opacity:1!important;background-color:rgb(221 221 221/var(--tw-bg-opacity))!important}.tw-bg-uofg-yellow{--tw-bg-opacity:1!important;background-color:rgb(255 199 42/var(--tw-bg-opacity))!important}.tw-bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.tw-p-4{padding:1rem!important}.tw-p-5{padding:1.25rem!important}.tw-px-4{padding-left:1rem!important;padding-right:1rem!important}.tw-px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.tw-px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.tw-px-\\[calc\\(\\(100\\%-1320px\\)\\/2\\)\\]{padding-left:calc(50% - 660px)!important;padding-right:calc(50% - 660px)!important}.tw-pb-6{padding-bottom:1.5rem!important}.tw-pt-8{padding-top:2rem!important}.tw-font-condensed{font-family:Roboto Condensed,Arial,sans-serif!important}.tw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.tw-text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.tw-text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.tw-font-bold{font-weight:700!important}.tw-text-black{--tw-text-opacity:1!important;color:rgb(0 0 0/var(--tw-text-opacity))!important}.tw-text-uofg-yellow{--tw-text-opacity:1!important;color:rgb(255 199 42/var(--tw-text-opacity))!important}.tw-text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.tw-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.tw-transition-colors{transition-duration:.15s!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.tw-transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.hover\\:tw-border-uofg-yellow:hover{--tw-border-opacity:1!important;border-color:rgb(255 199 42/var(--tw-border-opacity))!important}.hover\\:tw-bg-uofg-grey:hover{--tw-bg-opacity:1!important;background-color:rgb(221 221 221/var(--tw-bg-opacity))!important}.hover\\:tw-bg-uofg-yellow:hover{--tw-bg-opacity:1!important;background-color:rgb(255 199 42/var(--tw-bg-opacity))!important}.hover\\:tw-text-uofg-yellow:hover{--tw-text-opacity:1!important;color:rgb(255 199 42/var(--tw-text-opacity))!important}.hover\\:tw-text-white:hover{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.aria-expanded\\:tw-bg-uofg-grey[aria-expanded=true]{--tw-bg-opacity:1!important;background-color:rgb(221 221 221/var(--tw-bg-opacity))!important}.aria-expanded\\:tw-bg-uofg-yellow[aria-expanded=true]{--tw-bg-opacity:1!important;background-color:rgb(255 199 42/var(--tw-bg-opacity))!important}.aria-expanded\\:tw-bg-white[aria-expanded=true]{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.aria-expanded\\:tw-text-black[aria-expanded=true]{--tw-text-opacity:1!important;color:rgb(0 0 0/var(--tw-text-opacity))!important}.hocus\\:tw-opacity-75:focus,.hocus\\:tw-opacity-75:hover{opacity:.75!important}@media (min-width:1024px){.lg\\:tw-relative{position:relative!important}.lg\\:tw-h-16{height:4rem!important}.lg\\:tw-w-\\[30rem\\]{width:30rem!important}.lg\\:tw-border-l-0{border-left-width:0!important}}@media (min-width:1320px){.min-\\[1320px\\]\\:tw-absolute{position:absolute!important}}.\\[\\&\\>a\\]\\:last\\:tw-pb-4:last-child>a{padding-bottom:1rem!important}.\\[\\&\\>li\\]\\:tw-contents>li{display:contents!important}.\\[\\&\\>svg\\]\\:tw-h-\\[1em\\]>svg{height:1em!important}.\\[\\&\\>svg\\]\\:tw-h-full>svg{height:100%!important}.\\[\\&\\>svg\\]\\:tw-fill-current>svg{fill:currentColor!important}.\\[\\&\\>svg\\]\\:tw-transition-transform>svg{transition-duration:.15s!important;transition-property:transform!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.\\[\\&\\>svg\\]\\:aria-expanded\\:tw-rotate-180[aria-expanded=true]>svg{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.\\[\\&\\>uofg-menu\\]\\:last\\:tw-pb-6:last-child>uofg-menu{padding-bottom:1.5rem!important}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}";
175
+ const UofgHeaderStyle0 = uofgHeaderCss;
166
176
 
167
- const TopLinks = () => (h("ul", null, h("li", null, h("a", { href: "https://uoguelph.ca/apply/" }, "APPLY")), h("li", null, h("a", { href: "https://bbis.alumni.uoguelph.ca/BBIS_Cannon/give/uofg" }, "GIVE")), h("li", null, h("a", { href: "https://news.uoguelph.ca/" }, "NEWS"))));
168
- const HelloMenu = props => (h("uofg-menu", { class: "uofg-header-hello-you-menu", "auto-collapse": props.autoCollapse }, h("button", { slot: "button" }, h("span", null, "HELLO!"), h(FontAwesomeIcon, { icon: faCaretDown.faCaretDown })), h("ul", { slot: "content" }, h("li", null, h("a", { href: "https://uoguelph.ca/future-students" }, "Future Students")), h("li", null, h("a", { href: "https://www.uoguelph.ca/students" }, "Current Students")), h("li", null, h("a", { href: "https://alumni.uoguelph.ca/" }, "Alumni & Donors")), h("li", null, h("a", { href: "https://www.uoguelph.ca/faculty" }, "Faculty & Staff")), h("li", null, h("a", { href: "https://cecs.uoguelph.ca/employers-institutions" }, "Employers & Partners")))));
169
- const MainLinks = () => (h("ul", { class: "uofg-header-global-links" }, h("li", null, h("a", { href: "https://uoguelph.ca/about" }, "About")), h("li", null, h("a", { href: "https://www.uoguelph.ca/explore-all-programs/" }, "Academics")), h("li", null, h("a", { href: "https://uoguelph.ca/admissions" }, "Admission")), h("li", null, h("a", { href: "https://uoguelph.ca/research" }, "Research")), h("li", null, h("a", { href: "https://www.uoguelph.ca/studentexperience/" }, "Student Life"))));
170
- const AccountLink = () => (h("a", { href: "https://intranet.uoguelph.ca", "aria-label": "University of Guelph Intranet" }, h(FontAwesomeIcon, { icon: faRightToBracket.faRightToBracket })));
171
- const SearchLink = () => (h("a", { href: "https://uoguelph.ca/search", "aria-label": "Search University of Guelph" }, h(FontAwesomeIcon, { icon: faSearch.faSearch })));
172
- const PageSpecific = props => {
173
- var _a;
174
- return (h("ul", { class: "uofg-header-page-specific" }, (_a = props.content) === null || _a === void 0 ? void 0 : _a.map(item => {
175
- if (!item) {
176
- return null;
177
- }
178
- if ('text' in item) {
179
- return (h("li", null, h("a", Object.assign({ href: item.href }, item.attributes), item.text)));
180
- }
181
- return (h("li", null, h("uofg-menu", { autoCollapse: props.autoCollapse }, h("button", { slot: "button" }, h("span", null, item.title), h(FontAwesomeIcon, { icon: faCaretDown.faCaretDown })), h("ul", { slot: "content" }, item.links.map(link => (h("li", null, h("a", Object.assign({ href: link.href }, link.attributes), link.text))))))));
182
- }).filter(Boolean)));
183
- };
184
177
  const TRANSITION_BREAKPOINT = 1024;
185
178
  const MAX_CONTENT_WIDTH = 1320;
179
+ const MENU_CHAR_LIMIT = 35;
180
+ const topLinks = [
181
+ {
182
+ text: 'GIVE',
183
+ href: 'https://bbis.alumni.uoguelph.ca/BBIS_Cannon/give/uofg',
184
+ },
185
+ {
186
+ text: 'NEWS',
187
+ href: 'https://news.uoguelph.ca/',
188
+ },
189
+ {
190
+ text: 'APPLY',
191
+ href: 'https://uoguelph.ca/apply/',
192
+ highlight: true,
193
+ },
194
+ ];
195
+ const mainLinks = [
196
+ {
197
+ text: 'About',
198
+ href: 'https://uoguelph.ca/about',
199
+ },
200
+ {
201
+ text: 'Academics',
202
+ href: 'https://www.uoguelph.ca/explore-all-programs/',
203
+ },
204
+ {
205
+ text: 'Admission',
206
+ href: 'https://uoguelph.ca/admissions',
207
+ },
208
+ {
209
+ text: 'Research',
210
+ href: 'https://uoguelph.ca/research',
211
+ },
212
+ {
213
+ text: 'Student Life',
214
+ href: 'https://www.uoguelph.ca/studentexperience/',
215
+ },
216
+ ];
217
+ const iconButtons = [
218
+ {
219
+ text: 'University of Guelph Intranet',
220
+ href: 'https://intranet.uoguelph.ca/',
221
+ icon: faRightToBracket.faRightToBracket,
222
+ },
223
+ {
224
+ text: 'Search the University of Guelph',
225
+ href: 'https://uoguelph.ca/search',
226
+ icon: faSearch.faSearch,
227
+ },
228
+ ];
229
+ const resources = [
230
+ {
231
+ text: 'Future Students',
232
+ href: 'https://uoguelph.ca/future-students',
233
+ },
234
+ {
235
+ text: 'Current Students',
236
+ href: 'https://www.uoguelph.ca/students',
237
+ },
238
+ {
239
+ text: 'Alumni & Donors',
240
+ href: 'https://alumni.uoguelph.ca/',
241
+ },
242
+ {
243
+ text: 'Faculty & Staff',
244
+ href: 'https://www.uoguelph.ca/faculty',
245
+ },
246
+ {
247
+ text: 'Employers & Partners',
248
+ href: 'https://cecs.uoguelph.ca/employers-institutions',
249
+ },
250
+ ];
186
251
  const UofgHeader$1 = /*@__PURE__*/ proxyCustomElement(class UofgHeader extends HTMLElement {
187
- constructor() {
188
- super();
189
- this.__registerHost();
190
- this.__attachShadow();
191
- this.subContainerOverflowWidth = NaN;
192
- this.needsOverflowWidthUpdate = false;
193
- this.pageTitle = '';
194
- this.pageUrl = '';
195
- this.isFullSize = false;
196
- this.pageSpecificContent = undefined;
197
- this.isSubContainerOverflowing = false;
198
- }
199
- connectedCallback() {
200
- var _a;
201
- this.updateFullSize();
202
- this.updatePageSpecificContent();
203
- (_a = this.observer) !== null && _a !== void 0 ? _a : (this.observer = new MutationObserver(() => {
204
- this.updatePageSpecificContent();
205
- this.subContainerOverflowWidth = NaN; // Reset overflow width as it will have changed and needs to be recalculated
206
- this.needsOverflowWidthUpdate = true;
207
- }));
208
- this.observer.observe(this.el, { childList: true, subtree: true });
209
- }
210
- componentDidLoad() {
211
- this.updateSubContainerOverflow();
212
- }
213
- updateFullSize() {
214
- this.isFullSize = window.innerWidth >= TRANSITION_BREAKPOINT;
215
- this.updateSubContainerOverflow();
216
- }
217
- updateSubContainerOverflow() {
218
- if (this.isFullSize && this.subContainer) {
219
- const { clientWidth, scrollWidth } = this.subContainer;
220
- if (scrollWidth > clientWidth) {
221
- this.subContainerOverflowWidth = scrollWidth;
222
- }
223
- this.isSubContainerOverflowing = this.subContainerOverflowWidth > Math.min(clientWidth, MAX_CONTENT_WIDTH);
252
+ constructor() {
253
+ super();
254
+ this.__registerHost();
255
+ this.__attachShadow();
256
+ this.subContainerOverflowWidth = NaN;
257
+ this.needsOverflowWidthUpdate = false;
258
+ this.pageTitle = '';
259
+ this.pageUrl = '';
260
+ this.isFullSize = false;
261
+ this.pageSpecificContent = undefined;
262
+ this.isSubContainerOverflowing = false;
224
263
  }
225
- }
226
- componentDidRender() {
227
- if (this.needsOverflowWidthUpdate) {
228
- window.requestAnimationFrame(() => this.updateSubContainerOverflow());
229
- this.needsOverflowWidthUpdate = false;
264
+ connectedCallback() {
265
+ var _a;
266
+ this.updateFullSize();
267
+ this.updatePageSpecificContent();
268
+ (_a = this.observer) !== null && _a !== void 0 ? _a : (this.observer = new MutationObserver(() => {
269
+ this.updatePageSpecificContent();
270
+ this.subContainerOverflowWidth = NaN; // Reset overflow width as it will have changed and needs to be recalculated
271
+ this.needsOverflowWidthUpdate = true;
272
+ }));
273
+ this.observer.observe(this.el, { childList: true, subtree: true });
230
274
  }
231
- }
232
- updatePageSpecificContent() {
233
- var _a;
234
- const aToPageSpecificLink = (a) => {
235
- const attributes = {};
236
- a.getAttributeNames()
237
- .filter(name => name !== 'href')
238
- .forEach(name => (attributes[name] = a.getAttribute(name)));
239
- return {
240
- href: a.getAttribute('href'),
241
- text: a.textContent,
242
- attributes,
243
- };
244
- };
245
- this.pageSpecificContent = Array.from((_a = this.el) === null || _a === void 0 ? void 0 : _a.children)
246
- .filter(child => child.tagName === 'A' || child.tagName === 'UL')
247
- .map(child => {
248
- switch (child.tagName) {
249
- case 'A':
250
- return aToPageSpecificLink(child);
251
- case 'UL':
252
- return {
253
- title: child.getAttribute('data-title'),
254
- links: Array.from(child.querySelectorAll('a')).map(aToPageSpecificLink),
255
- };
256
- }
257
- });
258
- }
259
- render() {
260
- return (h("header", { id: "uofg-header" }, this.isFullSize && (h("div", { id: "uofg-header-top-content-container" }, h(TopLinks, null), h(HelloMenu, { autoCollapse: true }))), h("nav", { id: "uofg-header-main-content-container", class: { 'full-height': this.isFullSize }, "aria-label": "Main" }, h("div", { id: "uofg-header-logo-container" }, this.isFullSize && h("div", { id: "uofg-header-decorative-img", innerHTML: Decoration }), h("a", { id: "uofg-header-logo", href: "https://www.uoguelph.ca", innerHTML: this.isFullSize ? FullSizeLogo : ReducedSizeLogo, "aria-label": "University of Guelph Home Page" })), this.isFullSize ? (h("div", { id: "uofg-header-full-main-content", class: "uofg-header-main-content" }, h(MainLinks, null), h(AccountLink, null), h(SearchLink, null))) : (h("div", { id: "uofg-header-reduced-main-content", class: "uofg-header-main-content" }, h(AccountLink, null), h(SearchLink, null), h("uofg-menu", { id: "uofg-header-main-menu", "auto-collapse": true }, h("button", { slot: "button", "aria-label": "Main Menu" }, h(FontAwesomeIcon, { icon: faBars.faBars })), h("div", { slot: "content" }, h("span", null, "University of Guelph"), h(MainLinks, null), h(HelloMenu, { autoCollapse: false })))))), this.pageSpecificContent.length > 0 && (h("nav", { id: "uofg-header-sub-content-container", ref: node => (this.subContainer = node), "aria-label": "Department/Topic" }, this.pageTitle &&
261
- (this.pageUrl ? (h("a", { id: "uofg-header-page-title", href: this.pageUrl }, this.pageTitle)) : (h("span", { id: "uofg-header-page-title" }, this.pageTitle))), this.isFullSize && !this.isSubContainerOverflowing ? (h("div", { id: "uofg-header-full-sub-content", class: "uofg-header-sub-content" }, h(PageSpecific, { content: this.pageSpecificContent, autoCollapse: true }))) : (h("div", { id: "uofg-header-reduced-sub-content", class: "uofg-header-sub-content" }, h("uofg-menu", { id: "uofg-header-sub-menu", "auto-collapse": true, class: { overflowed: this.isSubContainerOverflowing && this.isFullSize } }, h("button", { slot: "button", "aria-label": this.pageTitle + ' Menu' }, h(FontAwesomeIcon, { icon: faBars.faBars })), h("div", { slot: "content" }, h(PageSpecific, { content: this.pageSpecificContent })))))))));
262
- }
263
- get el() { return this; }
264
- static get style() { return uofgHeaderCss; }
275
+ componentDidLoad() {
276
+ this.updateSubContainerOverflow();
277
+ }
278
+ updateFullSize() {
279
+ this.isFullSize = window.innerWidth >= TRANSITION_BREAKPOINT;
280
+ this.updateSubContainerOverflow();
281
+ }
282
+ updateSubContainerOverflow() {
283
+ if (this.isFullSize && this.subContainer) {
284
+ const { clientWidth, scrollWidth } = this.subContainer;
285
+ if (scrollWidth > clientWidth) {
286
+ this.subContainerOverflowWidth = scrollWidth;
287
+ }
288
+ this.isSubContainerOverflowing = this.subContainerOverflowWidth > Math.min(clientWidth, MAX_CONTENT_WIDTH);
289
+ }
290
+ }
291
+ componentDidRender() {
292
+ if (this.needsOverflowWidthUpdate) {
293
+ window.requestAnimationFrame(() => this.updateSubContainerOverflow());
294
+ this.needsOverflowWidthUpdate = false;
295
+ }
296
+ }
297
+ updatePageSpecificContent() {
298
+ var _a;
299
+ const aToPageSpecificLink = (a) => {
300
+ const attributes = {};
301
+ a.getAttributeNames()
302
+ .filter(name => name !== 'href')
303
+ .forEach(name => (attributes[name] = a.getAttribute(name)));
304
+ return {
305
+ href: a.getAttribute('href'),
306
+ text: a.textContent,
307
+ attributes,
308
+ };
309
+ };
310
+ this.pageSpecificContent = Array.from((_a = this.el) === null || _a === void 0 ? void 0 : _a.children)
311
+ .filter(child => child.tagName === 'A' || child.tagName === 'UL')
312
+ .map(child => {
313
+ switch (child.tagName) {
314
+ case 'A':
315
+ return aToPageSpecificLink(child);
316
+ case 'UL':
317
+ const value = {
318
+ title: child.getAttribute('data-title'),
319
+ links: Array.from(child.querySelectorAll('a')).map(aToPageSpecificLink),
320
+ };
321
+ value.wrapContent = value.links.reduce((shouldWrap, link) => {
322
+ if (link.text.length > MENU_CHAR_LIMIT) {
323
+ shouldWrap = true;
324
+ }
325
+ return shouldWrap;
326
+ }, false);
327
+ return value;
328
+ }
329
+ })
330
+ .filter(val => Boolean(val));
331
+ }
332
+ render() {
333
+ var _a, _b;
334
+ return (h("header", { key: 'bb570df694a4849d2e8b26e44eaff9ac16d59666', class: "tw-relative tw-z-[1000] tw-w-full tw-font-condensed tw-text-2xl tw-text-black" }, this.isFullSize && (h("div", { class: "tw-flex tw-h-16 tw-justify-end tw-bg-white tw-px-[calc((100%-1320px)/2)] tw-text-3xl" }, h("uofg-menu", { class: "tw-relative tw-block tw-h-full", "auto-collapse": true }, h("button", { class: "tw-flex tw-h-full tw-items-center tw-justify-center tw-gap-2 tw-transition-colors hover:tw-bg-uofg-grey aria-expanded:tw-bg-uofg-grey [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current [&>svg]:tw-transition-transform [&>svg]:aria-expanded:tw-rotate-180", slot: "button" }, h("span", null, "Resources"), h(FontAwesomeIcon, { icon: faCaretDown.faCaretDown })), h("ul", { slot: "content", class: "tw-absolute tw-right-0 tw-top-full tw-z-50 tw-flex tw-min-w-[20rem] tw-flex-col tw-bg-uofg-grey [&>li]:tw-contents" }, resources.map(item => (h("li", null, h("a", { class: "tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-500 tw-p-4 tw-transition-colors hover:tw-bg-uofg-yellow", href: item.href }, item.text)))))), h("ul", { class: "tw-contents [&>li]:tw-contents" }, topLinks.map(item => (h("li", null, h("a", { href: item.href, class: `tw-flex tw-items-center tw-justify-center tw-p-4 tw-transition-colors hover:tw-bg-uofg-grey ${item.highlight ? 'tw-bg-uofg-yellow' : ''}` }, item.text))))))), h("nav", { key: '66342f95b44133c496db437970e73d76617dd46b', class: {
335
+ 'tw-h-[10rem]': this.isFullSize,
336
+ 'tw-h-[5rem]': !this.isFullSize,
337
+ 'tw-relative tw-flex tw-justify-between tw-bg-black tw-px-[calc((100%-1320px)/2)] tw-text-3xl tw-text-white': true,
338
+ }, "aria-label": "Main" }, h("div", { key: '1c8c8524d7a244f2388eba2ba128d6d4a966f3f4', class: "tw-flex" }, this.isFullSize && (h("div", { class: "tw-left-0 tw-h-full tw-w-[7.5rem] min-[1320px]:tw-absolute [&>svg]:tw-h-full", innerHTML: Decoration })), h("a", { key: '1a1c9c0ebd073fee30522c64260dcd0cf00bb37a', class: "tw-left-[max(calc((100%-1320px)/2),7.5rem)] tw-h-full tw-transition-opacity hocus:tw-opacity-75 min-[1320px]:tw-absolute [&>svg]:tw-h-full", href: "https://www.uoguelph.ca", innerHTML: this.isFullSize ? FullSizeLogo : ReducedSizeLogo, "aria-label": "University of Guelph Home Page" })), this.isFullSize ? (h("ul", { class: "tw-flex tw-items-center tw-justify-center tw-text-4xl [&>li]:tw-contents" }, mainLinks.map(item => (h("li", null, h("a", { href: item.href, class: "tw-flex tw-h-full tw-items-center tw-justify-center tw-border-0 tw-border-b-8 tw-border-solid tw-border-transparent tw-p-4 tw-pt-8 tw-transition-colors hover:tw-border-uofg-yellow hover:tw-text-uofg-yellow" }, item.text)))), iconButtons.map(item => (h("li", null, h("a", { class: "tw-flex tw-h-full tw-items-center tw-justify-center tw-border-0 tw-border-b-8 tw-border-solid tw-border-transparent tw-p-4 tw-pt-8 tw-text-uofg-yellow tw-transition-colors hover:tw-border-uofg-yellow hover:tw-text-white [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current", href: item.href, "aria-label": item.text }, h(FontAwesomeIcon, { icon: item.icon }))))))) : (h("div", { class: "tw-flex tw-h-full" }, iconButtons.map(item => (h("a", { class: "tw-flex tw-aspect-square tw-h-full tw-items-center tw-justify-center tw-border-0 tw-border-l tw-border-solid tw-border-uofg-grey-950 tw-px-5 tw-transition-colors [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current", href: item.href, "aria-label": item.text }, h(FontAwesomeIcon, { icon: item.icon })))), h("uofg-menu", { class: "tw-block tw-h-full", "auto-collapse": true }, h("button", { slot: "button", "aria-label": "Main Menu", class: "tw-flex tw-aspect-square tw-h-full tw-items-center tw-justify-center tw-border-0 tw-border-l tw-border-solid tw-border-uofg-grey-950 tw-px-5 tw-transition-colors aria-expanded:tw-bg-white aria-expanded:tw-text-black [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current" }, h(FontAwesomeIcon, { icon: faBars.faBars })), h("div", { slot: "content", class: "tw-absolute tw-left-0 tw-top-full tw-z-50 tw-flex tw-w-full tw-flex-col tw-bg-white tw-px-4 tw-text-black tw-shadow-md" }, h("span", { class: "tw-my-4 tw-text-4xl tw-font-bold" }, "University of Guelph"), h("ul", { class: "tw-flex tw-w-full tw-flex-col [&>li]:tw-contents" }, mainLinks.concat(topLinks).map(item => (h("li", null, h("a", { href: item.href, class: `tw-w-full tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-400 tw-p-5 tw-transition-colors hover:tw-bg-uofg-grey ${(item === null || item === void 0 ? void 0 : item.highlight) ? 'tw-bg-uofg-yellow' : ''}` }, item.text))))), h("uofg-menu", { class: "tw-relative tw-block tw-h-full tw-pb-6 tw-text-black", "auto-collapse": false }, h("button", { class: "tw-flex tw-h-auto tw-w-full tw-items-center tw-justify-between tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-400 tw-p-5 tw-transition-colors hover:tw-bg-uofg-grey aria-expanded:tw-bg-uofg-grey [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current [&>svg]:tw-transition-transform [&>svg]:aria-expanded:tw-rotate-180", slot: "button" }, h("span", null, "Resources"), h(FontAwesomeIcon, { icon: faCaretDown.faCaretDown })), h("ul", { slot: "content", class: "tw-flex tw-w-full tw-flex-col [&>li]:tw-contents" }, resources.map(item => (h("li", null, h("a", { class: "tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-400 tw-p-5 tw-transition-colors hover:tw-bg-uofg-grey", href: item.href }, item.text))))))))))), this.pageSpecificContent.length > 0 && (h("nav", { ref: node => (this.subContainer = node), "aria-label": "Department/Topic", class: "tw-align-items tw-relative tw-flex tw-h-[5rem] tw-justify-end tw-bg-uofg-grey tw-px-[calc((100%-1320px)/2)] tw-text-3xl lg:tw-h-16" }, this.pageTitle &&
339
+ (this.pageUrl != '' ? (h("a", { class: "tw-mr-auto tw-flex tw-h-full tw-items-center tw-justify-center tw-px-4 tw-font-bold tw-transition-colors hover:tw-bg-uofg-yellow", href: this.pageUrl }, this.pageTitle)) : (h("span", { class: "tw-mr-auto tw-flex tw-h-full tw-items-center tw-justify-center tw-px-4" }, this.pageTitle))), this.isFullSize && !this.isSubContainerOverflowing ? (h("ul", { class: "tw-flex tw-items-center tw-justify-center [&>li]:tw-contents" }, (_a = this.pageSpecificContent) === null || _a === void 0 ? void 0 : _a.map(item => {
340
+ if ('text' in item) {
341
+ return (h("li", null, h("a", Object.assign({ class: "tw-flex tw-h-full tw-items-center tw-justify-center tw-gap-2 tw-px-4 tw-transition-colors hover:tw-bg-uofg-yellow", href: item.href }, item.attributes), item.text)));
342
+ }
343
+ return (h("li", null, h("uofg-menu", { class: "tw-relative tw-h-full", "auto-collapse": true }, h("button", { class: "tw-flex tw-h-full tw-items-center tw-justify-center tw-gap-2 tw-px-4 tw-transition-colors hover:tw-bg-uofg-yellow aria-expanded:tw-bg-uofg-yellow [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current", slot: "button" }, h("span", null, item === null || item === void 0 ? void 0 : item.title), h(FontAwesomeIcon, { icon: faCaretDown.faCaretDown })), h("ul", { slot: "content", class: {
344
+ 'tw-absolute tw-right-0 tw-top-full tw-z-50 tw-flex tw-min-w-[20rem] tw-flex-col tw-bg-uofg-grey [&>li]:tw-contents': true,
345
+ 'wrap-content': item.wrapContent || false,
346
+ } }, item.links.map(link => (h("li", null, h("a", Object.assign({ class: "tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-500 tw-p-4 tw-transition-colors hover:tw-bg-uofg-yellow", href: link.href }, link.attributes), link.text))))))));
347
+ }))) : (h("uofg-menu", { class: "tw-block tw-h-full lg:tw-relative", "auto-collapse": true }, h("button", { class: "tw-flex tw-aspect-square tw-h-full tw-items-center tw-justify-center tw-border-0 tw-border-l tw-border-solid tw-border-uofg-grey-300 tw-px-6 tw-transition-colors aria-expanded:tw-bg-uofg-yellow lg:tw-border-l-0 [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current", slot: "button", "aria-label": this.pageTitle + ' Menu' }, h(FontAwesomeIcon, { icon: faBars.faBars })), h("ul", { class: "tw-absolute tw-right-0 tw-top-full tw-z-50 tw-flex tw-w-full tw-flex-col tw-bg-white tw-px-4 tw-text-black tw-shadow-md lg:tw-w-[30rem] [&>li]:tw-contents", slot: "content" }, (_b = this.pageSpecificContent) === null || _b === void 0 ? void 0 : _b.map(item => {
348
+ if ('text' in item) {
349
+ return (h("li", { class: "[&>a]:last:tw-pb-4" }, h("a", { href: item.href, class: "tw-w-full tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-400 tw-p-5 tw-transition-colors hover:tw-bg-uofg-grey" }, item.text)));
350
+ }
351
+ return (h("li", { class: "[&>uofg-menu]:last:tw-pb-6" }, h("uofg-menu", { class: "tw-relative tw-block tw-h-full tw-text-black", "auto-collapse": false }, h("button", { class: "tw-flex tw-h-auto tw-w-full tw-items-center tw-justify-between tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-400 tw-p-5 tw-transition-colors hover:tw-bg-uofg-grey aria-expanded:tw-bg-uofg-grey [&>svg]:tw-h-[1em] [&>svg]:tw-fill-current [&>svg]:tw-transition-transform [&>svg]:aria-expanded:tw-rotate-180", slot: "button" }, h("span", null, item.title), h(FontAwesomeIcon, { icon: faCaretDown.faCaretDown })), h("ul", { slot: "content", class: "tw-flex tw-w-full tw-flex-col [&>li]:tw-contents" }, item.links.map(item => (h("li", null, h("a", { class: "tw-border-0 tw-border-b tw-border-solid tw-border-uofg-grey-400 tw-p-5 tw-transition-colors hover:tw-bg-uofg-grey", href: item.href }, item.text))))))));
352
+ }))))))));
353
+ }
354
+ get el() { return this; }
355
+ static get style() { return UofgHeaderStyle0; }
265
356
  }, [1, "uofg-header", {
266
- "pageTitle": [1, "page-title"],
267
- "pageUrl": [1, "page-url"],
268
- "isFullSize": [32],
269
- "pageSpecificContent": [32],
270
- "isSubContainerOverflowing": [32]
271
- }, [[9, "resize", "updateFullSize"]]]);
357
+ "pageTitle": [1, "page-title"],
358
+ "pageUrl": [1, "page-url"],
359
+ "isFullSize": [32],
360
+ "pageSpecificContent": [32],
361
+ "isSubContainerOverflowing": [32]
362
+ }, [[9, "resize", "updateFullSize"]]]);
272
363
  function defineCustomElement$1() {
273
- if (typeof customElements === "undefined") {
274
- return;
275
- }
276
- const components = ["uofg-header", "uofg-menu"];
277
- components.forEach(tagName => { switch (tagName) {
278
- case "uofg-header":
279
- if (!customElements.get(tagName)) {
280
- customElements.define(tagName, UofgHeader$1);
281
- }
282
- break;
283
- case "uofg-menu":
284
- if (!customElements.get(tagName)) {
285
- defineCustomElement$2();
286
- }
287
- break;
288
- } });
364
+ if (typeof customElements === "undefined") {
365
+ return;
366
+ }
367
+ const components = ["uofg-header", "uofg-menu"];
368
+ components.forEach(tagName => { switch (tagName) {
369
+ case "uofg-header":
370
+ if (!customElements.get(tagName)) {
371
+ customElements.define(tagName, UofgHeader$1);
372
+ }
373
+ break;
374
+ case "uofg-menu":
375
+ if (!customElements.get(tagName)) {
376
+ defineCustomElement$2();
377
+ }
378
+ break;
379
+ } });
289
380
  }
290
381
 
291
382
  const UofgHeader = UofgHeader$1;
@@ -2,8 +2,8 @@ import type { Components, JSX } from "../types/components";
2
2
 
3
3
  interface UofgMenu extends Components.UofgMenu, HTMLElement {}
4
4
  export const UofgMenu: {
5
- prototype: UofgMenu;
6
- new (): UofgMenu;
5
+ prototype: UofgMenu;
6
+ new (): UofgMenu;
7
7
  };
8
8
  /**
9
9
  * Used to define this component and all nested components recursively.