@uoguelph/web-components 0.0.16 → 0.0.18

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 (48) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/{index-f0452ddd.js → index-52617c57.js} +11 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{uofg-footer_3.cjs.entry.js → uofg-alert_6.cjs.entry.js} +230 -82
  5. package/dist/cjs/uofg-web-components.cjs.js +2 -2
  6. package/dist/collection/collection-manifest.json +4 -1
  7. package/dist/collection/components/uofg-alert/uofg-alert.css +46 -0
  8. package/dist/collection/components/uofg-alert/uofg-alert.js +20 -0
  9. package/dist/collection/components/uofg-back-to-top/uofg-back-to-top.css +40 -0
  10. package/dist/collection/components/uofg-back-to-top/uofg-back-to-top.js +68 -0
  11. package/dist/collection/components/uofg-header/uofg-header.js +2 -2
  12. package/dist/collection/components/uofg-menu/uofg-menu.js +28 -50
  13. package/dist/collection/components/uofg-modal/uofg-modal.css +80 -0
  14. package/dist/collection/components/uofg-modal/uofg-modal.js +325 -0
  15. package/dist/collection/utils/utils.js +6 -0
  16. package/dist/components/font-awesome-icon.js +10 -0
  17. package/dist/components/index.d.ts +6 -0
  18. package/dist/components/index.js +3 -0
  19. package/dist/components/index2.js +12 -10
  20. package/dist/components/uofg-alert.d.ts +11 -0
  21. package/dist/components/uofg-alert.js +40 -0
  22. package/dist/components/uofg-back-to-top.d.ts +11 -0
  23. package/dist/components/uofg-back-to-top.js +48 -0
  24. package/dist/components/uofg-footer.js +2 -1
  25. package/dist/components/uofg-header.js +2 -1
  26. package/dist/components/uofg-menu2.js +31 -46
  27. package/dist/components/uofg-modal.d.ts +11 -0
  28. package/dist/components/uofg-modal.js +139 -0
  29. package/dist/components/utils.js +8 -0
  30. package/dist/esm/{index-24999f13.js → index-ebf79156.js} +11 -1
  31. package/dist/esm/loader.js +3 -3
  32. package/dist/esm/{uofg-footer_3.entry.js → uofg-alert_6.entry.js} +228 -83
  33. package/dist/esm/uofg-web-components.js +3 -3
  34. package/dist/types/components/uofg-alert/uofg-alert.d.ts +3 -0
  35. package/dist/types/components/uofg-back-to-top/uofg-back-to-top.d.ts +10 -0
  36. package/dist/types/components/uofg-header/uofg-header.d.ts +2 -2
  37. package/dist/types/components/uofg-menu/uofg-menu.d.ts +4 -4
  38. package/dist/types/components/uofg-modal/uofg-modal.d.ts +61 -0
  39. package/dist/types/components.d.ts +116 -4
  40. package/dist/types/utils/{feature-check.d.ts → utils.d.ts} +1 -0
  41. package/dist/uofg-web-components/p-2c75433c.entry.js +1 -0
  42. package/dist/uofg-web-components/p-bc82feb9.js +2 -0
  43. package/dist/uofg-web-components/uofg-web-components.css +1 -1
  44. package/dist/uofg-web-components/uofg-web-components.esm.js +1 -1
  45. package/package.json +4 -3
  46. package/dist/collection/utils/feature-check.js +0 -2
  47. package/dist/uofg-web-components/p-b7dfbfdc.js +0 -2
  48. package/dist/uofg-web-components/p-d87070ab.entry.js +0 -1
package/README.md CHANGED
@@ -2,3 +2,11 @@
2
2
 
3
3
  This is a collection of web components for use on various University of Guelph web pages. These components are
