@uoguelph/web-components 1.8.0-rc.0 → 1.9.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,340 +1,221 @@
1
- import { c as j, S as R, i as U, y as m, a as J, s as K, F as N, z as G, b as H, e as B, d as I, g as L, h as r, A as _, j as M, k as E, m as P, w as k, u as Q, l as V, n as W, t as v, o as A, p as X, q as Y, x as Z, B as C } from "./font-awesome-icon-B0B9COBP.js";
2
- import { t as q } from "./bundle-mjs-BpzLJ4dA.js";
3
- const x = (n) => Array.from(n.querySelectorAll('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"])'));
4
- function $(n) {
5
- let e, i, c, b, u, p, g, w, l, y, h;
6
- b = new N({ props: { icon: G } });
7
- const f = (
8
- /*#slots*/
9
- n[14].default
10
- ), a = H(
11
- f,
12
- n,
13
- /*$$scope*/
14
- n[13],
15
- null
16
- );
17
- return {
18
- c() {
19
- e = B("div"), i = B("div"), c = B("button"), I(b.$$.fragment), u = L(), a && a.c(), r(c, "class", "absolute right-8 top-8 z-[2] flex h-12 w-12 items-center justify-center border-0 bg-transparent text-3xl p-2 text-[var(--uofg-modal-dismiss-color,white)]"), r(c, "part", "dismiss-button"), r(c, "aria-label", "Close modal"), r(i, "part", "content"), r(i, "class", p = q(
20
- "z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none",
21
- /*isOpen*/
22
- n[0] && "visible opacity-100",
23
- /*isOpen*/
24
- n[0] && /*centered*/
25
- n[3] && "translate-y-[calc(-50%_-_50px)]",
26
- (!/*isOpen*/
27
- n[0] && !/*centered*/
28
- n[3] || /*isOpen*/
29
- n[0] && /*centered*/
30
- n[3]) && "translate-y-[-50px]"
31
- )), r(e, "class", "fixed left-0 top-0 z-[1000] flex h-screen w-screen bg-black bg-opacity-50 transition-[opacity,visibility]"), r(e, "role", g = /*alertDialog*/
32
- n[5] ? "alertdialog" : "dialog"), r(e, "aria-modal", w = /*isOpen*/
33
- n[0] ? "true" : ""), r(
34
- e,
35
- "aria-label",
36
- /*label*/
37
- n[4]
38
- ), r(e, "tabindex", -1), _(
39
- e,
40
- "visible",
41
- /*isOpen*/
42
- n[0]
43
- ), _(
44
- e,
45
- "opacity-100",
46
- /*isOpen*/
47
- n[0]
48
- ), _(e, "invisible", !/*isOpen*/
49
- n[0]), _(e, "opacity-0", !/*isOpen*/
50
- n[0]);
51
- },
52
- m(s, o) {
53
- M(s, e, o), E(e, i), E(i, c), P(b, c, null), n[15](c), E(i, u), a && a.m(i, null), n[17](e), l = !0, y || (h = [
54
- k(
55
- c,
56
- "click",
57
- /*click_handler*/
58
- n[16]
59
- ),
60
- k(
61
- e,
62
- "click",
63
- /*handleOnClick*/
64
- n[6]
65
- ),
66
- k(
67
- e,
68
- "keyup",
69
- /*handleKeyUp*/
70
- n[7]
71
- ),
72
- k(
73
- e,
74
- "focusout",
75
- /*handleFocusOut*/
76
- n[8]
77
- )
78
- ], y = !0);
79
- },
80
- p(s, [o]) {
81
- a && a.p && (!l || o & /*$$scope*/
82
- 8192) && Q(
83
- a,
84
- f,
85
- s,
86
- /*$$scope*/
87
- s[13],
88
- l ? W(
89
- f,
90
- /*$$scope*/
91
- s[13],
92
- o,
93
- null
94
- ) : V(
95
- /*$$scope*/
96
- s[13]
97
- ),
98
- null
99
- ), (!l || o & /*isOpen, centered*/
100
- 9 && p !== (p = q(
101
- "z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none",
102
- /*isOpen*/
103
- s[0] && "visible opacity-100",
104
- /*isOpen*/
105
- s[0] && /*centered*/
106
- s[3] && "translate-y-[calc(-50%_-_50px)]",
107
- (!/*isOpen*/
108
- s[0] && !/*centered*/
109
- s[3] || /*isOpen*/
110
- s[0] && /*centered*/
111
- s[3]) && "translate-y-[-50px]"
112
- ))) && r(i, "class", p), (!l || o & /*alertDialog*/
113
- 32 && g !== (g = /*alertDialog*/
114
- s[5] ? "alertdialog" : "dialog")) && r(e, "role", g), (!l || o & /*isOpen*/
115
- 1 && w !== (w = /*isOpen*/
116
- s[0] ? "true" : "")) && r(e, "aria-modal", w), (!l || o & /*label*/
117
- 16) && r(
118
- e,
119
- "aria-label",
120
- /*label*/
121
- s[4]
122
- ), (!l || o & /*isOpen*/
123
- 1) && _(
124
- e,
125
- "visible",
126
- /*isOpen*/
127
- s[0]
128
- ), (!l || o & /*isOpen*/
129
- 1) && _(
130
- e,
131
- "opacity-100",
132
- /*isOpen*/
133
- s[0]
134
- ), (!l || o & /*isOpen*/
135
- 1) && _(e, "invisible", !/*isOpen*/
136
- s[0]), (!l || o & /*isOpen*/
137
- 1) && _(e, "opacity-0", !/*isOpen*/
138
- s[0]);
139
- },
140
- i(s) {
141
- l || (v(b.$$.fragment, s), v(a, s), l = !0);
142
- },
143
- o(s) {
144
- A(b.$$.fragment, s), A(a, s), l = !1;
145
- },
146
- d(s) {
147
- s && X(e), Y(b), n[15](null), a && a.d(s), n[17](null), y = !1, Z(h);
148
- }
149
- };
1
+ import { z as q, A as D, B as F, C as T, S as z, l as j, c as R, p as U, a as l, D as _, E as y, F as G, b as J, d as K, e as L, f as M, j as O, G as N, h as o, i as Y, k as H, t as v, s as I, u as P, w as Q, x as V, r as x } from "./font-awesome-icon-tL6xr2rJ.js";
2
+ import { a as W } from "./slot-dkmGAqBq.js";
3
+ import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
4
+ function E(a, t) {
5
+ return a === t || (a == null ? void 0 : a[z]) === t;
150
6
  }
151
- function ee(n, e, i) {
152
- let { $$slots: c = {}, $$scope: b } = e, { isOpen: u } = e, { centered: p } = e, { autoOpen: g } = e, { label: w } = e, { alertDialog: l } = e, { staticBackdrop: y } = e, { dismissButton: h } = e, { container: f } = e, { el: a } = e, { inertElements: s } = e;
153
- const o = (t) => {
154
- y && t.target === t.currentTarget && i(0, u = !1);
155
- }, D = (t) => {
156
- t.key === "Escape" && i(0, u = !1);
157
- }, S = (t) => {
158
- var O;
159
- if (u && !f.contains(t.relatedTarget) && !a.contains(t.relatedTarget))
160
- if (t.preventDefault(), t.target === h) {
161
- const d = x(a);
162
- (O = d[d.length - 1]) == null || O.focus();
163
- } else
164
- h.focus();
165
- };
166
- function F(t) {
167
- C[t ? "unshift" : "push"](() => {
168
- h = t, i(2, h);
169
- });
170
- }
171
- const z = () => i(0, u = !1);
172
- function T(t) {
173
- C[t ? "unshift" : "push"](() => {
174
- f = t, i(1, f);
175
- });
176
- }
177
- return n.$$set = (t) => {
178
- "isOpen" in t && i(0, u = t.isOpen), "centered" in t && i(3, p = t.centered), "autoOpen" in t && i(10, g = t.autoOpen), "label" in t && i(4, w = t.label), "alertDialog" in t && i(5, l = t.alertDialog), "staticBackdrop" in t && i(11, y = t.staticBackdrop), "dismissButton" in t && i(2, h = t.dismissButton), "container" in t && i(1, f = t.container), "el" in t && i(12, a = t.el), "inertElements" in t && i(9, s = t.inertElements), "$$scope" in t && i(13, b = t.$$scope);
179
- }, n.$$.update = () => {
180
- if (n.$$.dirty & /*autoOpen*/
181
- 1024 && g && i(0, u = !0), n.$$.dirty & /*isOpen, container, el, inertElements*/
182
- 4611) {
183
- if (u) {
7
+ function B(a = {}, t, s, c) {
8
+ return q(() => {
9
+ var i, r;
10
+ return D(() => {
11
+ i = r, r = [], F(() => {
12
+ a !== s(...r) && (t(a, ...r), i && E(s(...i), a) && t(null, ...i));
13
+ });
14
+ }), () => {
15
+ T(() => {
16
+ r && E(s(...r), a) && t(null, ...r);
17
+ });
18
+ };
19
+ }), a;
20
+ }
21
+ const Z = (a) => Array.from(a.querySelectorAll('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"])')), $ = (a, t, s) => {
22
+ !t() && a.target === a.currentTarget && s(!1);
23
+ }, ee = (a, t) => {
24
+ a.key === "Escape" && t(!1);
25
+ }, te = (a, t, s, c, i) => {
26
+ var r;
27
+ if (t() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
28
+ if (a.preventDefault(), a.target === i()) {
29
+ const d = Z(c());
30
+ (r = d[d.length - 1]) == null || r.focus();
31
+ } else
32
+ i().focus();
33
+ };
34
+ var ae = (a, t) => t(!1), se = M('<div class="fixed left-0 top-0 z-[1000] flex h-screen w-screen bg-black bg-opacity-50 transition-[opacity,visibility]"><div part="content"><button class="absolute right-0 top-0 -translate-x-1/2 translate-y-1/2 z-[2] flex aspect-square w-8 items-center justify-center text-white text-lg transition-colors bg-black hover:bg-red focus:bg-red rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
35
+ function ne(a, t) {
36
+ U(t, !0);
37
+ let s = l(t, "isOpen", 15), c = l(t, "centered", 7), i = l(t, "autoOpen", 7), r = l(t, "label", 7), d = l(t, "alertDialog", 7), k = l(t, "staticBackdrop", 7), m = l(t, "dismissButton", 7), f = l(t, "container", 7), b = l(t, "el", 7), p = l(t, "inertElements", 7);
38
+ _(() => {
39
+ i() && s(!0);
40
+ }), _(() => {
41
+ if (s()) {
42
+ window.requestAnimationFrame(() => {
184
43
  window.requestAnimationFrame(() => {
185
44
  window.requestAnimationFrame(() => {
186
- window.requestAnimationFrame(() => {
187
- f.focus();
188
- });
45
+ f().focus();
189
46
  });
190
47
  });
191
- let t = a;
192
- for (; t !== null && t !== document.body; ) {
193
- const O = t.parentElement;
194
- if (O === null) {
195
- const d = t.getRootNode();
196
- if (d instanceof ShadowRoot) {
197
- t = d.host;
198
- continue;
199
- }
48
+ });
49
+ let e = b();
50
+ for (; e !== null && e !== document.body; ) {
51
+ const h = e.parentElement;
52
+ if (h === null) {
53
+ const u = e.getRootNode();
54
+ if (u instanceof ShadowRoot) {
55
+ e = u.host;
56
+ continue;
200
57
  }
201
- if (O !== null)
202
- for (const d of O.children)
203
- d !== t && !d.inert && (d.inert = !0, s.push(d));
204
- t = O, a.dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
205
58
  }
206
- } else {
207
- for (const t of s)
208
- t.removeAttribute("inert");
209
- i(9, s = []), a.dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
59
+ if (h !== null)
60
+ for (const u of h.children)
61
+ u !== e && !u.inert && (u.inert = !0, p().push(u));
62
+ e = h;
210
63
  }
211
- document.body.style.overflow = u ? "hidden" : "";
64
+ b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
65
+ } else {
66
+ for (const e of p())
67
+ e.removeAttribute("inert");
68
+ p([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
212
69
  }
213
- }, [
214
- u,
215
- f,
216
- h,
217
- p,
218
- w,
219
- l,
220
- o,
221
- D,
222
- S,
70
+ document.body.style.overflow = s() ? "hidden" : "";
71
+ });
72
+ var n = se();
73
+ y(n, "tabindex", -1), n.__click = [$, k, s], n.__keyup = [ee, s], n.__focusout = [
74
+ te,
223
75
  s,
224
- g,
225
- y,
226
- a,
76
+ f,
227
77
  b,
228
- c,
229
- F,
230
- z,
231
- T
78
+ m
232
79
  ];
80
+ var w = O(n);
81
+ const A = Q(() => V(X("z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "translate-y-[calc(-50%_-_50px)] top-1/2", s() && c() && "translate-y-[-50%] top-1/2")));
82
+ var g = O(w);
83
+ g.__click = [ae, s];
84
+ var C = O(g);
85
+ G(C, { icon: N }), x(g), B(g, (e) => m(e), () => m());
86
+ var S = H(g, 2);
87
+ return W(S, t, "default", {}), x(w), x(n), B(n, (e) => f(e), () => f()), J(() => {
88
+ y(n, "role", d() ? "alertdialog" : "dialog"), y(n, "aria-modal", s() ? "true" : ""), y(n, "aria-label", r()), v(n, "visible", s()), v(n, "opacity-100", s()), v(n, "invisible", !s()), v(n, "opacity-0", !s()), I(w, P(A));
89
+ }), K(a, n), L({
90
+ get isOpen() {
91
+ return s();
92
+ },
93
+ set isOpen(e) {
94
+ s(e), o();
95
+ },
96
+ get centered() {
97
+ return c();
98
+ },
99
+ set centered(e) {
100
+ c(e), o();
101
+ },
102
+ get autoOpen() {
103
+ return i();
104
+ },
105
+ set autoOpen(e) {
106
+ i(e), o();
107
+ },
108
+ get label() {
109
+ return r();
110
+ },
111
+ set label(e) {
112
+ r(e), o();
113
+ },
114
+ get alertDialog() {
115
+ return d();
116
+ },
117
+ set alertDialog(e) {
118
+ d(e), o();
119
+ },
120
+ get staticBackdrop() {
121
+ return k();
122
+ },
123
+ set staticBackdrop(e) {
124
+ k(e), o();
125
+ },
126
+ get dismissButton() {
127
+ return m();
128
+ },
129
+ set dismissButton(e) {
130
+ m(e), o();
131
+ },
132
+ get container() {
133
+ return f();
134
+ },
135
+ set container(e) {
136
+ f(e), o();
137
+ },
138
+ get el() {
139
+ return b();
140
+ },
141
+ set el(e) {
142
+ b(e), o();
143
+ },
144
+ get inertElements() {
145
+ return p();
146
+ },
147
+ set inertElements(e) {
148
+ p(e), o();
149
+ }
150
+ });
233
151
  }
234
- class te extends R {
235
- constructor(e) {
236
- super(), U(this, e, ee, $, K, {
237
- isOpen: 0,
238
- centered: 3,
239
- autoOpen: 10,
240
- label: 4,
241
- alertDialog: 5,
242
- staticBackdrop: 11,
243
- dismissButton: 2,
244
- container: 1,
245
- el: 12,
246
- inertElements: 9
247
- });
248
- }
249
- get isOpen() {
250
- return this.$$.ctx[0];
251
- }
252
- set isOpen(e) {
253
- this.$$set({ isOpen: e }), m();
254
- }
255
- get centered() {
256
- return this.$$.ctx[3];
257
- }
258
- set centered(e) {
259
- this.$$set({ centered: e }), m();
260
- }
261
- get autoOpen() {
262
- return this.$$.ctx[10];
263
- }
264
- set autoOpen(e) {
265
- this.$$set({ autoOpen: e }), m();
266
- }
267
- get label() {
268
- return this.$$.ctx[4];
269
- }
270
- set label(e) {
271
- this.$$set({ label: e }), m();
272
- }
273
- get alertDialog() {
274
- return this.$$.ctx[5];
275
- }
276
- set alertDialog(e) {
277
- this.$$set({ alertDialog: e }), m();
278
- }
279
- get staticBackdrop() {
280
- return this.$$.ctx[11];
281
- }
282
- set staticBackdrop(e) {
283
- this.$$set({ staticBackdrop: e }), m();
284
- }
285
- get dismissButton() {
286
- return this.$$.ctx[2];
287
- }
288
- set dismissButton(e) {
289
- this.$$set({ dismissButton: e }), m();
290
- }
291
- get container() {
292
- return this.$$.ctx[1];
293
- }
294
- set container(e) {
295
- this.$$set({ container: e }), m();
296
- }
297
- get el() {
298
- return this.$$.ctx[12];
299
- }
300
- set el(e) {
301
- this.$$set({ el: e }), m();
302
- }
303
- get inertElements() {
304
- return this.$$.ctx[9];
305
- }
306
- set inertElements(e) {
307
- this.$$set({ inertElements: e }), m();
308
- }
309
- }
310
- customElements.define("uofg-modal", j(te, { isOpen: {}, centered: { reflect: !0, type: "Boolean", attribute: "centered" }, autoOpen: { reflect: !0, type: "Boolean", attribute: "auto-open" }, label: { reflect: !0, type: "String", attribute: "label" }, alertDialog: { reflect: !0, type: "String", attribute: "alert-dialog" }, staticBackdrop: { reflect: !0, type: "Boolean", attribute: "static-backdrop" }, dismissButton: {}, container: {}, el: {}, inertElements: {} }, ["default"], [], !0, (n) => class extends n {
311
- constructor() {
312
- super(), J(this.shadowRoot), this.el = this, this.inertElements = [];
313
- }
314
- connectedCallback() {
315
- super.connectedCallback();
316
- }
317
- disconnectedCallback() {
318
- super.disconnectedCallback();
319
- for (const e of this.inertElements)
320
- e.removeAttribute("inert");
321
- }
322
- getState() {
323
- return this.isOpen;
324
- }
325
- setState(e) {
326
- this.isOpen = e;
327
- }
328
- toggle() {
329
- return this.isOpen = !this.isOpen, this.isOpen;
330
- }
331
- close() {
332
- this.isOpen = !1;
333
- }
334
- open() {
335
- this.isOpen = !0;
152
+ j(["click", "keyup", "focusout"]);
153
+ customElements.define("uofg-modal", R(
154
+ ne,
155
+ {
156
+ label: {
157
+ attribute: "label",
158
+ reflect: !0,
159
+ type: "String"
160
+ },
161
+ alertDialog: {
162
+ attribute: "alert-dialog",
163
+ reflect: !0,
164
+ type: "String"
165
+ },
166
+ centered: {
167
+ attribute: "centered",
168
+ reflect: !0,
169
+ type: "Boolean"
170
+ },
171
+ autoOpen: {
172
+ attribute: "auto-open",
173
+ reflect: !0,
174
+ type: "Boolean"
175
+ },
176
+ staticBackdrop: {
177
+ attribute: "static-backdrop",
178
+ reflect: !0,
179
+ type: "Boolean"
180
+ },
181
+ isOpen: {},
182
+ dismissButton: {},
183
+ container: {},
184
+ el: {},
185
+ inertElements: {}
186
+ },
187
+ ["default"],
188
+ [],
189
+ !0,
190
+ (a) => class extends a {
191
+ constructor() {
192
+ super(), Y(this.shadowRoot), this.el = this, this.inertElements = [];
193
+ }
194
+ connectedCallback() {
195
+ super.connectedCallback();
196
+ }
197
+ disconnectedCallback() {
198
+ super.disconnectedCallback();
199
+ for (const t of this.inertElements)
200
+ t.removeAttribute("inert");
201
+ }
202
+ getState() {
203
+ return this.isOpen;
204
+ }
205
+ setState(t) {
206
+ this.isOpen = t;
207
+ }
208
+ toggle() {
209
+ return this.isOpen = !this.isOpen, this.isOpen;
210
+ }
211
+ close() {
212
+ this.isOpen = !1;
213
+ }
214
+ open() {
215
+ this.isOpen = !0;
216
+ }
336
217
  }
337
- }));
218
+ ));
338
219
  export {
339
- te as default
220
+ ne as default
340
221
  };
@@ -1 +1 @@
1
- :root{font-size:62.5%}body{font-size:1.6rem;font-family:sans-serif;margin:0;padding:0}uofg-header{display:block;width:100%}uofg-header *{display:none}uofg-header:defined{height:-moz-fit-content!important;height:fit-content!important}uofg-header:not(:defined){height:5rem!important;background-color:#000}@media screen and (min-width: 1024px){uofg-header:not(:defined){height:14rem!important}}uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:10rem!important}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:18rem!important}}uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:11.5rem!important}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:14rem!important}}uofg-footer{display:block}uofg-modal{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-alert{display:block;max-width:100rem}
1
+ :root{font-size:62.5%}body{font-size:1.6rem;margin:0;padding:0}uofg-header{display:block;width:100%}uofg-header *{display:none}uofg-header:defined{height:-moz-fit-content!important;height:fit-content!important}uofg-header:not(:defined){height:5rem!important;background-color:#000}@media screen and (min-width: 1024px){uofg-header:not(:defined){height:14rem!important;background:linear-gradient(180deg,#fff,#fff 28%,#000 28%,#000)}}uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:10rem!important;background:linear-gradient(0deg,#ddd,#ddd 50%,#000 50%,#000)}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:18rem!important;background:linear-gradient(180deg,#fff,#fff 22%,#000 22%,#000 78%,#ddd 78%,#ddd)}}uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:11.5rem!important}@media screen and (min-width: 1024px){uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:14rem!important}}uofg-footer{display:block}uofg-modal{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-alert{display:block;max-width:100rem}
@@ -0,0 +1,25 @@
1
+ import { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-tL6xr2rJ.js";
2
+ function m(a, e, c = e) {
3
+ var u = a === "x", s = () => n(() => {
4
+ r = !0, clearTimeout(t), t = setTimeout(l, 100), c(window[u ? "scrollX" : "scrollY"]);
5
+ });
6
+ addEventListener("scroll", s, {
7
+ passive: !0
8
+ });
9
+ var r = !1, t, l = () => {
10
+ r = !1;
11
+ }, i = !0;
12
+ w(() => {
13
+ var o = e();
14
+ i ? i = !1 : !r && o != null && (r = !0, clearTimeout(t), scrollTo(window.scrollX, o), t = setTimeout(l, 100));
15
+ }), d(s), f(() => {
16
+ removeEventListener("scroll", s);
17
+ });
18
+ }
19
+ function T(a, e) {
20
+ v(window, ["resize"], () => n(() => e(window[a])));
21
+ }
22
+ export {
23
+ T as a,
24
+ m as b
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uoguelph/web-components",
3
- "version": "1.8.0-rc.0",
3
+ "version": "1.9.0-rc.1",
4
4
  "description": "University of Guelph Web Components Library",
5
5
  "module": "dist/uofg-web-components/uofg-web-components.esm.js",
6
6
  "type": "module",
@@ -12,26 +12,41 @@
12
12
  "dev": "vite",
13
13
  "build": "vite build",
14
14
  "format": "npx prettier --write .",
15
- "prepublishOnly": "npm run build && npmignore --auto"
15
+ "prepublishOnly": "npm run build && npmignore --auto",
16
+ "storybook": "storybook dev -p 6006",
17
+ "build-storybook": "storybook build",
18
+ "chromatic": "export $(cat .env | xargs) && npx chromatic --project-token=$CHROMACTIC_PROJECT_TOKEN"
16
19
  },
17
20
  "devDependencies": {
21
+ "@chromatic-com/storybook": "^3.2.4",
18
22
  "@fortawesome/free-brands-svg-icons": "^6.4.0",
19
23
  "@fortawesome/free-regular-svg-icons": "^6.4.0",
20
24
  "@fortawesome/free-solid-svg-icons": "^6.4.0",
21
- "@sveltejs/vite-plugin-svelte": "^3.0.2",
25
+ "@storybook/addon-a11y": "^8.5.0",
26
+ "@storybook/addon-essentials": "^8.5.0",
27
+ "@storybook/addon-interactions": "^8.5.0",
28
+ "@storybook/addon-links": "^8.5.0",
29
+ "@storybook/addon-svelte-csf": "^5.0.0-next.23",
30
+ "@storybook/blocks": "^8.5.0",
31
+ "@storybook/svelte": "^8.5.0",
32
+ "@storybook/svelte-vite": "^8.5.0",
33
+ "@storybook/test": "^8.5.0",
34
+ "@sveltejs/vite-plugin-svelte": "^4.0.0",
22
35
  "autoprefixer": "^10.4.18",
23
36
  "eslint": "^8.57.0",
24
- "eslint-plugin-svelte": "^2.35.1",
37
+ "eslint-plugin-storybook": "^0.11.2",
38
+ "eslint-plugin-svelte": "^2.45.1",
25
39
  "npmignore": "^0.3.1",
26
40
  "postcss": "^8.4.35",
27
41
  "prettier": "^3.3.2",
28
- "prettier-plugin-svelte": "^3.2.4",
42
+ "prettier-plugin-svelte": "^3.2.6",
29
43
  "prettier-plugin-tailwindcss": "^0.5.12",
30
- "svelte": "^4.2.12",
31
- "svelte-check": "^3.6.6",
44
+ "storybook": "^8.4.0",
45
+ "svelte": "^5.0.0",
46
+ "svelte-check": "^4.0.0",
32
47
  "tailwind-merge": "^2.3.0",
33
48
  "tailwindcss": "^3.4.1",
34
- "vite": "^5.1.6",
49
+ "vite": "^5.4.4",
35
50
  "vite-plugin-full-reload": "^1.1.0"
36
51
  },
37
52
  "publishConfig": {