@uoguelph/web-components 1.2.0-rc.7 → 1.2.0-rc.9

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 (94) hide show
  1. package/README.md +0 -63
  2. package/dist/uofg-web-components/index-CSn7dBx6.js +981 -0
  3. package/dist/uofg-web-components/uofg-alert.esm.js +154 -0
  4. package/dist/uofg-web-components/uofg-footer.esm.js +403 -0
  5. package/dist/uofg-web-components/uofg-header.esm.js +2306 -0
  6. package/dist/uofg-web-components/uofg-modal.esm.js +329 -0
  7. package/dist/uofg-web-components/uofg-web-components.css +1 -1
  8. package/dist/uofg-web-components/uofg-web-components.esm.js +8 -1
  9. package/package.json +21 -33
  10. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  11. package/dist/cjs/index-eb919017.js +0 -1990
  12. package/dist/cjs/index.cjs.js +0 -2
  13. package/dist/cjs/loader.cjs.js +0 -15
  14. package/dist/cjs/uofg-alert.cjs.entry.js +0 -21
  15. package/dist/cjs/uofg-back-to-top_5.cjs.entry.js +0 -1400
  16. package/dist/cjs/uofg-modal.cjs.entry.js +0 -168
  17. package/dist/cjs/uofg-web-components.cjs.js +0 -25
  18. package/dist/cjs/utils-93383c5b.js +0 -65
  19. package/dist/collection/collection-manifest.json +0 -18
  20. package/dist/collection/components/uofg-alert/uofg-alert.js +0 -15
  21. package/dist/collection/components/uofg-back-to-top/uofg-back-to-top.js +0 -64
  22. package/dist/collection/components/uofg-card/uofg-card.js +0 -40
  23. package/dist/collection/components/uofg-footer/uofg-footer.js +0 -145
  24. package/dist/collection/components/uofg-header/uofg-header.js +0 -280
  25. package/dist/collection/components/uofg-menu/uofg-menu.js +0 -438
  26. package/dist/collection/components/uofg-modal/uofg-modal.js +0 -408
  27. package/dist/collection/index.js +0 -1
  28. package/dist/collection/utils/font-awesome-icon.js +0 -7
  29. package/dist/collection/utils/utils.js +0 -29
  30. package/dist/components/font-awesome-icon.js +0 -10
  31. package/dist/components/index.d.ts +0 -50
  32. package/dist/components/index.js +0 -8
  33. package/dist/components/index2.js +0 -18
  34. package/dist/components/uofg-alert.d.ts +0 -11
  35. package/dist/components/uofg-alert.js +0 -37
  36. package/dist/components/uofg-back-to-top.d.ts +0 -11
  37. package/dist/components/uofg-back-to-top.js +0 -51
  38. package/dist/components/uofg-card.d.ts +0 -11
  39. package/dist/components/uofg-card.js +0 -41
  40. package/dist/components/uofg-footer.d.ts +0 -11
  41. package/dist/components/uofg-footer.js +0 -749
  42. package/dist/components/uofg-header.d.ts +0 -11
  43. package/dist/components/uofg-header.js +0 -418
  44. package/dist/components/uofg-menu.d.ts +0 -11
  45. package/dist/components/uofg-menu.js +0 -6
  46. package/dist/components/uofg-menu2.js +0 -268
  47. package/dist/components/uofg-modal.d.ts +0 -11
  48. package/dist/components/uofg-modal.js +0 -198
  49. package/dist/components/utils.js +0 -30
  50. package/dist/esm/app-globals-0f993ce5.js +0 -3
  51. package/dist/esm/index-06ec28fa.js +0 -1960
  52. package/dist/esm/index.js +0 -1
  53. package/dist/esm/loader.js +0 -11
  54. package/dist/esm/polyfills/core-js.js +0 -11
  55. package/dist/esm/polyfills/dom.js +0 -79
  56. package/dist/esm/polyfills/es5-html-element.js +0 -1
  57. package/dist/esm/polyfills/index.js +0 -34
  58. package/dist/esm/polyfills/system.js +0 -6
  59. package/dist/esm/uofg-alert.entry.js +0 -17
  60. package/dist/esm/uofg-back-to-top_5.entry.js +0 -1392
  61. package/dist/esm/uofg-modal.entry.js +0 -164
  62. package/dist/esm/uofg-web-components.js +0 -20
  63. package/dist/esm/utils-acd1ee82.js +0 -56
  64. package/dist/index.cjs.js +0 -1
  65. package/dist/index.js +0 -1
  66. package/dist/types/components/uofg-alert/uofg-alert.d.ts +0 -5
  67. package/dist/types/components/uofg-back-to-top/uofg-back-to-top.d.ts +0 -11
  68. package/dist/types/components/uofg-card/uofg-card.d.ts +0 -9
  69. package/dist/types/components/uofg-footer/uofg-footer.d.ts +0 -8
  70. package/dist/types/components/uofg-header/uofg-header.d.ts +0 -37
  71. package/dist/types/components/uofg-menu/uofg-menu.d.ts +0 -68
  72. package/dist/types/components/uofg-modal/uofg-modal.d.ts +0 -77
  73. package/dist/types/components.d.ts +0 -303
  74. package/dist/types/index.d.ts +0 -1
  75. package/dist/types/stencil-public-runtime.d.ts +0 -1681
  76. package/dist/types/utils/font-awesome-icon.d.ts +0 -5
  77. package/dist/types/utils/utils.d.ts +0 -5
  78. package/dist/uofg-web-components/index.esm.js +0 -0
  79. package/dist/uofg-web-components/p-4a896033.js +0 -2
  80. package/dist/uofg-web-components/p-4e0da5c7.entry.js +0 -1
  81. package/dist/uofg-web-components/p-663d722e.entry.js +0 -1
  82. package/dist/uofg-web-components/p-84b2d8d2.js +0 -1
  83. package/dist/uofg-web-components/p-b0718d71.entry.js +0 -1
  84. package/dist/uofg-web-components/p-e1255160.js +0 -1
  85. package/loader/cdn.js +0 -3
  86. package/loader/index.cjs.js +0 -3
  87. package/loader/index.d.ts +0 -21
  88. package/loader/index.es2017.js +0 -3
  89. package/loader/index.js +0 -4
  90. package/loader/package.json +0 -11
  91. /package/dist/{collection/components/uofg-header/decoration.svg → uofg-web-components/decorative.svg} +0 -0
  92. /package/dist/{collection/components/uofg-footer → uofg-web-components}/improve-life.svg +0 -0
  93. /package/dist/{collection/components/uofg-header/logo-reduced.svg → uofg-web-components/logo-small.svg} +0 -0
  94. /package/dist/{collection/components/uofg-header/logo-full.svg → uofg-web-components/logo.svg} +0 -0