4
4
  built using [Stencil](https://stenciljs.com/), a compiler which makes developing component libraries fast and simple.
5
+
6
+ ## Developing the components
7
+
8
+ [See the development guide](/development-guide.md)
9
+
10
+ ## Using the components
11
+
12
+ [See the documentation for each component](/docs/components)
@@ -275,6 +275,10 @@ const parsePropertyValue = (propValue, propType) => {
275
275
  // but we'll cheat here and say that the string "false" is the boolean false
276
276
  return propValue === 'false' ? false : propValue === '' || !!propValue;
277
277
  }
278
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
279
+ // force it to be a number
280
+ return parseFloat(propValue);
281
+ }
278
282
  if (propType & 1 /* MEMBER_FLAGS.String */) {
279
283
  // could have been passed as a number or boolean
280
284
  // but we still want it as a string
@@ -935,7 +939,9 @@ const patch = (oldVNode, newVNode) => {
935
939
  isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
936
940
  }
937
941
  {
938
- {
942
+ if (tag === 'slot')
943
+ ;
944
+ else {
939
945
  // either this is the first render of an element OR it's an update
940
946
  // AND we already know it's possible it could have changed
941
947
  // this updates the element's css classes, attrs, props, listeners, etc.
@@ -1513,12 +1519,16 @@ const connectedCallback = (elm) => {
1513
1519
  const disconnectedCallback = (elm) => {
1514
1520
  if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
1515
1521
  const hostRef = getHostRef(elm);
1522
+ const instance = hostRef.$lazyInstance$ ;
1516
1523
  {
1517
1524
  if (hostRef.$rmListeners$) {
1518
1525
  hostRef.$rmListeners$.map((rmListener) => rmListener());
1519
1526
  hostRef.$rmListeners$ = undefined;
1520
1527
  }
1521
1528
  }
1529
+ {
1530
+ safeCall(instance, 'disconnectedCallback');
1531
+ }
1522
1532
  }
1523
1533
  };
1524
1534
  const bootstrapLazy = (lazyBundles, options = {}) => {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f0452ddd.js');
5
+ const index = require('./index-52617c57.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return Promise.resolve();
9
- return index.bootstrapLazy([["uofg-footer_3.cjs",[[1,"uofg-header",{"pageTitle":[1,"page-title"],"pageUrl":[1,"page-url"],"isFullSize":[32],"pageSpecificContent":[32]},[[9,"resize","updateFullSize"]]],[1,"uofg-footer"],[0,"uofg-menu",{"autoCollapse":[4,"auto-collapse"],"isExpanded":[32],"getExpanded":[64],"setExpanded":[64],"toggle":[64],"collapse":[64],"expand":[64]},[[0,"onChildListChange","handleChildListChange"]]]]]], options);
9
+ return index.bootstrapLazy([["uofg-alert_6.cjs",[[1,"uofg-header",{"pageTitle":[1,"page-title"],"pageUrl":[1,"page-url"],"isFullSize":[32],"pageSpecificContent":[32]},[[9,"resize","updateFullSize"]]],[1,"uofg-alert"],[1,"uofg-back-to-top",{"threshold":[2],"isVisible":[32]},[[9,"scroll","onScroll"]]],[1,"uofg-footer"],[1,"uofg-modal",{"label":[1],"alertDialog":[4,"alert-dialog"],"centered":[4],"staticBackdrop":[4,"static-backdrop"],"autoOpen":[4,"auto-open"],"isOpen":[32],"getState":[64],"setState":[64],"toggle":[64],"close":[64],"open":[64]}],[0,"uofg-menu",{"autoCollapse":[4,"auto-collapse"],"isExpanded":[32],"getExpanded":[64],"setExpanded":[64],"toggle":[64],"collapse":[64],"expand":[64]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f0452ddd.js');
5
+ const index = require('./index-52617c57.js');
6
6
 
7
7
  const FontAwesomeIcon = props => {
8
8
  const width = props.icon.icon[0];
@@ -11,49 +11,23 @@ const FontAwesomeIcon = props => {
11
11
  return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${width} ${height}` }, Array.isArray(iconPathData) ? (iconPathData.map(path => index.h("path", { d: path }))) : (index.h("path", { d: iconPathData }))));
12
12
  };
13
13
 
14
- var faSquareTwitter = {
15
- prefix: 'fab',
16
- iconName: 'square-twitter',
17
- icon: [448, 512, ["twitter-square"], "f081", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"]
18
- };
19
- var faTwitterSquare = faSquareTwitter;
20
- var faTiktok = {
21
- prefix: 'fab',
22
- iconName: 'tiktok',
23
- icon: [448, 512, [], "e07b", "M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"]
24
- };
25
- var faSquareFacebook = {
26
- prefix: 'fab',
27
- iconName: 'square-facebook',
28
- icon: [448, 512, ["facebook-square"], "f082", "M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"]
29
- };
30
- var faFacebookSquare = faSquareFacebook;
31
- var faLinkedin = {
32
- prefix: 'fab',
33
- iconName: 'linkedin',
34
- icon: [448, 512, [], "f08c", "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]
35
- };
36
- var faInstagram = {
37
- prefix: 'fab',
38
- iconName: 'instagram',
39
- icon: [448, 512, [], "f16d", "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]
40
- };
41
- var faYoutube = {
42
- prefix: 'fab',
43
- iconName: 'youtube',
44
- icon: [576, 512, [61802], "f167", "M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"]
14
+ var faCircleExclamation = {
15
+ prefix: 'far',
16
+ iconName: 'circle-exclamation',
17
+ icon: [512, 512, ["exclamation-circle"], "f06a", "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c-13.3 0-24 10.7-24 24V264c0 13.3 10.7 24 24 24s24-10.7 24-24V152c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]
45
18
  };
46
19
 
47
- const SocialLink = props => (index.h("li", null,
48
- index.h("a", { href: props.url, "aria-label": props.name },
49
- index.h(FontAwesomeIcon, { icon: props.icon }))));
50
- const SocialLinks = () => (index.h("ul", { id: "uofg-footer-social-links" },
51
- index.h(SocialLink, { name: "Twitter", url: "https://twitter.com/uofg", icon: faTwitterSquare }),
52
- index.h(SocialLink, { name: "Facebook", url: "https://www.facebook.com/uofguelph", icon: faFacebookSquare }),
53
- index.h(SocialLink, { name: "Instagram", url: "https://www.instagram.com/uofguelph/", icon: faInstagram }),
54
- index.h(SocialLink, { name: "Youtube", url: "https://www.youtube.com/user/uofguelph", icon: faYoutube }),
55
- index.h(SocialLink, { name: "LinkedIn", url: "https://www.linkedin.com/school/university-of-guelph/", icon: faLinkedin }),
56
- index.h(SocialLink, { name: "TikTok", url: "https://www.tiktok.com/@uofguelph", icon: faTiktok })));
20
+ const uofgAlertCss = ":host{display:block}*{box-sizing:border-box}#uofg-alert{display:flex;flex-direction:column;font-size:2rem}#uofg-alert #uofg-alert-title{display:flex;align-items:center;font-size:2.25rem;padding:2rem;color:white;background-color:#C10631}#uofg-alert #uofg-alert-title>svg{margin-right:1rem;fill:currentColor;height:1.5em}#uofg-alert #uofg-alert-body{display:flex;flex-direction:column;padding:1.5rem 2rem;background-color:white}#uofg-alert #uofg-alert-body slot[name=subtitle]::slotted(*){font-size:2rem;margin-bottom:2rem;font-weight:bold}#uofg-alert #uofg-alert-body slot[name=message]::slotted(*){font-size:1.6rem}#uofg-alert #uofg-alert-footer{display:flex;padding:1rem 2rem;background-color:#DDDDDD;font-size:1.4rem}";
21
+
22
+ const UofgAlert = class {
23
+ constructor(hostRef) {
24
+ index.registerInstance(this, hostRef);
25
+ }
26
+ render() {
27
+ return (index.h("div", { id: "uofg-alert" }, index.h("div", { id: "uofg-alert-title" }, index.h(FontAwesomeIcon, { icon: faCircleExclamation }), index.h("slot", { name: "title" })), index.h("div", { id: "uofg-alert-body" }, index.h("slot", { name: "subtitle" }), index.h("slot", { name: "message" })), index.h("div", { id: "uofg-alert-footer" }, index.h("slot", { name: "footer" }))));
28
+ }
29
+ };
30
+ UofgAlert.style = uofgAlertCss;
57
31
 
58
32
  var faTrees = {
59
33
  prefix: 'fas',
@@ -75,6 +49,11 @@ var faList = {
75
49
  iconName: 'list',
76
50
  icon: [512, 512, ["list-squares"], "f03a", "M40 48C26.7 48 16 58.7 16 72v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V72c0-13.3-10.7-24-24-24H40zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H192zM16 232v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V232c0-13.3-10.7-24-24-24H40c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24H88c13.3 0 24-10.7 24-24V392c0-13.3-10.7-24-24-24H40z"]
77
51
  };
52
+ var faChevronUp = {
53
+ prefix: 'fas',
54
+ iconName: 'chevron-up',
55
+ icon: [512, 512, [], "f077", "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]
56
+ };
78
57
  var faKey = {
79
58
  prefix: 'fas',
80
59
  iconName: 'key',
@@ -121,12 +100,84 @@ var faMagnifyingGlass = {
121
100
  icon: [512, 512, [128269, "search"], "f002", "M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]
122
101
  };
123
102
  var faSearch = faMagnifyingGlass;
103
+ var faXmark = {
104
+ prefix: 'fas',
105
+ iconName: 'xmark',
106
+ icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]
107
+ };
108
+ var faTimes = faXmark;
124
109
  var faBriefcase = {
125
110
  prefix: 'fas',
126
111
  iconName: 'briefcase',
127
112
  icon: [512, 512, [128188], "f0b1", "M184 48H328c4.4 0 8 3.6 8 8V96H176V56c0-4.4 3.6-8 8-8zm-56 8V96H64C28.7 96 0 124.7 0 160v96H192 320 512V160c0-35.3-28.7-64-64-64H384V56c0-30.9-25.1-56-56-56H184c-30.9 0-56 25.1-56 56zM512 288H320v32c0 17.7-14.3 32-32 32H224c-17.7 0-32-14.3-32-32V288H0V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V288z"]
128
113
  };
129
114
 
115
+ const uofgBackToTopCss = ":host{display:block}:focus-visible{outline:2px solid #ffc72a;outline-offset:0.5rem}#uofg-back-to-top{position:fixed;margin:10px;height:35px;width:35px;right:0;bottom:0;z-index:1000;cursor:pointer;background-color:black;color:white;transition-duration:0.3s;transition-timing-function:ease-in-out;transition-property:opacity, visibility, background-color;opacity:0;visibility:hidden;border-radius:50%;border:1px solid #fff}#uofg-back-to-top:hover{background-color:#d50029}#uofg-back-to-top>svg{width:1em;height:1em;fill:currentColor}#uofg-back-to-top.visible{opacity:1;visibility:visible}";
116
+
117
+ const UofgBackToTop = class {
118
+ constructor(hostRef) {
119
+ index.registerInstance(this, hostRef);
120
+ this.threshold = 50;
121
+ this.isVisible = false;
122
+ }
123
+ connectedCallback() {
124
+ this.onScroll();
125
+ }
126
+ onScroll() {
127
+ this.isVisible = window.scrollY >= this.threshold;
128
+ }
129
+ render() {
130
+ return (index.h("button", { id: "uofg-back-to-top", "aria-label": "Go back to the top", class: { visible: this.isVisible }, onClick: () => {
131
+ window.scrollTo({ top: 0, behavior: 'smooth' });
132
+ } }, index.h(FontAwesomeIcon, { icon: faChevronUp })));
133
+ }
134
+ };
135
+ UofgBackToTop.style = uofgBackToTopCss;
136
+
137
+ var faSquareTwitter = {
138
+ prefix: 'fab',
139
+ iconName: 'square-twitter',
140
+ icon: [448, 512, ["twitter-square"], "f081", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"]
141
+ };
142
+ var faTwitterSquare = faSquareTwitter;
143
+ var faTiktok = {
144
+ prefix: 'fab',
145
+ iconName: 'tiktok',
146
+ icon: [448, 512, [], "e07b", "M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"]
147
+ };
148
+ var faSquareFacebook = {
149
+ prefix: 'fab',
150
+ iconName: 'square-facebook',
151
+ icon: [448, 512, ["facebook-square"], "f082", "M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"]
152
+ };
153
+ var faFacebookSquare = faSquareFacebook;
154
+ var faLinkedin = {
155
+ prefix: 'fab',
156
+ iconName: 'linkedin',
157
+ icon: [448, 512, [], "f08c", "M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]
158
+ };
159
+ var faInstagram = {
160
+ prefix: 'fab',
161
+ iconName: 'instagram',
162
+ icon: [448, 512, [], "f16d", "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]
163
+ };
164
+ var faYoutube = {
165
+ prefix: 'fab',
166
+ iconName: 'youtube',
167
+ icon: [576, 512, [61802], "f167", "M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"]
168
+ };
169
+
170
+ const SocialLink = props => (index.h("li", null,
171
+ index.h("a", { href: props.url, "aria-label": props.name },
172
+ index.h(FontAwesomeIcon, { icon: props.icon }))));
173
+ const SocialLinks = () => (index.h("ul", { id: "uofg-footer-social-links" },
174
+ index.h(SocialLink, { name: "Twitter", url: "https://twitter.com/uofg", icon: faTwitterSquare }),
175
+ index.h(SocialLink, { name: "Facebook", url: "https://www.facebook.com/uofguelph", icon: faFacebookSquare }),
176
+ index.h(SocialLink, { name: "Instagram", url: "https://www.instagram.com/uofguelph/", icon: faInstagram }),
177
+ index.h(SocialLink, { name: "Youtube", url: "https://www.youtube.com/user/uofguelph", icon: faYoutube }),
178
+ index.h(SocialLink, { name: "LinkedIn", url: "https://www.linkedin.com/school/university-of-guelph/", icon: faLinkedin }),
179
+ index.h(SocialLink, { name: "TikTok", url: "https://www.tiktok.com/@uofguelph", icon: faTiktok })));
180
+
130
181
  const FooterLink = props => (index.h("li", null,
131
182
  index.h("a", { href: props.url, title: props.title },
132
183
  index.h(FontAwesomeIcon, { icon: props.icon }),
@@ -284,17 +335,13 @@ UofgHeader.style = uofgHeaderCss;
284
335
 
285
336
  const WEB_ANIMATIONS_SUPPORTED = 'animate' in HTMLElement.prototype;
286
337
  const PREFERS_REDUCED_MOTION = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
338
+ const getAllFocusableElements = (container) => {
339
+ const query = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], audio[controls], video[controls], details, summary, [tabindex]:not([tabindex="-1"])';
340
+ return Array.from(container.querySelectorAll(query));
341
+ };
287
342
 
288
343
  const DURATION_REGEX = /^(\d*\.?\d+)(s|ms)$/;
289
344
  const EASING_FUNCTION_REGEX = /^cubic-bezier\((\s*-?\d*\.?\d+\s*,){3}\s*-?\d*\.?\d+\s*\)$|^steps\(\s*\d+\s*(,\s*(start|end))?\s*\)$/;
290
- const observer = new MutationObserver(mutations => {
291
- for (const mutation of mutations) {
292
- mutation.target.dispatchEvent(new CustomEvent('childListChange', { bubbles: false }));
293
- }
294
- });
295
- const observerConfig = {
296
- childList: true,
297
- };
298
345
  const UofgMenu = class {
299
346
  constructor(hostRef) {
300
347
  index.registerInstance(this, hostRef);
@@ -306,50 +353,31 @@ const UofgMenu = class {
306
353
  this.button = null;
307
354
  this.content = null;
308
355
  this.contentComputedStyle = null;
356
+ this.observer = new MutationObserver(this.handleMutation);
309
357
  this.isExpanded = false;
310
358
  this.autoCollapse = false;
311
359
  }
312
360
  connectedCallback() {
313
361
  // Bind functions so that "this" correctly refers to the component's instance.
314
- this.handleChildListChange = this.handleChildListChange.bind(this);
315
- this.updateButton = this.updateButton.bind(this);
316
- this.updateContent = this.updateContent.bind(this);
317
- this.handleButtonClick = this.handleButtonClick.bind(this);
362
+ this.handleMutation = this.handleMutation.bind(this);
363
+ this.handleClick = this.handleClick.bind(this);
318
364
  this.handleFocusout = this.handleFocusout.bind(this);
319
365
  this.handleKeyUp = this.handleKeyUp.bind(this);
320
366
  this.computedStyle = window.getComputedStyle(this.el);
321
- this.isExpanded = false;
322
- this.handleChildListChange();
323
- observer.observe(this.el, observerConfig);
367
+ this.handleMutation();
368
+ this.observer.observe(this.el, { childList: true });
324
369
  }
325
- handleChildListChange() {
326
- this.updateButton();
327
- this.updateContent();
370
+ disconnectedCallback() {
371
+ this.observer.disconnect();
328
372
  }
329
- handleKeyUp(e) {
330
- if (e.key === 'Escape') {
331
- this.isExpanded = false;
332
- if (e.target !== this.button) {
333
- e.stopPropagation();
334
- this.isExpanded = false;
335
- this.button && this.button.focus();
336
- }
337
- }
338
- }
339
- updateButton() {
340
- var _a, _b, _c;
373
+ handleMutation() {
374
+ // Update the button element
341
375
  const button = this.el.querySelector('[slot="button"]');
342
- // Clean up the old button before setting the new one
343
- (_a = this.button) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', this.handleButtonClick);
344
- (_b = this.button) === null || _b === void 0 ? void 0 : _b.removeAttribute('aria-expanded');
345
- (_c = this.button) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-haspopup');
346
376
  // Set up the new button
347
377
  button === null || button === void 0 ? void 0 : button.setAttribute('aria-expanded', this.isExpanded ? 'true' : 'false');
348
378
  button === null || button === void 0 ? void 0 : button.setAttribute('aria-haspopup', 'true');
349
- button === null || button === void 0 ? void 0 : button.addEventListener('click', this.handleButtonClick);
350
379
  this.button = button;
351
- }
352
- updateContent() {
380
+ // Update the content element
353
381
  const content = this.el.querySelector('[slot="content"]');
354
382
  if (content == null) {
355
383
  this.content = null;
@@ -361,8 +389,22 @@ const UofgMenu = class {
361
389
  this.contentComputedStyle = window.getComputedStyle(this.content);
362
390
  }
363
391
  }
364
- handleButtonClick() {
365
- this.isExpanded = !this.isExpanded;
392
+ handleKeyUp(e) {
393
+ if (e.key === 'Escape') {
394
+ this.isExpanded = false;
395
+ if (e.target !== this.button) {
396
+ e.stopPropagation();
397
+ this.isExpanded = false;
398
+ this.button && this.button.focus();
399
+ }
400
+ }
401
+ }
402
+ handleClick(e) {
403
+ //Check if the click was on the button or a descendant of the button
404
+ if (this.button && this.button.contains(e.target)) {
405
+ this.isExpanded = !this.isExpanded;
406
+ return;
407
+ }
366
408
  }
367
409
  handleFocusout(e) {
368
410
  if (this.autoCollapse && !this.el.contains(e.relatedTarget)) {
@@ -488,7 +530,7 @@ const UofgMenu = class {
488
530
  };
489
531
  }
490
532
  render() {
491
- return (index.h(index.Host, { tabindex: -1, "data-expanded": this.isExpanded, onFocusout: this.handleFocusout, onKeyUp: this.handleKeyUp }));
533
+ return (index.h(index.Host, { "data-expanded": this.isExpanded, tabindex: -1, onFocusout: this.handleFocusout, onKeyUp: this.handleKeyUp, onClick: this.handleClick }));
492
534
  }
493
535
  /**
494
536
  * Get the current expanded state of the menu.
@@ -532,6 +574,112 @@ const UofgMenu = class {
532
574
  }; }
533
575
  };
534
576
 
577
+ const uofgModalCss = ":host{visibility:visible !important;position:relative !important}:focus-visible{outline:2px solid #ffc72a}*{box-sizing:border-box}#uofg-modal{display:flex;position:fixed;top:0;left:0;z-index:10000;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);visibility:hidden;opacity:0;padding:2rem;transition-duration:0.3s;transition-timing-function:ease-in-out;transition-property:visibility, opacity}#uofg-modal #uofg-modal-dismiss{display:flex;justify-content:center;align-items:center;position:absolute;top:0;right:0;padding:0.5rem;height:3.5rem;width:3.5rem;font-size:2rem;line-height:1;color:var(--uofg-modal-dismiss-color, #fff);background-color:transparent;border:none;cursor:pointer;z-index:2}#uofg-modal #uofg-modal-dismiss>svg{display:block;height:1em;fill:currentColor}#uofg-modal>#uofg-modal-content{position:absolute;left:50%;transition:transform 0.3s ease-in-out;transform:translate(-50%, -50px);z-index:1}@media (prefers-reduced-motion: reduce){#uofg-modal>#uofg-modal-content{transition:none}}#uofg-modal>#uofg-modal-content.centered{top:50%;transform:translate(-50%, calc(-50% - 50px))}#uofg-modal.open{visibility:visible;opacity:1}#uofg-modal.open #uofg-modal-content{visibility:visible;opacity:1;transform:translate(-50%, 0)}#uofg-modal.open #uofg-modal-content.centered{transform:translate(-50%, -50%)}";
578
+
579
+ const UofgModal = class {
580
+ constructor(hostRef) {
581
+ index.registerInstance(this, hostRef);
582
+ this.label = undefined;
583
+ this.alertDialog = false;
584
+ this.centered = false;
585
+ this.staticBackdrop = false;
586
+ this.autoOpen = false;
587
+ this.isOpen = false;
588
+ }
589
+ connectedCallback() {
590
+ // Bind event handlers so that 'this' is always the component instance.
591
+ this.handleClick = this.handleClick.bind(this);
592
+ this.handleKeyUp = this.handleKeyUp.bind(this);
593
+ this.handleKeyDown = this.handleKeyDown.bind(this);
594
+ if (this.autoOpen) {
595
+ this.isOpen = true;
596
+ }
597
+ }
598
+ handleClick(e) {
599
+ if (!this.staticBackdrop && e.target === e.currentTarget) {
600
+ this.isOpen = false;
601
+ }
602
+ }
603
+ handleKeyUp(e) {
604
+ if (e.key === 'Escape') {
605
+ this.isOpen = false;
606
+ }
607
+ }
608
+ handleKeyDown(e) {
609
+ if (e.key === 'Tab') {
610
+ const focusableElements = getAllFocusableElements(this.el);
611
+ const firstFocusable = this.dismissButton; // The dismiss button is always the first focusable element in the modal.
612
+ const lastFocusable = focusableElements[focusableElements.length - 1];
613
+ if (e.target === firstFocusable && e.shiftKey) {
614
+ e.preventDefault();
615
+ lastFocusable === null || lastFocusable === void 0 ? void 0 : lastFocusable.focus();
616
+ }
617
+ else if (e.target === lastFocusable && !e.shiftKey) {
618
+ e.preventDefault();
619
+ firstFocusable === null || firstFocusable === void 0 ? void 0 : firstFocusable.focus();
620
+ }
621
+ }
622
+ }
623
+ handleIsOpenChange(newValue) {
624
+ if (newValue === true) {
625
+ window.requestAnimationFrame(() => {
626
+ window.requestAnimationFrame(() => {
627
+ window.requestAnimationFrame(() => {
628
+ this.dismissButton.focus();
629
+ });
630
+ });
631
+ });
632
+ }
633
+ }
634
+ render() {
635
+ return (index.h("div", { id: "uofg-modal", class: { open: this.isOpen }, role: this.isOpen ? (this.alertDialog ? 'alertdialog' : 'dialog') : '', "aria-modal": this.isOpen, "aria-label": this.label, "aria-hidden": !this.isOpen, tabIndex: -1, onClick: this.handleClick, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown }, index.h("div", { id: "uofg-modal-content", class: { centered: this.centered } }, index.h("button", { id: "uofg-modal-dismiss", "aria-label": "Close modal", ref: (el) => (this.dismissButton = el), onClick: () => (this.isOpen = false) }, index.h(FontAwesomeIcon, { icon: faTimes })), index.h("slot", null))));
636
+ }
637
+ /**
638
+ * Get the current state of the modal.
639
+ * @returns A promise which will resolve to true when the modal is open, or false when the modal is closed.
640
+ */
641
+ async getState() {
642
+ return this.isOpen;
643
+ }
644
+ /**
645
+ * Set the state of the modal.
646
+ * @param value The new state, set it to true to open the modal, or false to close the modal.
647
+ */
648
+ async setState(value) {
649
+ this.isOpen = value;
650
+ }
651
+ /**
652
+ * Toggle the state of the modal.
653
+ * @returns A promise which will resolve to true (if the modal opened) or false (if the modal closed).
654
+ */
655
+ async toggle() {
656
+ this.isOpen = !this.isOpen;
657
+ return this.isOpen;
658
+ }
659
+ /**
660
+ * Closes the modal.
661
+ * @returns empty Promise.
662
+ */
663
+ async close() {
664
+ this.isOpen = false;
665
+ }
666
+ /**
667
+ * Opens the modal.
668
+ * @returns empty Promise.
669
+ */
670
+ async open() {
671
+ this.isOpen = true;
672
+ }
673
+ get el() { return index.getElement(this); }
674
+ static get watchers() { return {
675
+ "isOpen": ["handleIsOpenChange"]
676
+ }; }
677
+ };
678
+ UofgModal.style = uofgModalCss;
679
+
680
+ exports.uofg_alert = UofgAlert;
681
+ exports.uofg_back_to_top = UofgBackToTop;
535
682
  exports.uofg_footer = UofgFooter;
536
683
  exports.uofg_header = UofgHeader;
537
684
  exports.uofg_menu = UofgMenu;
685
+ exports.uofg_modal = UofgModal;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-f0452ddd.js');
5
+ const index = require('./index-52617c57.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Browser v4.0.1 | MIT Licensed | https://stenciljs.com
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["uofg-footer_3.cjs",[[1,"uofg-header",{"pageTitle":[1,"page-title"],"pageUrl":[1,"page-url"],"isFullSize":[32],"pageSpecificContent":[32]},[[9,"resize","updateFullSize"]]],[1,"uofg-footer"],[0,"uofg-menu",{"autoCollapse":[4,"auto-collapse"],"isExpanded":[32],"getExpanded":[64],"setExpanded":[64],"toggle":[64],"collapse":[64],"expand":[64]},[[0,"onChildListChange","handleChildListChange"]]]]]], options);
20
+ return index.bootstrapLazy([["uofg-alert_6.cjs",[[1,"uofg-header",{"pageTitle":[1,"page-title"],"pageUrl":[1,"page-url"],"isFullSize":[32],"pageSpecificContent":[32]},[[9,"resize","updateFullSize"]]],[1,"uofg-alert"],[1,"uofg-back-to-top",{"threshold":[2],"isVisible":[32]},[[9,"scroll","onScroll"]]],[1,"uofg-footer"],[1,"uofg-modal",{"label":[1],"alertDialog":[4,"alert-dialog"],"centered":[4],"staticBackdrop":[4,"static-backdrop"],"autoOpen":[4,"auto-open"],"isOpen":[32],"getState":[64],"setState":[64],"toggle":[64],"close":[64],"open":[64]}],[0,"uofg-menu",{"autoCollapse":[4,"auto-collapse"],"isExpanded":[32],"getExpanded":[64],"setExpanded":[64],"toggle":[64],"collapse":[64],"expand":[64]}]]]], options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "entries": [
3
+ "components/uofg-alert/uofg-alert.js",
4
+ "components/uofg-back-to-top/uofg-back-to-top.js",
3
5
  "components/uofg-footer/uofg-footer.js",
4
6
  "components/uofg-header/uofg-header.js",
5
- "components/uofg-menu/uofg-menu.js"
7
+ "components/uofg-menu/uofg-menu.js",
8
+ "components/uofg-modal/uofg-modal.js"
6
9
  ],
7
10
  "compiler": {
8
11
  "name": "@stencil/core",
@@ -0,0 +1,46 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ * {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ #uofg-alert {
10
+ display: flex;
11
+ flex-direction: column;
12
+ font-size: 2rem;
13
+ }
14
+ #uofg-alert #uofg-alert-title {
15
+ display: flex;
16
+ align-items: center;
17
+ font-size: 2.25rem;
18
+ padding: 2rem;
19
+ color: white;
20
+ background-color: #C10631;
21
+ }
22
+ #uofg-alert #uofg-alert-title > svg {
23
+ margin-right: 1rem;
24
+ fill: currentColor;
25
+ height: 1.5em;
26
+ }
27
+ #uofg-alert #uofg-alert-body {
28
+ display: flex;
29
+ flex-direction: column;
30
+ padding: 1.5rem 2rem;
31
+ background-color: white;
32
+ }
33
+ #uofg-alert #uofg-alert-body slot[name=subtitle]::slotted(*) {
34
+ font-size: 2rem;
35
+ margin-bottom: 2rem;
36
+ font-weight: bold;
37
+ }
38
+ #uofg-alert #uofg-alert-body slot[name=message]::slotted(*) {
39
+ font-size: 1.6rem;
40
+ }
41
+ #uofg-alert #uofg-alert-footer {
42
+ display: flex;
43
+ padding: 1rem 2rem;
44
+ background-color: #DDDDDD;
45
+ font-size: 1.4rem;
46
+ }
@@ -0,0 +1,20 @@
1
+ import { h } from "@stencil/core";
2
+ import { FontAwesomeIcon } from "../../utils/font-awesome-icon";
3
+ import { faCircleExclamation } from "@fortawesome/pro-regular-svg-icons";
4
+ export class UofgAlert {
5
+ render() {
6
+ return (h("div", { id: "uofg-alert" }, h("div", { id: "uofg-alert-title" }, h(FontAwesomeIcon, { icon: faCircleExclamation }), h("slot", { name: "title" })), h("div", { id: "uofg-alert-body" }, h("slot", { name: "subtitle" }), h("slot", { name: "message" })), h("div", { id: "uofg-alert-footer" }, h("slot", { name: "footer" }))));
7
+ }
8
+ static get is() { return "uofg-alert"; }
9
+ static get encapsulation() { return "shadow"; }
10
+ static get originalStyleUrls() {
11
+ return {
12
+ "$": ["uofg-alert.scss"]
13
+ };
14
+ }
15
+ static get styleUrls() {
16
+ return {
17
+ "$": ["uofg-alert.css"]
18
+ };
19
+ }
20
+ }
@@ -0,0 +1,40 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ :focus-visible {
6
+ outline: 2px solid #ffc72a;
7
+ outline-offset: 0.5rem;
8
+ }
9
+
10
+ #uofg-back-to-top {
11
+ position: fixed;
12
+ margin: 10px;
13
+ height: 35px;
14
+ width: 35px;
15
+ right: 0;
16
+ bottom: 0;
17
+ z-index: 1000;
18
+ cursor: pointer;
19
+ background-color: black;
20
+ color: white;
21
+ transition-duration: 0.3s;
22
+ transition-timing-function: ease-in-out;
23
+ transition-property: opacity, visibility, background-color;
24
+ opacity: 0;
25
+ visibility: hidden;
26
+ border-radius: 50%;
27
+ border: 1px solid #fff;
28
+ }
29
+ #uofg-back-to-top:hover {
30
+ background-color: #d50029;
31
+ }
32
+ #uofg-back-to-top > svg {
33
+ width: 1em;
34
+ height: 1em;
35
+ fill: currentColor;
36
+ }
37
+ #uofg-back-to-top.visible {
38
+ opacity: 1;
39
+ visibility: visible;
40
+ }