@uoguelph/web-components 0.0.30 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/dist/cjs/index-5114bde1.js +32 -0
- package/dist/cjs/{index-52617c57.js → index-ff6a2049.js} +2 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/uofg-alert.cjs.entry.js +20 -0
- package/dist/cjs/{uofg-alert_6.cjs.entry.js → uofg-back-to-top_5.cjs.entry.js} +31 -216
- package/dist/cjs/uofg-modal.cjs.entry.js +162 -0
- package/dist/cjs/uofg-web-components.cjs.js +2 -2
- package/dist/cjs/utils-582c8cb9.js +16 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/uofg-alert/uofg-alert.css +30 -5
- package/dist/collection/components/uofg-card/uofg-card.css +95 -0
- package/dist/collection/components/uofg-card/uofg-card.js +43 -0
- package/dist/collection/components/uofg-footer/uofg-footer.css +7 -7
- package/dist/collection/components/uofg-header/uofg-header.css +37 -32
- package/dist/collection/components/uofg-modal/uofg-modal.css +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/uofg-alert.js +1 -1
- package/dist/components/uofg-card.d.ts +11 -0
- package/dist/components/uofg-card.js +37 -0
- package/dist/components/uofg-footer.js +1 -1
- package/dist/components/uofg-header.js +1 -1
- package/dist/components/uofg-modal.js +1 -1
- package/dist/esm/index-2e2e7c34.js +27 -0
- package/dist/esm/{index-ebf79156.js → index-eadef739.js} +2 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/uofg-alert.entry.js +16 -0
- package/dist/esm/{uofg-alert_6.entry.js → uofg-back-to-top_5.entry.js} +20 -204
- package/dist/esm/uofg-modal.entry.js +158 -0
- package/dist/esm/uofg-web-components.js +3 -3
- package/dist/esm/utils-cfa32fa2.js +12 -0
- package/dist/types/components/uofg-card/uofg-card.d.ts +7 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/uofg-web-components/p-2b2ee75e.entry.js +1 -0
- package/dist/uofg-web-components/p-35d3a961.js +1 -0
- package/dist/uofg-web-components/p-826dc478.js +1 -0
- package/dist/uofg-web-components/p-adc55d2e.entry.js +1 -0
- package/dist/uofg-web-components/p-c1a7d36a.entry.js +1 -0
- package/dist/uofg-web-components/p-d8e285c3.js +2 -0
- package/dist/uofg-web-components/uofg-web-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/uofg-web-components/p-b2dc7a56.entry.js +0 -1
- package/dist/uofg-web-components/p-bc82feb9.js +0 -2
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-ff6a2049.js');
|
|
6
|
+
const index$1 = require('./index-5114bde1.js');
|
|
7
|
+
const utils = require('./utils-582c8cb9.js');
|
|
8
|
+
|
|
9
|
+
const uofgModalCss = ":host{visibility:visible !important;position:relative !important;z-index:100000 !important}: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}#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;transition-property:opacity, visibility;transition-duration:0.2s;transition-timing-function:ease-in-out}#uofg-modal.open{visibility:visible;opacity:1}#uofg-modal-dismiss{display:flex;justify-content:center;align-items:center;position:absolute;top:2rem;right:2rem;padding:0.5rem;height:3.5rem;width:3.5rem;font-size:2rem;line-height:1;color:var(--uofg-modal-dismiss-color, white);z-index:2}#uofg-modal-dismiss>svg{display:block;height:1em;fill:currentColor}#uofg-modal-content{position:absolute;width:fit-content;height:fit-content;width:-moz-max-content;height:-moz-max-content;padding:2rem;max-width:100%;max-height:100%;left:50%;transform:translate(-50%, -50px);z-index:1;overflow:auto;transition-property:transform;transition-duration:0.2s;transition-timing-function:ease-in-out}@media (prefers-reduced-motion: reduce){#uofg-modal-content{transition:none}}#uofg-modal-content.centered{top:50%;transform:translate(-50%, calc(-50% - 50px))}#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%)}";
|
|
10
|
+
|
|
11
|
+
const UofgModal = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.opened = index.createEvent(this, "opened", 2);
|
|
15
|
+
this.closed = index.createEvent(this, "closed", 2);
|
|
16
|
+
this.inertElements = [];
|
|
17
|
+
this.label = undefined;
|
|
18
|
+
this.alertDialog = false;
|
|
19
|
+
this.centered = false;
|
|
20
|
+
this.staticBackdrop = false;
|
|
21
|
+
this.autoOpen = false;
|
|
22
|
+
this.isOpen = false;
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
// Bind event handlers so that 'this' is always the component instance.
|
|
26
|
+
this.handleClick = this.handleClick.bind(this);
|
|
27
|
+
this.handleKeyUp = this.handleKeyUp.bind(this);
|
|
28
|
+
this.handleFocusOut = this.handleFocusOut.bind(this);
|
|
29
|
+
if (this.autoOpen) {
|
|
30
|
+
this.isOpen = true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
// Just in case the modal is removed from the DOM before it is closed, make sure to remove the inert attribute from all elements that we marked as inert when the modal was opened.
|
|
35
|
+
for (const element of this.inertElements) {
|
|
36
|
+
element.removeAttribute('inert');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
handleClick(e) {
|
|
40
|
+
if (!this.staticBackdrop && e.target === e.currentTarget) {
|
|
41
|
+
this.isOpen = false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
handleKeyUp(e) {
|
|
45
|
+
if (e.key === 'Escape') {
|
|
46
|
+
this.isOpen = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
handleFocusOut(e) {
|
|
50
|
+
var _a;
|
|
51
|
+
if (!this.isOpen)
|
|
52
|
+
return; // Don't do anything if the modal is closed.
|
|
53
|
+
const relatedTarget = e.relatedTarget;
|
|
54
|
+
// If the focus is moving outside of the modal
|
|
55
|
+
if (!this.container.contains(relatedTarget) && !this.el.contains(relatedTarget)) {
|
|
56
|
+
e.preventDefault();
|
|
57
|
+
// If the focus is moving away from the dismiss button, focus the last focusable element in the modal.
|
|
58
|
+
if (e.target === this.dismissButton) {
|
|
59
|
+
const focusableElements = utils.getAllFocusableElements(this.el);
|
|
60
|
+
(_a = focusableElements[focusableElements.length - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// Otherwise, focus the dismiss button.
|
|
64
|
+
this.dismissButton.focus();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
handleIsOpenChange(newValue) {
|
|
69
|
+
if (newValue === true) {
|
|
70
|
+
window.requestAnimationFrame(() => {
|
|
71
|
+
window.requestAnimationFrame(() => {
|
|
72
|
+
window.requestAnimationFrame(() => {
|
|
73
|
+
// Focus the container element when the modal is opened, so that the screen reader's will announce the modal when it opens.
|
|
74
|
+
this.container.focus();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
// Mark outer elements as inert when the modal is open.
|
|
79
|
+
let current = this.el;
|
|
80
|
+
// We want to mark all elements outside of the modal as inert, so we need to traverse up the DOM tree until we reach the body element.
|
|
81
|
+
while (current !== null && current !== document.body) {
|
|
82
|
+
const parent = current.parentElement;
|
|
83
|
+
// If parent is null, then we may be inside a shadow root. If so, we get the host element and continue traversing up the DOM tree.
|
|
84
|
+
if (parent === null) {
|
|
85
|
+
const root = current.getRootNode();
|
|
86
|
+
if (root instanceof ShadowRoot) {
|
|
87
|
+
current = root.host;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (parent !== null) {
|
|
92
|
+
for (const child of parent.children) {
|
|
93
|
+
if (child !== current && !child.inert) {
|
|
94
|
+
// Mark the element as inert and store it in an array so that we can remove the inert attribute when the modal closes.
|
|
95
|
+
child.inert = true;
|
|
96
|
+
this.inertElements.push(child);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
current = parent;
|
|
101
|
+
this.opened.emit();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
// Remove the inert attribute from all elements that we marked as inert when the modal was opened.
|
|
106
|
+
for (const element of this.inertElements) {
|
|
107
|
+
element.removeAttribute('inert');
|
|
108
|
+
}
|
|
109
|
+
// Clear the array of inert elements. This is important because we don't want to keep a reference to elements as they may be removed from the DOM and we could cause a memory leak.
|
|
110
|
+
this.inertElements = [];
|
|
111
|
+
this.closed.emit();
|
|
112
|
+
}
|
|
113
|
+
// Prevent scrolling of the body when the modal is open.
|
|
114
|
+
document.body.style.overflow = newValue ? 'hidden' : '';
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
return (index.h("div", { id: "uofg-modal", class: { open: this.isOpen }, role: this.alertDialog ? 'alertdialog' : 'dialog', "aria-modal": this.isOpen ? 'true' : '', "aria-label": this.label, tabIndex: -1, onClick: this.handleClick, onKeyUp: this.handleKeyUp, onFocusout: this.handleFocusOut, ref: (el) => (this.container = el) }, index.h("div", { id: "uofg-modal-content", part: "content", class: { centered: this.centered } }, index.h("button", { id: "uofg-modal-dismiss", part: "dismiss-button", "aria-label": "Close modal", ref: (el) => (this.dismissButton = el), onClick: () => (this.isOpen = false) }, index.h(index$1.FontAwesomeIcon, { icon: index$1.faTimes })), index.h("slot", null))));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get the current state of the modal.
|
|
121
|
+
* @returns A promise which will resolve to true when the modal is open, or false when the modal is closed.
|
|
122
|
+
*/
|
|
123
|
+
async getState() {
|
|
124
|
+
return this.isOpen;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Set the state of the modal.
|
|
128
|
+
* @param value The new state, set it to true to open the modal, or false to close the modal.
|
|
129
|
+
*/
|
|
130
|
+
async setState(value) {
|
|
131
|
+
this.isOpen = value;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Toggle the state of the modal.
|
|
135
|
+
* @returns A promise which will resolve to true (if the modal opened) or false (if the modal closed).
|
|
136
|
+
*/
|
|
137
|
+
async toggle() {
|
|
138
|
+
this.isOpen = !this.isOpen;
|
|
139
|
+
return this.isOpen;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Closes the modal.
|
|
143
|
+
* @returns empty Promise.
|
|
144
|
+
*/
|
|
145
|
+
async close() {
|
|
146
|
+
this.isOpen = false;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Opens the modal.
|
|
150
|
+
* @returns empty Promise.
|
|
151
|
+
*/
|
|
152
|
+
async open() {
|
|
153
|
+
this.isOpen = true;
|
|
154
|
+
}
|
|
155
|
+
get el() { return index.getElement(this); }
|
|
156
|
+
static get watchers() { return {
|
|
157
|
+
"isOpen": ["handleIsOpenChange"]
|
|
158
|
+
}; }
|
|
159
|
+
};
|
|
160
|
+
UofgModal.style = uofgModalCss;
|
|
161
|
+
|
|
162
|
+
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-
|
|
5
|
+
const index = require('./index-ff6a2049.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-
|
|
20
|
+
return index.bootstrapLazy([["uofg-alert.cjs",[[1,"uofg-alert"]]],["uofg-modal.cjs",[[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]}]]],["uofg-back-to-top_5.cjs",[[1,"uofg-header",{"pageTitle":[1,"page-title"],"pageUrl":[1,"page-url"],"isFullSize":[32],"pageSpecificContent":[32]},[[9,"resize","updateFullSize"]]],[1,"uofg-back-to-top",{"threshold":[2],"isVisible":[32]},[[9,"scroll","onScroll"]]],[1,"uofg-card",{"href":[1]}],[1,"uofg-footer"],[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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const WEB_ANIMATIONS_SUPPORTED = () => {
|
|
4
|
+
return typeof window !== 'undefined' && 'animate' in HTMLElement.prototype;
|
|
5
|
+
};
|
|
6
|
+
const PREFERS_REDUCED_MOTION = () => {
|
|
7
|
+
return typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
8
|
+
};
|
|
9
|
+
const getAllFocusableElements = (container) => {
|
|
10
|
+
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"])';
|
|
11
|
+
return Array.from(container.querySelectorAll(query));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.PREFERS_REDUCED_MOTION = PREFERS_REDUCED_MOTION;
|
|
15
|
+
exports.WEB_ANIMATIONS_SUPPORTED = WEB_ANIMATIONS_SUPPORTED;
|
|
16
|
+
exports.getAllFocusableElements = getAllFocusableElements;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"entries": [
|
|
3
3
|
"components/uofg-alert/uofg-alert.js",
|
|
4
4
|
"components/uofg-back-to-top/uofg-back-to-top.js",
|
|
5
|
+
"components/uofg-card/uofg-card.js",
|
|
5
6
|
"components/uofg-footer/uofg-footer.js",
|
|
6
7
|
"components/uofg-header/uofg-header.js",
|
|
7
8
|
"components/uofg-menu/uofg-menu.js",
|
|
@@ -1,12 +1,37 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
button {
|
|
6
|
+
border: none;
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
a {
|
|
12
|
+
color: inherit;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
ul {
|
|
17
|
+
list-style: none;
|
|
18
|
+
padding: 0;
|
|
19
|
+
margin: unset;
|
|
20
|
+
}
|
|
21
|
+
ul > li {
|
|
22
|
+
display: contents;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:focus-visible {
|
|
26
|
+
outline: 2px solid #ffc72a;
|
|
27
|
+
outline-offset: 0.5rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
1
30
|
:host {
|
|
2
31
|
display: block;
|
|
3
32
|
max-width: 100rem;
|
|
4
33
|
}
|
|
5
34
|
|
|
6
|
-
* {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
35
|
#uofg-alert {
|
|
11
36
|
display: flex;
|
|
12
37
|
flex-direction: column;
|
|
@@ -19,7 +44,7 @@
|
|
|
19
44
|
font-size: 2.25rem;
|
|
20
45
|
padding: 2rem;
|
|
21
46
|
color: white;
|
|
22
|
-
background-color: #
|
|
47
|
+
background-color: #c20430;
|
|
23
48
|
}
|
|
24
49
|
#uofg-alert-title > svg {
|
|
25
50
|
margin-right: 1rem;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
* {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
button {
|
|
6
|
+
border: none;
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
a {
|
|
12
|
+
color: inherit;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
ul {
|
|
17
|
+
list-style: none;
|
|
18
|
+
padding: 0;
|
|
19
|
+
margin: unset;
|
|
20
|
+
}
|
|
21
|
+
ul > li {
|
|
22
|
+
display: contents;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:focus-visible {
|
|
26
|
+
outline: 2px solid #ffc72a;
|
|
27
|
+
outline-offset: 0.5rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host {
|
|
31
|
+
display: block;
|
|
32
|
+
width: 300px;
|
|
33
|
+
margin: 1rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
#uofg-card {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
background-color: #f1f8fa;
|
|
40
|
+
font-size: 1.6rem;
|
|
41
|
+
border-radius: 5px;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
a#uofg-card {
|
|
46
|
+
border: 1px solid transparent;
|
|
47
|
+
transition-property: border-color;
|
|
48
|
+
transition-duration: 0.2s;
|
|
49
|
+
transition-timing-function: ease-in-out;
|
|
50
|
+
}
|
|
51
|
+
a#uofg-card:hover, a#uofg-card:focus, a#uofg-card:focus-within {
|
|
52
|
+
border-color: #69a3b9;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#uofg-card-img {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
align-items: center;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
#uofg-card-img > slot::slotted(img) {
|
|
62
|
+
width: 100%;
|
|
63
|
+
object-fit: cover;
|
|
64
|
+
transition-property: transform;
|
|
65
|
+
transition-duration: 0.2s;
|
|
66
|
+
transition-timing-function: ease-in-out;
|
|
67
|
+
}
|
|
68
|
+
a#uofg-card:hover #uofg-card-img > slot::slotted(img), a#uofg-card:focus #uofg-card-img > slot::slotted(img), a#uofg-card:focus-within #uofg-card-img > slot::slotted(img) {
|
|
69
|
+
transform: scale(1.1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#uofg-card-content {
|
|
73
|
+
padding: 1rem;
|
|
74
|
+
}
|
|
75
|
+
#uofg-card-content > slot[name=title]::slotted(*) {
|
|
76
|
+
font-size: 2.25rem;
|
|
77
|
+
font-weight: normal;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: 1rem 0;
|
|
80
|
+
}
|
|
81
|
+
#uofg-card-content > slot[name=subtitle]::slotted(*) {
|
|
82
|
+
font-size: 1.8rem;
|
|
83
|
+
font-weight: normal;
|
|
84
|
+
margin: 0;
|
|
85
|
+
padding: 1rem 0;
|
|
86
|
+
}
|
|
87
|
+
#uofg-card-content > slot[name=body]::slotted(*) {
|
|
88
|
+
font-size: 1.6rem;
|
|
89
|
+
font-weight: normal;
|
|
90
|
+
margin: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
#uofg-card-footer {
|
|
94
|
+
background-color: #bedae3;
|
|
95
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Fragment, h } from "@stencil/core";
|
|
2
|
+
export class UofgCard {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.href = undefined;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
const Body = () => (h(Fragment, null, h("div", { id: "uofg-card-img" }, h("slot", { name: "img" })), h("div", { id: "uofg-card-content" }, h("slot", { name: "title" }), h("slot", { name: "subtitle" }), h("slot", { name: "body" })), h("div", { id: "uofg-card-footer" }, h("slot", { name: "footer" }))));
|
|
8
|
+
return this.href ? (h("a", { href: this.href, id: "uofg-card" }, h(Body, null))) : (h("div", { id: "uofg-card" }, h(Body, null)));
|
|
9
|
+
}
|
|
10
|
+
static get is() { return "uofg-card"; }
|
|
11
|
+
static get encapsulation() { return "shadow"; }
|
|
12
|
+
static get originalStyleUrls() {
|
|
13
|
+
return {
|
|
14
|
+
"$": ["uofg-card.scss"]
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
static get styleUrls() {
|
|
18
|
+
return {
|
|
19
|
+
"$": ["uofg-card.css"]
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
static get properties() {
|
|
23
|
+
return {
|
|
24
|
+
"href": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"mutable": false,
|
|
27
|
+
"complexType": {
|
|
28
|
+
"original": "string",
|
|
29
|
+
"resolved": "string",
|
|
30
|
+
"references": {}
|
|
31
|
+
},
|
|
32
|
+
"required": false,
|
|
33
|
+
"optional": false,
|
|
34
|
+
"docs": {
|
|
35
|
+
"tags": [],
|
|
36
|
+
"text": "The URL the card should link to. If this property is set, the card will be rendered as an anchor (\"a\" tag)."
|
|
37
|
+
},
|
|
38
|
+
"attribute": "href",
|
|
39
|
+
"reflect": false
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
font-size: 1.6rem;
|
|
5
|
-
font-family: sans-serif;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
:focus-visible {
|
|
9
2
|
outline: 2px solid #ffc72a;
|
|
10
3
|
outline-offset: 0.5rem;
|
|
@@ -34,6 +27,13 @@ ul > li {
|
|
|
34
27
|
display: contents;
|
|
35
28
|
}
|
|
36
29
|
|
|
30
|
+
:host {
|
|
31
|
+
display: block;
|
|
32
|
+
width: 100%;
|
|
33
|
+
font-size: 1.6rem;
|
|
34
|
+
font-family: sans-serif;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
37
|
a {
|
|
38
38
|
display: flex;
|
|
39
39
|
align-items: center;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
:
|
|
2
|
-
|
|
1
|
+
:focus-visible {
|
|
2
|
+
outline: 2px solid #ffc72a;
|
|
3
|
+
outline-offset: 0.5rem;
|
|
3
4
|
}
|
|
4
5
|
|
|
5
6
|
* {
|
|
@@ -26,6 +27,10 @@ ul > li {
|
|
|
26
27
|
display: contents;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
:host {
|
|
31
|
+
height: auto !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
a {
|
|
30
35
|
display: flex;
|
|
31
36
|
align-items: center;
|
|
@@ -81,8 +86,8 @@ uofg-menu > [slot=content] {
|
|
|
81
86
|
z-index: 1;
|
|
82
87
|
min-width: 20rem;
|
|
83
88
|
right: 0;
|
|
84
|
-
background-color:
|
|
85
|
-
color:
|
|
89
|
+
background-color: white;
|
|
90
|
+
color: black;
|
|
86
91
|
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);
|
|
87
92
|
}
|
|
88
93
|
|
|
@@ -107,8 +112,8 @@ uofg-menu > [slot=content] {
|
|
|
107
112
|
|
|
108
113
|
#uofg-header-top-content-container {
|
|
109
114
|
height: 3.5rem;
|
|
110
|
-
background-color:
|
|
111
|
-
color:
|
|
115
|
+
background-color: white;
|
|
116
|
+
color: black;
|
|
112
117
|
z-index: 3;
|
|
113
118
|
}
|
|
114
119
|
#uofg-header-top-content-container > ul {
|
|
@@ -121,7 +126,7 @@ uofg-menu > [slot=content] {
|
|
|
121
126
|
padding: 0 1rem;
|
|
122
127
|
}
|
|
123
128
|
#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] {
|
|
124
|
-
background-color: #
|
|
129
|
+
background-color: #dddddd;
|
|
125
130
|
}
|
|
126
131
|
#uofg-header-top-content-container > uofg-menu {
|
|
127
132
|
height: 100%;
|
|
@@ -129,19 +134,19 @@ uofg-menu > [slot=content] {
|
|
|
129
134
|
#uofg-header-top-content-container > uofg-menu > [slot=button] {
|
|
130
135
|
padding: 0 1rem;
|
|
131
136
|
background-color: #ffc72a;
|
|
132
|
-
color:
|
|
137
|
+
color: black;
|
|
133
138
|
font-weight: bold;
|
|
134
139
|
}
|
|
135
140
|
#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] {
|
|
136
141
|
background-color: #ccc;
|
|
137
|
-
color:
|
|
142
|
+
color: black;
|
|
138
143
|
}
|
|
139
144
|
#uofg-header-top-content-container > uofg-menu > [slot=button][aria-expanded=true] > svg {
|
|
140
145
|
transform: rotate(180deg);
|
|
141
146
|
}
|
|
142
147
|
#uofg-header-top-content-container > uofg-menu > [slot=content] {
|
|
143
|
-
background-color: #
|
|
144
|
-
color:
|
|
148
|
+
background-color: #dddddd;
|
|
149
|
+
color: black;
|
|
145
150
|
}
|
|
146
151
|
#uofg-header-top-content-container > uofg-menu > [slot=content] a {
|
|
147
152
|
height: 100%;
|
|
@@ -154,8 +159,8 @@ uofg-menu > [slot=content] {
|
|
|
154
159
|
|
|
155
160
|
#uofg-header-main-content-container {
|
|
156
161
|
height: 5rem;
|
|
157
|
-
background-color:
|
|
158
|
-
color:
|
|
162
|
+
background-color: black;
|
|
163
|
+
color: white;
|
|
159
164
|
z-index: 2;
|
|
160
165
|
}
|
|
161
166
|
#uofg-header-main-content-container > * {
|
|
@@ -243,15 +248,15 @@ uofg-menu > [slot=content] {
|
|
|
243
248
|
#uofg-header-full-main-content > a:focus-visible,
|
|
244
249
|
#uofg-header-full-main-content > uofg-menu > [slot=button]:hover,
|
|
245
250
|
#uofg-header-full-main-content > uofg-menu > [slot=button]:focus-visible {
|
|
246
|
-
background-color: #
|
|
251
|
+
background-color: #333333;
|
|
247
252
|
color: #ffc72a;
|
|
248
253
|
}
|
|
249
254
|
#uofg-header-full-main-content > uofg-menu > [slot=button] {
|
|
250
255
|
color: #ffc72a;
|
|
251
256
|
}
|
|
252
257
|
#uofg-header-full-main-content > uofg-menu > [slot=content] {
|
|
253
|
-
color:
|
|
254
|
-
background-color:
|
|
258
|
+
color: black;
|
|
259
|
+
background-color: white;
|
|
255
260
|
padding: 2rem;
|
|
256
261
|
width: 35rem;
|
|
257
262
|
}
|
|
@@ -276,16 +281,16 @@ uofg-menu > [slot=content] {
|
|
|
276
281
|
#uofg-header-reduced-main-content > a:hover,
|
|
277
282
|
#uofg-header-reduced-main-content > a:focus-visible,
|
|
278
283
|
#uofg-header-reduced-main-content > a[aria-expanded=true] {
|
|
279
|
-
background-color:
|
|
280
|
-
color:
|
|
284
|
+
background-color: white;
|
|
285
|
+
color: black;
|
|
281
286
|
}
|
|
282
287
|
#uofg-header-reduced-main-content > uofg-menu {
|
|
283
288
|
position: static;
|
|
284
289
|
height: 100%;
|
|
285
290
|
}
|
|
286
291
|
#uofg-header-reduced-main-content > uofg-menu > [slot=content] {
|
|
287
|
-
background-color:
|
|
288
|
-
color:
|
|
292
|
+
background-color: white;
|
|
293
|
+
color: black;
|
|
289
294
|
width: 100%;
|
|
290
295
|
padding: 1rem 2rem 2rem;
|
|
291
296
|
}
|
|
@@ -337,12 +342,12 @@ uofg-menu > [slot=content] {
|
|
|
337
342
|
}
|
|
338
343
|
#uofg-header-main-menu uofg-menu.uofg-header-hello-you-menu > [slot=button] {
|
|
339
344
|
background-color: #ffc72a;
|
|
340
|
-
color:
|
|
345
|
+
color: black;
|
|
341
346
|
font-weight: bold;
|
|
342
347
|
}
|
|
343
348
|
#uofg-header-main-menu uofg-menu.uofg-header-hello-you-menu > [slot=content] {
|
|
344
349
|
background-color: rgba(0, 0, 0, 0.1);
|
|
345
|
-
color:
|
|
350
|
+
color: black;
|
|
346
351
|
}
|
|
347
352
|
#uofg-header-main-menu ul > li > a {
|
|
348
353
|
padding: 0.75rem;
|
|
@@ -359,8 +364,8 @@ uofg-menu > [slot=content] {
|
|
|
359
364
|
|
|
360
365
|
#uofg-header-sub-content-container {
|
|
361
366
|
height: 4rem;
|
|
362
|
-
background-color: #
|
|
363
|
-
color:
|
|
367
|
+
background-color: #dddddd;
|
|
368
|
+
color: black;
|
|
364
369
|
z-index: 1;
|
|
365
370
|
}
|
|
366
371
|
#uofg-header-sub-content-container #uofg-header-page-title {
|
|
@@ -380,12 +385,12 @@ uofg-menu > [slot=content] {
|
|
|
380
385
|
}
|
|
381
386
|
#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] {
|
|
382
387
|
background-color: #ffc72a;
|
|
383
|
-
color:
|
|
388
|
+
color: black;
|
|
384
389
|
}
|
|
385
390
|
#uofg-header-sub-content-container uofg-menu > [slot=content] {
|
|
386
391
|
position: absolute;
|
|
387
|
-
background-color: #
|
|
388
|
-
color:
|
|
392
|
+
background-color: #dddddd;
|
|
393
|
+
color: black;
|
|
389
394
|
}
|
|
390
395
|
#uofg-header-sub-content-container uofg-menu > [slot=content] > li:not(:last-child) > a {
|
|
391
396
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
@@ -405,7 +410,7 @@ uofg-menu > [slot=content] {
|
|
|
405
410
|
}
|
|
406
411
|
#uofg-header-sub-content-container a:hover, #uofg-header-sub-content-container a:focus-visible {
|
|
407
412
|
background-color: #ffc72a;
|
|
408
|
-
color:
|
|
413
|
+
color: black;
|
|
409
414
|
}
|
|
410
415
|
|
|
411
416
|
#uofg-header-full-sub-content,
|
|
@@ -441,8 +446,8 @@ uofg-menu > [slot=content] {
|
|
|
441
446
|
padding: 0 1.5rem;
|
|
442
447
|
}
|
|
443
448
|
#uofg-header-reduced-sub-content > uofg-menu > [slot=content] {
|
|
444
|
-
background-color:
|
|
445
|
-
color:
|
|
449
|
+
background-color: white;
|
|
450
|
+
color: black;
|
|
446
451
|
padding: 2rem;
|
|
447
452
|
overflow-y: auto;
|
|
448
453
|
max-height: calc(100vh - 5rem - 4rem);
|
|
@@ -464,7 +469,7 @@ uofg-menu > [slot=content] {
|
|
|
464
469
|
}
|
|
465
470
|
#uofg-header-reduced-sub-content > uofg-menu > [slot=content] a:hover, #uofg-header-reduced-sub-content > uofg-menu > [slot=content] a:focus-visible {
|
|
466
471
|
background-color: rgba(0, 0, 0, 0.1);
|
|
467
|
-
color:
|
|
472
|
+
color: black;
|
|
468
473
|
}
|
|
469
474
|
#uofg-header-reduced-sub-content > uofg-menu > [slot=content] uofg-menu {
|
|
470
475
|
height: auto;
|
|
@@ -479,7 +484,7 @@ uofg-menu > [slot=content] {
|
|
|
479
484
|
}
|
|
480
485
|
#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] {
|
|
481
486
|
background-color: rgba(0, 0, 0, 0.2);
|
|
482
|
-
color:
|
|
487
|
+
color: black;
|
|
483
488
|
}
|
|
484
489
|
#uofg-header-reduced-sub-content > uofg-menu > [slot=content] uofg-menu > [slot=button][aria-expanded=true] > svg {
|
|
485
490
|
transform: rotate(180deg);
|
|
@@ -66,9 +66,9 @@ ul > li {
|
|
|
66
66
|
font-size: 2rem;
|
|
67
67
|
line-height: 1;
|
|
68
68
|
/**
|
|
69
|
-
* @prop --uofg-modal-dismiss-color: The color of the dismiss button's icon (Default is
|
|
69
|
+
* @prop --uofg-modal-dismiss-color: The color of the dismiss button's icon (Default is white)
|
|
70
70
|
*/
|
|
71
|
-
color: var(--uofg-modal-dismiss-color,
|
|
71
|
+
color: var(--uofg-modal-dismiss-color, white);
|
|
72
72
|
z-index: 2;
|
|
73
73
|
}
|
|
74
74
|
#uofg-modal-dismiss > svg {
|
|
@@ -3,6 +3,8 @@ export { UofgAlert as UofgAlert } from '../types/components/uofg-alert/uofg-aler
|
|
|
3
3
|
export { defineCustomElement as defineCustomElementUofgAlert } from './uofg-alert';
|
|
4
4
|
export { UofgBackToTop as UofgBackToTop } from '../types/components/uofg-back-to-top/uofg-back-to-top';
|
|
5
5
|
export { defineCustomElement as defineCustomElementUofgBackToTop } from './uofg-back-to-top';
|
|
6
|
+
export { UofgCard as UofgCard } from '../types/components/uofg-card/uofg-card';
|
|
7
|
+
export { defineCustomElement as defineCustomElementUofgCard } from './uofg-card';
|
|
6
8
|
export { UofgFooter as UofgFooter } from '../types/components/uofg-footer/uofg-footer';
|
|
7
9
|
export { defineCustomElement as defineCustomElementUofgFooter } from './uofg-footer';
|
|
8
10
|
export { UofgHeader as UofgHeader } from '../types/components/uofg-header/uofg-header';
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { UofgAlert, defineCustomElement as defineCustomElementUofgAlert } from './uofg-alert.js';
|
|
3
3
|
export { UofgBackToTop, defineCustomElement as defineCustomElementUofgBackToTop } from './uofg-back-to-top.js';
|
|
4
|
+
export { UofgCard, defineCustomElement as defineCustomElementUofgCard } from './uofg-card.js';
|
|
4
5
|
export { UofgFooter, defineCustomElement as defineCustomElementUofgFooter } from './uofg-footer.js';
|
|
5
6
|
export { UofgHeader, defineCustomElement as defineCustomElementUofgHeader } from './uofg-header.js';
|
|
6
7
|
export { UofgMenu, defineCustomElement as defineCustomElementUofgMenu } from './uofg-menu.js';
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/clien
|
|
|
2
2
|
import { F as FontAwesomeIcon } from './font-awesome-icon.js';
|
|
3
3
|
import { f as faCircleExclamation } from './index2.js';
|
|
4
4
|
|
|
5
|
-
const uofgAlertCss = ":host{display:block;max-width:100rem}
|
|
5
|
+
const uofgAlertCss = "*{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}:focus-visible{outline:2px solid #ffc72a;outline-offset:0.5rem}:host{display:block;max-width:100rem}#uofg-alert{display:flex;flex-direction:column;font-size:2rem}#uofg-alert-title{display:flex;align-items:center;font-size:2.25rem;padding:2rem;color:white;background-color:#c20430}#uofg-alert-title>svg{margin-right:1rem;fill:currentColor;height:1.5em}#uofg-alert-body{display:flex;flex-direction:column;padding:1.5rem 2rem;background-color:white}#uofg-alert-body slot[name=subtitle]::slotted(*){font-size:2rem;margin-bottom:2rem;font-weight:bold}#uofg-alert-body slot[name=message]::slotted(*){font-size:1.6rem}#uofg-alert-footer{display:flex;padding:1rem 2rem;background-color:#dddddd;font-size:1.4rem}";
|
|
6
6
|
|
|
7
7
|
const UofgAlert$1 = /*@__PURE__*/ proxyCustomElement(class UofgAlert extends HTMLElement {
|
|
8
8
|
constructor() {
|