@@ -1,280 +0,0 @@
1
- import { h } from "@stencil/core";
2
- import Decoration from "./decoration.svg";
3
- import FullSizeLogo from "./logo-full.svg";
4
- import ReducedSizeLogo from "./logo-reduced.svg";
5
- import { FontAwesomeIcon } from "../../utils/font-awesome-icon";
6
- import { faBars } from "@fortawesome/free-solid-svg-icons/faBars";
7
- import { faSearch } from "@fortawesome/free-solid-svg-icons/faSearch";
8
- import { faCaretDown } from "@fortawesome/free-solid-svg-icons/faCaretDown";
9
- import { faUser } from "@fortawesome/free-solid-svg-icons/faUser";
10
- import { attachTailwind } from "../../utils/utils";
11
- const TRANSITION_BREAKPOINT = 1024;
12
- const MAX_CONTENT_WIDTH = 1320;
13
- const MENU_CHAR_LIMIT = 35;
14
- const topLinks = [
15
- {
16
- text: 'Give',
17
- href: 'https://bbis.alumni.uoguelph.ca/BBIS_Cannon/give/uofg',
18
- },
19
- {
20
- text: 'News',
21
- href: 'https://news.uoguelph.ca/',
22
- },
23
- {
24
- text: 'Quick Links',
25
- links: [
26
- {
27
- text: 'Future Students',
28
- href: 'https://uoguelph.ca/future-students',
29
- },
30
- {
31
- text: 'Current Students',
32
- href: 'https://www.uoguelph.ca/students',
33
- },
34
- {
35
- text: 'Alumni & Donors',
36
- href: 'https://alumni.uoguelph.ca/',
37
- },
38
- {
39
- text: 'Faculty & Staff',
40
- href: 'https://www.uoguelph.ca/faculty',
41
- },
42
- {
43
- text: 'Employers & Partners',
44
- href: 'https://cecs.uoguelph.ca/employers-institutions',
45
- },
46
- ],
47
- },
48
- {
49
- text: 'APPLY NOW',
50
- href: 'https://uoguelph.ca/apply/',
51
- highlight: true,
52
- },
53
- ];
54
- const mainLinks = [
55
- {
56
- text: 'About',
57
- href: 'https://uoguelph.ca/about',
58
- },
59
- {
60
- text: 'Academics',
61
- href: 'https://www.uoguelph.ca/explore-all-programs/',
62
- },
63
- {
64
- text: 'Admission',
65
- href: 'https://uoguelph.ca/admissions',
66
- },
67
- {
68
- text: 'Research',
69
- href: 'https://uoguelph.ca/research',
70
- },
71
- {
72
- text: 'Student Life',
73
- href: 'https://www.uoguelph.ca/studentexperience/',
74
- },
75
- ];
76
- const search = {
77
- text: 'Search the University of Guelph',
78
- href: 'https://uoguelph.ca/search',
79
- icon: faSearch,
80
- };
81
- const account = {
82
- text: 'Account Menu',
83
- links: [
84
- {
85
- text: 'Intranet',
86
- href: 'https://intranet.uoguelph.ca/',
87
- },
88
- {
89
- text: 'WebAdvisor',
90
- href: 'https://www.uoguelph.ca/webadvisor/',
91
- },
92
- {
93
- text: 'GryphMail',
94
- href: 'https://mail.uoguelph.ca/',
95
- },
96
- {
97
- text: 'CourseLink',
98
- href: 'https://courselink.uoguelph.ca/',
99
- },
100
- {
101
- text: 'GryphLife',
102
- href: 'https://gryphlife.uoguelph.ca/',
103
- },
104
- ],
105
- icon: faUser,
106
- };
107
- export class UofgHeader {
108
- constructor() {
109
- this.subContainerOverflowWidth = NaN;
110
- this.needsOverflowWidthUpdate = false;
111
- this.pageTitle = '';
112
- this.pageUrl = '';
113
- this.isFullSize = false;
114
- this.pageSpecificContent = undefined;
115
- this.isSubContainerOverflowing = false;
116
- }
117
- connectedCallback() {
118
- var _a;
119
- attachTailwind(this.el.shadowRoot);
120
- this.updateFullSize();
121
- this.updatePageSpecificContent();
122
- (_a = this.observer) !== null && _a !== void 0 ? _a : (this.observer = new MutationObserver(() => {
123
- this.updatePageSpecificContent();
124
- this.subContainerOverflowWidth = NaN; // Reset overflow width as it will have changed and needs to be recalculated
125
- this.needsOverflowWidthUpdate = true;
126
- }));
127
- this.observer.observe(this.el, { childList: true, subtree: true });
128
- }
129
- componentDidLoad() {
130
- this.updateSubContainerOverflow();
131
- }
132
- updateFullSize() {
133
- this.isFullSize = window.innerWidth >= TRANSITION_BREAKPOINT;
134
- this.updateSubContainerOverflow();
135
- }
136
- updateSubContainerOverflow() {
137
- if (this.isFullSize && this.subContainer) {
138
- const { clientWidth, scrollWidth } = this.subContainer;
139
- if (scrollWidth > clientWidth) {
140
- this.subContainerOverflowWidth = scrollWidth;
141
- }
142
- this.isSubContainerOverflowing = this.subContainerOverflowWidth > Math.min(clientWidth, MAX_CONTENT_WIDTH);
143
- }
144
- }
145
- componentDidRender() {
146
- if (this.needsOverflowWidthUpdate) {
147
- window.requestAnimationFrame(() => this.updateSubContainerOverflow());
148
- this.needsOverflowWidthUpdate = false;
149
- }
150
- }
151
- updatePageSpecificContent() {
152
- var _a;
153
- const aToPageSpecificLink = (a) => {
154
- const attributes = {};
155
- a.getAttributeNames()
156
- .filter(name => name !== 'href')
157
- .forEach(name => (attributes[name] = a.getAttribute(name)));
158
- return {
159
- href: a.getAttribute('href'),
160
- text: a.textContent,
161
- attributes,
162
- };
163
- };
164
- this.pageSpecificContent = Array.from((_a = this.el) === null || _a === void 0 ? void 0 : _a.children)
165
- .filter(child => child.tagName === 'A' || child.tagName === 'UL')
166
- .map(child => {
167
- switch (child.tagName) {
168
- case 'A':
169
- return aToPageSpecificLink(child);
170
- case 'UL':
171
- const value = {
172
- title: child.getAttribute('data-title'),
173
- links: Array.from(child.querySelectorAll('a')).map(aToPageSpecificLink),
174
- };
175
- value.wrapContent = value.links.reduce((shouldWrap, link) => {
176
- if (link.text.length > MENU_CHAR_LIMIT) {
177
- shouldWrap = true;
178
- }
179
- return shouldWrap;
180
- }, false);
181
- return value;
182
- }
183
- })
184
- .filter(val => Boolean(val));
185
- }
186
- render() {
187
- var _a, _b;
188
- return (h("header", { key: '086e88ed7fc9986ccd763b97a2d030f28c70b2f5', 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("ul", { class: "tw-contents [&>li]:tw-contents" }, [...topLinks, account].map(item => {
189
- if ('links' in item) {
190
- return (h("li", null, h("uofg-menu", { class: "tw-relative tw-block tw-h-full", "auto-collapse": true }, h("button", { class: {
191
- '${} tw-flex tw-h-full tw-items-center tw-justify-center tw-gap-2 tw-p-4 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': true,
192
- '[&>svg]:aria-expanded:tw-rotate-180': !item.icon,
193
- }, slot: "button" }, !item.icon && h("span", null, item.text.toUpperCase()), h(FontAwesomeIcon, { icon: item.icon || 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" }, item.links.map(link => (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: link.href }, link.text))))))));
194
- }
195
- return (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 tw-px-6 tw-font-bold' : ''}` }, item.text.toUpperCase())));
196
- })))), h("nav", { key: '8512ab7abce3d2e54d60f2bb0c594c1ebfa3de6f', class: {
197
- 'tw-h-[10rem]': this.isFullSize,
198
- 'tw-h-[5rem]': !this.isFullSize,
199
- 'tw-relative tw-flex tw-justify-between tw-bg-black tw-px-[calc((100%-1320px)/2)] tw-text-3xl tw-text-white': true,
200
- }, "aria-label": "Main" }, h("div", { key: '91ec9a844ce48c58dbbd298b04057457b81dd835', class: "tw-flex tw-w-fit" }, this.isFullSize && (h("div", { class: "tw-left-0 tw-h-full tw-w-[7.5rem] min-[1320px]:tw-absolute [&>svg]:tw-block [&>svg]:tw-h-full [&>svg]:tw-w-auto", innerHTML: Decoration })), h("a", { key: '2e7ff366c59aea7e4760815c886db8303f3981a3', class: "tw-h-full tw-w-fit tw-transition-opacity hocus:tw-opacity-75 min-[1320px]:tw-absolute min-[1320px]:tw-left-[max(calc((100%-1320px)/2),7.5rem)] [&>svg]:tw-block [&>svg]:tw-h-full [&>svg]:tw-w-auto", 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-3xl tw-font-medium tw-tracking-wide [&>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-6 tw-pt-8 tw-transition-colors hover:tw-border-uofg-yellow hover:tw-text-uofg-yellow" }, item.text)))), 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-pb-6 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: search.href, "aria-label": search.text }, h(FontAwesomeIcon, { icon: search.icon }))))) : (h("div", { class: "tw-flex tw-h-full" }, 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: search.href, "aria-label": search.text }, h(FontAwesomeIcon, { icon: search.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: account.icon })), h("div", { slot: "content", class: "tw-absolute tw-left-0 tw-top-full tw-z-50 tw-flex tw-max-h-[calc(100vh-5rem)] tw-w-full tw-flex-col tw-overflow-y-auto tw-bg-white tw-px-4 tw-text-black tw-shadow-md" }, h("ul", { class: "tw-flex tw-w-full tw-flex-col tw-py-6 [&>li]:tw-contents" }, account.links.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-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 })), h("div", { slot: "content", class: "tw-absolute tw-left-0 tw-top-full tw-z-50 tw-flex tw-max-h-[calc(100vh-5rem)] tw-w-full tw-flex-col tw-overflow-y-auto 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 tw-pb-6 [&>li]:tw-contents" }, mainLinks.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)))), topLinks.map(item => {
201
- if ('links' in item) {
202
- return (h("li", null, 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.text), h(FontAwesomeIcon, { icon: faCaretDown })), h("ul", { slot: "content", class: "tw-flex tw-w-full tw-flex-col [&>li]:tw-contents" }, item.links.map(link => (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: link.href }, link.text))))))));
203
- }
204
- return (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 tw-font-bold' : ''}` }, item.text)));
205
- }))))))), 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 lg:tw-whitespace-nowrap" }, this.pageTitle &&
206
- (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 => {
207
- if ('text' in item) {
208
- 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)));
209
- }
210
- 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 })), h("ul", { slot: "content", class: {
211
- '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,
212
- 'wrap-content': item.wrapContent || false,
213
- } }, 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))))))));
214
- }))) : (h("uofg-menu", { class: "tw-block tw-h-full tw-whitespace-normal 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 })), 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 => {
215
- if ('text' in item) {
216
- 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)));
217
- }
218
- 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 })), 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))))))));
219
- }))))))));
220
- }
221
- static get is() { return "uofg-header"; }
222
- static get encapsulation() { return "shadow"; }
223
- static get properties() {
224
- return {
225
- "pageTitle": {
226
- "type": "string",
227
- "mutable": false,
228
- "complexType": {
229
- "original": "string",
230
- "resolved": "string",
231
- "references": {}
232
- },
233
- "required": false,
234
- "optional": false,
235
- "docs": {
236
- "tags": [],
237
- "text": "The title of the department/topic that the header is being used for. For example, for the Convocation pages, this would be set to \"Convocation\"."
238
- },
239
- "attribute": "page-title",
240
- "reflect": false,
241
- "defaultValue": "''"
242
- },
243
- "pageUrl": {
244
- "type": "string",
245
- "mutable": false,
246
- "complexType": {
247
- "original": "string",
248
- "resolved": "string",
249
- "references": {}
250
- },
251
- "required": false,
252
- "optional": false,
253
- "docs": {
254
- "tags": [],
255
- "text": "The URL to the home/landing page of the department/topic the header is being used for. For example, for the Convocation pages, this would be set to \"https://www.uoguelph.ca/convocation/\"."
256
- },
257
- "attribute": "page-url",
258
- "reflect": false,
259
- "defaultValue": "''"
260
- }
261
- };
262
- }
263
- static get states() {
264
- return {
265
- "isFullSize": {},
266
- "pageSpecificContent": {},
267
- "isSubContainerOverflowing": {}
268
- };
269
- }
270
- static get elementRef() { return "el"; }
271
- static get listeners() {
272
- return [{
273
- "name": "resize",
274
- "method": "updateFullSize",
275
- "target": "window",
276
- "capture": false,
277
- "passive": true
278
- }];
279
- }
280
- }