@illinois-toolkit/ilw-hero 1.1.1 → 1.3.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 +3 -1
- package/builder/ilw-hero.json +30 -11
- package/builder/versions/ilw-hero.1.0.json +140 -143
- package/builder/versions/ilw-hero.1.2.json +158 -0
- package/builder/versions/ilw-hero.1.3.json +167 -0
- package/dist/cdn/ilw-hero.css +1 -1
- package/dist/cdn/ilw-hero.js +44 -37
- package/dist/ilw-hero.css +1 -1
- package/dist/ilw-hero.js +23 -16
- package/dist/ilw-hero.styles.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/ilw-hero.css +78 -9
- package/src/ilw-hero.styles.ts +11 -4
- package/builder/versions/ilw-hero.1.0-beta.json +0 -146
- package/builder/versions/ilw-hero.1.1.json +0 -146
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"template": "1.2",
|
|
3
|
+
"id": "ilw-hero",
|
|
4
|
+
"notes": "",
|
|
5
|
+
"usejs": true,
|
|
6
|
+
"usecss": true,
|
|
7
|
+
"builder-information": {
|
|
8
|
+
"element-name": "ilw-hero",
|
|
9
|
+
"addon-html": "",
|
|
10
|
+
"parent-style": ""
|
|
11
|
+
},
|
|
12
|
+
"added-components": [],
|
|
13
|
+
"samples": [
|
|
14
|
+
{
|
|
15
|
+
"name": "default",
|
|
16
|
+
"description": "Default information with image",
|
|
17
|
+
"text": "<img src='https://picsum.photos/1920/1280' alt='' slot='background'><h1>Innovating solutions every year</h1><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "noimage",
|
|
21
|
+
"description": "No image",
|
|
22
|
+
"text": "<h1>Innovating solutions every year</h1><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "noheading",
|
|
26
|
+
"description": "No heading",
|
|
27
|
+
"text": "<p class='title'>Innovating solutions every year</p><ul class='ilw-buttons'><li><a href='#'>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#'>Link 3</a></li></ul>"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "video",
|
|
31
|
+
"description": "Video background",
|
|
32
|
+
"text": "<video slot='background' autoplay='' loop='' muted='' poster='https://cdn-e.education.illinois.edu/video/first_image.png'><source src='https://cdn-e.education.illinois.edu/video/homepage8.mp4' type='video/mp4'>Your browser does not support the video tag.</video><h2>Innovating solutions every year</h2><ul class='ilw-buttons'><li><a href='#''>Link 1</a></li><li><a href='#'>Link 2</a></li><li><a href='#''>Link 3</a></li></ul>"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"attributes-fixed": [],
|
|
36
|
+
"attributes-text": [],
|
|
37
|
+
"attributes": [
|
|
38
|
+
{
|
|
39
|
+
"name": "theme",
|
|
40
|
+
"description": "Color theme used",
|
|
41
|
+
"depreciated": false,
|
|
42
|
+
"values": [
|
|
43
|
+
"",
|
|
44
|
+
"blue",
|
|
45
|
+
"orange",
|
|
46
|
+
"white"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "align",
|
|
51
|
+
"description": "Text alignment, defaults to center",
|
|
52
|
+
"depreciated": false,
|
|
53
|
+
"values": [
|
|
54
|
+
"",
|
|
55
|
+
"top",
|
|
56
|
+
"bottom",
|
|
57
|
+
"left",
|
|
58
|
+
"right",
|
|
59
|
+
"top-left",
|
|
60
|
+
"top-right",
|
|
61
|
+
"bottom-left",
|
|
62
|
+
"bottom-right"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "focus",
|
|
67
|
+
"description": "Focus for the image, defaults to center",
|
|
68
|
+
"depreciated": false,
|
|
69
|
+
"values": [
|
|
70
|
+
"",
|
|
71
|
+
"top",
|
|
72
|
+
"bottom",
|
|
73
|
+
"left",
|
|
74
|
+
"right"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "width",
|
|
79
|
+
"description": "Whether or not this follows current borders or is full width",
|
|
80
|
+
"depreciated": false,
|
|
81
|
+
"values": [
|
|
82
|
+
"",
|
|
83
|
+
"full"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "shadow",
|
|
88
|
+
"description": "Whether or not to include a shadow",
|
|
89
|
+
"depreciated": false,
|
|
90
|
+
"values": [
|
|
91
|
+
"",
|
|
92
|
+
"true"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "shade",
|
|
97
|
+
"description": "Type of shading for the hero background",
|
|
98
|
+
"depreciated": false,
|
|
99
|
+
"values": [
|
|
100
|
+
"",
|
|
101
|
+
"full",
|
|
102
|
+
"directional"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "font",
|
|
107
|
+
"description": "Which type of font to use",
|
|
108
|
+
"depreciated": false,
|
|
109
|
+
"values": [
|
|
110
|
+
"",
|
|
111
|
+
"heading"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "collapse",
|
|
116
|
+
"description": "Whether or not to remove the image / background in mobile",
|
|
117
|
+
"depreciated": false,
|
|
118
|
+
"values": [
|
|
119
|
+
"",
|
|
120
|
+
"true"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "alwayson",
|
|
125
|
+
"description": "Whether or not to drop the text in mobile",
|
|
126
|
+
"depreciated": false,
|
|
127
|
+
"values": [
|
|
128
|
+
"",
|
|
129
|
+
"true"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"classes-fixed": [],
|
|
134
|
+
"classes": [],
|
|
135
|
+
"css-variables": [
|
|
136
|
+
{
|
|
137
|
+
"name": "--ilw-hero--height",
|
|
138
|
+
"depreciated": false,
|
|
139
|
+
"description": "Size of the hero image"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "--ilw-hero--font",
|
|
143
|
+
"depreciated": false,
|
|
144
|
+
"description": "Font for heading"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "--ilw-hero--background",
|
|
148
|
+
"depreciated": false,
|
|
149
|
+
"description": "Hex color for background"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "--ilw-hero--text-width",
|
|
153
|
+
"depreciated": false,
|
|
154
|
+
"description": "Text width for heading"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "--ilw-hero--shadow-color",
|
|
158
|
+
"depreciated": false,
|
|
159
|
+
"description": "Hex color for shadow in rgba format"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "--ilw-hero--text-color",
|
|
163
|
+
"depreciated": false,
|
|
164
|
+
"description": "Hex color for heading"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
package/dist/cdn/ilw-hero.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ilw-hero{--ilw-hero--height: 223px;--ilw-hero--font-style: var(--il-font-sans);--ilw-hero--font: 700 2.25rem/2.25rem var(--ilw-hero--font-style);--ilw-hero--background: var(--ilw-color--heading);--ilw-hero--text-color: var(--ilw-color--background);--ilw-hero--text-width: 40%;--ilw-hero--shadow-color: rgba(0, 0, 0, 1);--ilw-hero--background-tint: none}ilw-hero{display:block;container-type:inline-size}ilw-hero img,ilw-hero *[slot=background]{display:block;position:relative;width:100%;height:100%;object-fit:cover;object-position:center}ilw-hero h1,ilw-hero h2,ilw-hero h3,ilw-hero p.title{all:initial;font:var(--ilw-hero--font);color:var(--ilw-hero--text-color);text-shadow:2px 2px 2px var(--ilw-hero--shadow-color);text-align:inherit}ilw-hero[font=heading]{--ilw-hero--font-style: var(--il-font-heading)}ilw-hero[shade=full]{--ilw-hero--background-tint: rgba(19, 41, 75, .4)}ilw-hero[shade=full-black]{--ilw-hero--background-tint: rgba(0, 0, 0, .4)}ilw-hero[shade=directional],ilw-hero[shade=directional][align=center]{--ilw-hero--background-tint: radial-gradient(rgba(19, 41, 75, .6), rgba(0, 0, 0, 0))}ilw-hero[shade=directional][align=left]{--ilw-hero--background-tint: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=right]{--ilw-hero--background-tint: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=top]{--ilw-hero--background-tint: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=bottom]{--ilw-hero--background-tint: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=top-left]{--ilw-hero--background-tint: linear-gradient(to top left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=top-right]{--ilw-hero--background-tint: linear-gradient(to top right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=bottom-left]{--ilw-hero--background-tint: linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=bottom-right]{--ilw-hero--background-tint: linear-gradient(to bottom right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional-black],ilw-hero[shade=directional-black][align=center]{--ilw-hero--background-tint: radial-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0))}ilw-hero[shade=directional-black][align=left]{--ilw-hero--background-tint: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=right]{--ilw-hero--background-tint: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=top]{--ilw-hero--background-tint: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=bottom]{--ilw-hero--background-tint: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=top-left]{--ilw-hero--background-tint: linear-gradient(to top left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=top-right]{--ilw-hero--background-tint: linear-gradient(to top right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=bottom-left]{--ilw-hero--background-tint: linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=bottom-right]{--ilw-hero--background-tint: linear-gradient(to bottom right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade][theme=white]{--ilw-hero--background-tint: rgba(255, 255, 255, .4)}ilw-hero[theme=orange]{--ilw-hero--background: var(--ilw-color--orange--background);--ilw-hero--button-background-color: var(--ilw-color--orange--control-accent);--ilw-hero--focused-button-foreground-color: var(---ilw-color--orange--control-accent)}ilw-hero[theme=white]{--ilw-hero--background: var(--ilw-color--white--background);--ilw-hero--button-background-color: var(--ilw-color--white--control);--ilw-hero--button-foreground-color: var(--ilw-color--white--control-text);--ilw-hero--button-border-color: var(--ilw-color--white--control-text);--ilw-hero--focused-button-background-color: var(--ilw-color--white--control-text);--ilw-hero--focused-button-foreground-color: var(--ilw-color--white--control);--ilw-hero--focused-button-border-color: var(--ilw-color--white--control-text);--ilw-hero--text-color: var(--ilw-color--white--text);--ilw-hero--shadow-color: rgba(255, 255, 255, 1)}ilw-hero[focus=top] img{object-position:top}ilw-hero[focus=bottom] img{object-position:bottom}ilw-hero[focus=left] img{object-position:left}ilw-hero[focus=right] img{object-position:right}@media(min-width:576px){ilw-hero{--ilw-hero--height: 315px;--ilw-hero--font: 700 3rem/3rem var(--ilw-hero--font-style)}}@media(min-width:767px){ilw-hero{--ilw-hero--height: 557px;--ilw-hero--font: 700 4rem/4rem var(--ilw-hero--font-style)}ilw-hero[shadow] h1,ilw-hero[shadow] h2,ilw-hero[shadow] h3{background:radial-gradient(#000000e6,#0000001a);padding:1rem!important}ilw-hero[theme=white][shadow] h1,ilw-hero[theme=white][shadow] h2,ilw-hero[theme=white][shadow] h3{background:radial-gradient(#ffffffe6,#ffffff1a)}}@media(min-width:992px){ilw-hero{--ilw-hero--font: 700 4.5rem/4.5rem var(--ilw-hero--font-style)}}
|
package/dist/cdn/ilw-hero.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
6
|
+
const H = globalThis, D = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, L = Symbol(), W = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let Y = class {
|
|
8
8
|
constructor(t, e, i) {
|
|
9
9
|
if (this._$cssResult$ = !0, i !== L) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -32,7 +32,7 @@ const rt = (n) => new Y(typeof n == "string" ? n : n + "", void 0, L), ot = (n,
|
|
|
32
32
|
}, at = (n, t) => {
|
|
33
33
|
if (D) n.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const i = document.createElement("style"), s =
|
|
35
|
+
const i = document.createElement("style"), s = H.litNonce;
|
|
36
36
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, n.appendChild(i);
|
|
37
37
|
}
|
|
38
38
|
}, V = D ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
@@ -258,14 +258,14 @@ b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[E("elementProper
|
|
|
258
258
|
* Copyright 2017 Google LLC
|
|
259
259
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
260
260
|
*/
|
|
261
|
-
const I = globalThis, M = I.trustedTypes, J = M ? M.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, tt = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, et = "?" + g, gt = `<${et}>`,
|
|
261
|
+
const I = globalThis, M = I.trustedTypes, J = M ? M.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, tt = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, et = "?" + g, gt = `<${et}>`, v = document, C = () => v.createComment(""), U = (n) => n === null || typeof n != "object" && typeof n != "function", it = Array.isArray, _t = (n) => it(n) || typeof n?.[Symbol.iterator] == "function", j = `[
|
|
262
262
|
\f\r]`, S = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, K = /-->/g, F = />/g, m = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
263
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), G = /'/g, Q = /"/g, st = /^(?:script|style|textarea|title)$/i, mt = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), yt = mt(1), w = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), X = /* @__PURE__ */ new WeakMap(), y =
|
|
263
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), G = /'/g, Q = /"/g, st = /^(?:script|style|textarea|title)$/i, mt = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), yt = mt(1), w = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), X = /* @__PURE__ */ new WeakMap(), y = v.createTreeWalker(v, 129);
|
|
264
264
|
function nt(n, t) {
|
|
265
265
|
if (!Array.isArray(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
266
266
|
return J !== void 0 ? J.createHTML(t) : t;
|
|
267
267
|
}
|
|
268
|
-
const
|
|
268
|
+
const vt = (n, t) => {
|
|
269
269
|
const e = n.length - 1, i = [];
|
|
270
270
|
let s, r = t === 2 ? "<svg>" : "", o = S;
|
|
271
271
|
for (let l = 0; l < e; l++) {
|
|
@@ -282,7 +282,7 @@ class T {
|
|
|
282
282
|
let s;
|
|
283
283
|
this.parts = [];
|
|
284
284
|
let r = 0, o = 0;
|
|
285
|
-
const l = t.length - 1, a = this.parts, [c, p] =
|
|
285
|
+
const l = t.length - 1, a = this.parts, [c, p] = vt(t, e);
|
|
286
286
|
if (this.el = T.createElement(c, i), y.currentNode = this.el.content, e === 2) {
|
|
287
287
|
const h = this.el.content.firstChild;
|
|
288
288
|
h.replaceWith(...h.childNodes);
|
|
@@ -290,8 +290,8 @@ class T {
|
|
|
290
290
|
for (; (s = y.nextNode()) !== null && a.length < l; ) {
|
|
291
291
|
if (s.nodeType === 1) {
|
|
292
292
|
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(tt)) {
|
|
293
|
-
const $ = p[o++], f = s.getAttribute(h).split(g),
|
|
294
|
-
a.push({ type: 1, index: r, name:
|
|
293
|
+
const $ = p[o++], f = s.getAttribute(h).split(g), O = /([.?@])?(.*)/.exec($);
|
|
294
|
+
a.push({ type: 1, index: r, name: O[2], strings: f, ctor: O[1] === "." ? bt : O[1] === "?" ? wt : O[1] === "@" ? xt : z }), s.removeAttribute(h);
|
|
295
295
|
} else h.startsWith(g) && (a.push({ type: 6, index: r }), s.removeAttribute(h));
|
|
296
296
|
if (st.test(s.tagName)) {
|
|
297
297
|
const h = s.textContent.split(g), $ = h.length - 1;
|
|
@@ -310,7 +310,7 @@ class T {
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
static createElement(t, e) {
|
|
313
|
-
const i =
|
|
313
|
+
const i = v.createElement("template");
|
|
314
314
|
return i.innerHTML = t, i;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
@@ -320,7 +320,7 @@ function x(n, t, e = n, i) {
|
|
|
320
320
|
const r = U(t) ? void 0 : t._$litDirective$;
|
|
321
321
|
return s?.constructor !== r && (s?._$AO?.(!1), r === void 0 ? s = void 0 : (s = new r(n), s._$AT(n, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = s : e._$Cl = s), s !== void 0 && (t = x(n, s._$AS(n, t.values), s, i)), t;
|
|
322
322
|
}
|
|
323
|
-
class
|
|
323
|
+
class At {
|
|
324
324
|
constructor(t, e) {
|
|
325
325
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
326
326
|
}
|
|
@@ -331,24 +331,24 @@ class vt {
|
|
|
331
331
|
return this._$AM._$AU;
|
|
332
332
|
}
|
|
333
333
|
u(t) {
|
|
334
|
-
const { el: { content: e }, parts: i } = this._$AD, s = (t?.creationScope ??
|
|
334
|
+
const { el: { content: e }, parts: i } = this._$AD, s = (t?.creationScope ?? v).importNode(e, !0);
|
|
335
335
|
y.currentNode = s;
|
|
336
336
|
let r = y.nextNode(), o = 0, l = 0, a = i[0];
|
|
337
337
|
for (; a !== void 0; ) {
|
|
338
338
|
if (o === a.index) {
|
|
339
339
|
let c;
|
|
340
|
-
a.type === 2 ? c = new
|
|
340
|
+
a.type === 2 ? c = new k(r, r.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (c = new St(r, this, t)), this._$AV.push(c), a = i[++l];
|
|
341
341
|
}
|
|
342
342
|
o !== a?.index && (r = y.nextNode(), o++);
|
|
343
343
|
}
|
|
344
|
-
return y.currentNode =
|
|
344
|
+
return y.currentNode = v, s;
|
|
345
345
|
}
|
|
346
346
|
p(t) {
|
|
347
347
|
let e = 0;
|
|
348
348
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
class
|
|
351
|
+
class k {
|
|
352
352
|
get _$AU() {
|
|
353
353
|
return this._$AM?._$AU ?? this._$Cv;
|
|
354
354
|
}
|
|
@@ -376,13 +376,13 @@ class O {
|
|
|
376
376
|
this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
|
|
377
377
|
}
|
|
378
378
|
_(t) {
|
|
379
|
-
this._$AH !== d && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
379
|
+
this._$AH !== d && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(v.createTextNode(t)), this._$AH = t;
|
|
380
380
|
}
|
|
381
381
|
$(t) {
|
|
382
382
|
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = T.createElement(nt(i.h, i.h[0]), this.options)), i);
|
|
383
383
|
if (this._$AH?._$AD === s) this._$AH.p(e);
|
|
384
384
|
else {
|
|
385
|
-
const r = new
|
|
385
|
+
const r = new At(s, this), o = r.u(this.options);
|
|
386
386
|
r.p(e), this.T(o), this._$AH = r;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
@@ -394,7 +394,7 @@ class O {
|
|
|
394
394
|
it(this._$AH) || (this._$AH = [], this._$AR());
|
|
395
395
|
const e = this._$AH;
|
|
396
396
|
let i, s = 0;
|
|
397
|
-
for (const r of t) s === e.length ? e.push(i = new
|
|
397
|
+
for (const r of t) s === e.length ? e.push(i = new k(this.S(C()), this.S(C()), this, this.options)) : i = e[s], i._$AI(r), s++;
|
|
398
398
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
|
399
399
|
}
|
|
400
400
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -473,13 +473,13 @@ class St {
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
const Et = I.litHtmlPolyfillSupport;
|
|
476
|
-
Et?.(T,
|
|
476
|
+
Et?.(T, k), (I.litHtmlVersions ??= []).push("3.1.3");
|
|
477
477
|
const Pt = (n, t, e) => {
|
|
478
478
|
const i = e?.renderBefore ?? t;
|
|
479
479
|
let s = i._$litPart$;
|
|
480
480
|
if (s === void 0) {
|
|
481
481
|
const r = e?.renderBefore ?? null;
|
|
482
|
-
i._$litPart$ = s = new
|
|
482
|
+
i._$litPart$ = s = new k(t.insertBefore(C(), r), r, void 0, e ?? {});
|
|
483
483
|
}
|
|
484
484
|
return s._$AI(n), s;
|
|
485
485
|
};
|
|
@@ -529,7 +529,7 @@ const Ut = (n) => (t, e) => {
|
|
|
529
529
|
* Copyright 2017 Google LLC
|
|
530
530
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
531
531
|
*/
|
|
532
|
-
const Tt = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: B },
|
|
532
|
+
const Tt = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: B }, kt = (n = Tt, t, e) => {
|
|
533
533
|
const { kind: i, metadata: s } = e;
|
|
534
534
|
let r = globalThis.litPropertyMetadata.get(s);
|
|
535
535
|
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), r.set(e.name, n), i === "accessor") {
|
|
@@ -550,13 +550,13 @@ const Tt = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged:
|
|
|
550
550
|
}
|
|
551
551
|
throw Error("Unsupported decorator location: " + i);
|
|
552
552
|
};
|
|
553
|
-
function
|
|
554
|
-
return (t, e) => typeof e == "object" ?
|
|
553
|
+
function A(n) {
|
|
554
|
+
return (t, e) => typeof e == "object" ? kt(n, t, e) : ((i, s, r) => {
|
|
555
555
|
const o = s.hasOwnProperty(r);
|
|
556
556
|
return s.constructor.createProperty(r, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(s, r) : void 0;
|
|
557
557
|
})(n, t, e);
|
|
558
558
|
}
|
|
559
|
-
const
|
|
559
|
+
const Ot = ot`
|
|
560
560
|
|
|
561
561
|
.hero {
|
|
562
562
|
position: relative;
|
|
@@ -582,6 +582,14 @@ const Ht = ot`
|
|
|
582
582
|
background-color: var(--ilw-hero--background);
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
+
.background::after {
|
|
586
|
+
content: "";
|
|
587
|
+
position: absolute;
|
|
588
|
+
inset: 0;
|
|
589
|
+
background: var(--ilw-hero--background-tint);
|
|
590
|
+
pointer-events: none;
|
|
591
|
+
}
|
|
592
|
+
|
|
585
593
|
.always-over .background {
|
|
586
594
|
position: absolute;
|
|
587
595
|
width: 100%;
|
|
@@ -605,7 +613,7 @@ img {
|
|
|
605
613
|
background: var(--ilw-hero--background);
|
|
606
614
|
position: relative;
|
|
607
615
|
z-index: 100;
|
|
608
|
-
padding: 0
|
|
616
|
+
padding: 0 var(--ilw-margin--side);
|
|
609
617
|
}
|
|
610
618
|
|
|
611
619
|
.always-over .content-outer {
|
|
@@ -664,19 +672,18 @@ img {
|
|
|
664
672
|
flex-direction: column;
|
|
665
673
|
text-align: center;
|
|
666
674
|
align-items: center;
|
|
667
|
-
max-width: 1200px;
|
|
668
675
|
}
|
|
669
676
|
|
|
670
677
|
.content-inner.left {
|
|
671
678
|
text-align: left;
|
|
672
679
|
align-items: flex-start;
|
|
673
|
-
margin-left:
|
|
680
|
+
margin-left: 0;
|
|
674
681
|
}
|
|
675
682
|
|
|
676
683
|
.content-inner.right {
|
|
677
684
|
text-align: right;
|
|
678
685
|
align-items: flex-end;
|
|
679
|
-
margin-right:
|
|
686
|
+
margin-right: 0;
|
|
680
687
|
}
|
|
681
688
|
|
|
682
689
|
.content-inner.top {
|
|
@@ -722,10 +729,10 @@ img {
|
|
|
722
729
|
}
|
|
723
730
|
}
|
|
724
731
|
`;
|
|
725
|
-
var
|
|
732
|
+
var Ht = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, _ = (n, t, e, i) => {
|
|
726
733
|
for (var s = i > 1 ? void 0 : i ? Nt(t, e) : t, r = n.length - 1, o; r >= 0; r--)
|
|
727
734
|
(o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s);
|
|
728
|
-
return i && s &&
|
|
735
|
+
return i && s && Ht(t, e, s), s;
|
|
729
736
|
};
|
|
730
737
|
let u = class extends P {
|
|
731
738
|
constructor() {
|
|
@@ -749,27 +756,27 @@ let u = class extends P {
|
|
|
749
756
|
`;
|
|
750
757
|
}
|
|
751
758
|
};
|
|
752
|
-
u.styles =
|
|
759
|
+
u.styles = Ot;
|
|
753
760
|
_([
|
|
754
|
-
|
|
761
|
+
A({ type: String })
|
|
755
762
|
], u.prototype, "theme", 2);
|
|
756
763
|
_([
|
|
757
|
-
|
|
764
|
+
A({ type: String, attribute: "focus" })
|
|
758
765
|
], u.prototype, "focusType", 2);
|
|
759
766
|
_([
|
|
760
|
-
|
|
767
|
+
A({ type: Boolean })
|
|
761
768
|
], u.prototype, "shadow", 2);
|
|
762
769
|
_([
|
|
763
|
-
|
|
770
|
+
A({ type: Boolean })
|
|
764
771
|
], u.prototype, "collapse", 2);
|
|
765
772
|
_([
|
|
766
|
-
|
|
773
|
+
A({ type: Boolean })
|
|
767
774
|
], u.prototype, "alwayson", 2);
|
|
768
775
|
_([
|
|
769
|
-
|
|
776
|
+
A({ type: String })
|
|
770
777
|
], u.prototype, "align", 2);
|
|
771
778
|
_([
|
|
772
|
-
|
|
779
|
+
A({ type: String })
|
|
773
780
|
], u.prototype, "width", 2);
|
|
774
781
|
u = _([
|
|
775
782
|
Ut("ilw-hero")
|
package/dist/ilw-hero.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ilw-hero{--ilw-hero--height: 223px;--ilw-hero--font-style: var(--il-font-sans);--ilw-hero--font: 700 2.25rem/2.25rem var(--ilw-hero--font-style);--ilw-hero--background: var(--ilw-color--heading);--ilw-hero--text-color: var(--ilw-color--background);--ilw-hero--text-width: 40%;--ilw-hero--shadow-color: rgba(0, 0, 0, 1);--ilw-hero--background-tint: none}ilw-hero{display:block;container-type:inline-size}ilw-hero img,ilw-hero *[slot=background]{display:block;position:relative;width:100%;height:100%;object-fit:cover;object-position:center}ilw-hero h1,ilw-hero h2,ilw-hero h3,ilw-hero p.title{all:initial;font:var(--ilw-hero--font);color:var(--ilw-hero--text-color);text-shadow:2px 2px 2px var(--ilw-hero--shadow-color);text-align:inherit}ilw-hero[font=heading]{--ilw-hero--font-style: var(--il-font-heading)}ilw-hero[shade=full]{--ilw-hero--background-tint: rgba(19, 41, 75, .4)}ilw-hero[shade=full-black]{--ilw-hero--background-tint: rgba(0, 0, 0, .4)}ilw-hero[shade=directional],ilw-hero[shade=directional][align=center]{--ilw-hero--background-tint: radial-gradient(rgba(19, 41, 75, .6), rgba(0, 0, 0, 0))}ilw-hero[shade=directional][align=left]{--ilw-hero--background-tint: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=right]{--ilw-hero--background-tint: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=top]{--ilw-hero--background-tint: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=bottom]{--ilw-hero--background-tint: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=top-left]{--ilw-hero--background-tint: linear-gradient(to top left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=top-right]{--ilw-hero--background-tint: linear-gradient(to top right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=bottom-left]{--ilw-hero--background-tint: linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional][align=bottom-right]{--ilw-hero--background-tint: linear-gradient(to bottom right, rgba(0, 0, 0, 0), rgba(19, 41, 75, .6))}ilw-hero[shade=directional-black],ilw-hero[shade=directional-black][align=center]{--ilw-hero--background-tint: radial-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0))}ilw-hero[shade=directional-black][align=left]{--ilw-hero--background-tint: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=right]{--ilw-hero--background-tint: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=top]{--ilw-hero--background-tint: linear-gradient(to top, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=bottom]{--ilw-hero--background-tint: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=top-left]{--ilw-hero--background-tint: linear-gradient(to top left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=top-right]{--ilw-hero--background-tint: linear-gradient(to top right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=bottom-left]{--ilw-hero--background-tint: linear-gradient(to bottom left, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade=directional-black][align=bottom-right]{--ilw-hero--background-tint: linear-gradient(to bottom right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6))}ilw-hero[shade][theme=white]{--ilw-hero--background-tint: rgba(255, 255, 255, .4)}ilw-hero[theme=orange]{--ilw-hero--background: var(--ilw-color--orange--background);--ilw-hero--button-background-color: var(--ilw-color--orange--control-accent);--ilw-hero--focused-button-foreground-color: var(---ilw-color--orange--control-accent)}ilw-hero[theme=white]{--ilw-hero--background: var(--ilw-color--white--background);--ilw-hero--button-background-color: var(--ilw-color--white--control);--ilw-hero--button-foreground-color: var(--ilw-color--white--control-text);--ilw-hero--button-border-color: var(--ilw-color--white--control-text);--ilw-hero--focused-button-background-color: var(--ilw-color--white--control-text);--ilw-hero--focused-button-foreground-color: var(--ilw-color--white--control);--ilw-hero--focused-button-border-color: var(--ilw-color--white--control-text);--ilw-hero--text-color: var(--ilw-color--white--text);--ilw-hero--shadow-color: rgba(255, 255, 255, 1)}ilw-hero[focus=top] img{object-position:top}ilw-hero[focus=bottom] img{object-position:bottom}ilw-hero[focus=left] img{object-position:left}ilw-hero[focus=right] img{object-position:right}@media(min-width:576px){ilw-hero{--ilw-hero--height: 315px;--ilw-hero--font: 700 3rem/3rem var(--ilw-hero--font-style)}}@media(min-width:767px){ilw-hero{--ilw-hero--height: 557px;--ilw-hero--font: 700 4rem/4rem var(--ilw-hero--font-style)}ilw-hero[shadow] h1,ilw-hero[shadow] h2,ilw-hero[shadow] h3{background:radial-gradient(#000000e6,#0000001a);padding:1rem!important}ilw-hero[theme=white][shadow] h1,ilw-hero[theme=white][shadow] h2,ilw-hero[theme=white][shadow] h3{background:radial-gradient(#ffffffe6,#ffffff1a)}}@media(min-width:992px){ilw-hero{--ilw-hero--font: 700 4.5rem/4.5rem var(--ilw-hero--font-style)}}
|
package/dist/ilw-hero.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css as d, LitElement as c, html as g } from "lit";
|
|
2
|
-
import { property as
|
|
2
|
+
import { property as i, customElement as h } from "lit/decorators.js";
|
|
3
3
|
const u = d`
|
|
4
4
|
|
|
5
5
|
.hero {
|
|
@@ -26,6 +26,14 @@ const u = d`
|
|
|
26
26
|
background-color: var(--ilw-hero--background);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
.background::after {
|
|
30
|
+
content: "";
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset: 0;
|
|
33
|
+
background: var(--ilw-hero--background-tint);
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
29
37
|
.always-over .background {
|
|
30
38
|
position: absolute;
|
|
31
39
|
width: 100%;
|
|
@@ -49,7 +57,7 @@ img {
|
|
|
49
57
|
background: var(--ilw-hero--background);
|
|
50
58
|
position: relative;
|
|
51
59
|
z-index: 100;
|
|
52
|
-
padding: 0
|
|
60
|
+
padding: 0 var(--ilw-margin--side);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
.always-over .content-outer {
|
|
@@ -108,19 +116,18 @@ img {
|
|
|
108
116
|
flex-direction: column;
|
|
109
117
|
text-align: center;
|
|
110
118
|
align-items: center;
|
|
111
|
-
max-width: 1200px;
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
.content-inner.left {
|
|
115
122
|
text-align: left;
|
|
116
123
|
align-items: flex-start;
|
|
117
|
-
margin-left:
|
|
124
|
+
margin-left: 0;
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
.content-inner.right {
|
|
121
128
|
text-align: right;
|
|
122
129
|
align-items: flex-end;
|
|
123
|
-
margin-right:
|
|
130
|
+
margin-right: 0;
|
|
124
131
|
}
|
|
125
132
|
|
|
126
133
|
.content-inner.top {
|
|
@@ -166,10 +173,10 @@ img {
|
|
|
166
173
|
}
|
|
167
174
|
}
|
|
168
175
|
`;
|
|
169
|
-
var
|
|
170
|
-
for (var
|
|
171
|
-
(s = p[l]) && (
|
|
172
|
-
return r &&
|
|
176
|
+
var m = Object.defineProperty, x = Object.getOwnPropertyDescriptor, e = (p, o, a, r) => {
|
|
177
|
+
for (var n = r > 1 ? void 0 : r ? x(o, a) : o, l = p.length - 1, s; l >= 0; l--)
|
|
178
|
+
(s = p[l]) && (n = (r ? s(o, a, n) : s(n)) || n);
|
|
179
|
+
return r && n && m(o, a, n), n;
|
|
173
180
|
};
|
|
174
181
|
let t = class extends c {
|
|
175
182
|
constructor() {
|
|
@@ -195,25 +202,25 @@ let t = class extends c {
|
|
|
195
202
|
};
|
|
196
203
|
t.styles = u;
|
|
197
204
|
e([
|
|
198
|
-
|
|
205
|
+
i({ type: String })
|
|
199
206
|
], t.prototype, "theme", 2);
|
|
200
207
|
e([
|
|
201
|
-
|
|
208
|
+
i({ type: String, attribute: "focus" })
|
|
202
209
|
], t.prototype, "focusType", 2);
|
|
203
210
|
e([
|
|
204
|
-
|
|
211
|
+
i({ type: Boolean })
|
|
205
212
|
], t.prototype, "shadow", 2);
|
|
206
213
|
e([
|
|
207
|
-
|
|
214
|
+
i({ type: Boolean })
|
|
208
215
|
], t.prototype, "collapse", 2);
|
|
209
216
|
e([
|
|
210
|
-
|
|
217
|
+
i({ type: Boolean })
|
|
211
218
|
], t.prototype, "alwayson", 2);
|
|
212
219
|
e([
|
|
213
|
-
|
|
220
|
+
i({ type: String })
|
|
214
221
|
], t.prototype, "align", 2);
|
|
215
222
|
e([
|
|
216
|
-
|
|
223
|
+
i({ type: String })
|
|
217
224
|
], t.prototype, "width", 2);
|
|
218
225
|
t = e([
|
|
219
226
|
h("ilw-hero")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ilw-hero.styles.d.ts","sourceRoot":"","sources":["../src/ilw-hero.styles.ts"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"ilw-hero.styles.d.ts","sourceRoot":"","sources":["../src/ilw-hero.styles.ts"],"names":[],"mappings":";AAEA,wBA4KE"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@illinois-toolkit/ilw-hero",
|
|
3
3
|
"description": "Illinois Toolkit: The Hero Image component adds a large picture at the top of the page.",
|
|
4
|
+
"repository": "github:web-illinois/ilw-hero",
|
|
4
5
|
"private": false,
|
|
5
6
|
"license": "MIT",
|
|
6
|
-
"version": "1.
|
|
7
|
+
"version": "1.3.0",
|
|
7
8
|
"type": "module",
|
|
8
9
|
"files": [
|
|
9
10
|
"src/**",
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@illinois-toolkit/ilw-core": "^1.0.5",
|
|
40
|
-
"@playwright/test": "^1.
|
|
41
|
+
"@playwright/test": "^1.65.1",
|
|
41
42
|
"@vitest/browser": "^3.2.4",
|
|
42
43
|
"playwright": "^1.56.1",
|
|
43
44
|
"typescript": "^5.9.3",
|