@uoguelph/react-components 1.10.0-rc.1 → 1.10.0-rc.3
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/dist/components/toaster/toaster.d.ts +19 -5
- package/dist/dismissible-alert.js +82 -80
- package/dist/index.browser-E4KzWirf.js +9 -0
- package/dist/pagination.js +65 -70
- package/dist/toaster.js +75 -1457
- package/package.json +3 -5
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export type Toast = {
|
|
2
|
+
message: string;
|
|
3
|
+
type: 'error' | 'success' | 'info' | 'warning';
|
|
4
|
+
id: string;
|
|
5
|
+
timeout: number;
|
|
6
|
+
};
|
|
7
|
+
declare function removeToast(id: string): void;
|
|
8
|
+
declare function addToast(message: Toast['message'], type?: Toast['type'], timeout?: Toast['timeout']): void;
|
|
9
|
+
export declare function useToaster(): Toast[];
|
|
10
|
+
export declare const toast: {
|
|
11
|
+
add: typeof addToast;
|
|
12
|
+
remove: typeof removeToast;
|
|
13
|
+
info: (message: Toast["message"], timeout?: Toast["timeout"]) => void;
|
|
14
|
+
success: (message: Toast["message"], timeout?: Toast["timeout"]) => void;
|
|
15
|
+
warning: (message: Toast["message"], timeout?: Toast["timeout"]) => void;
|
|
16
|
+
error: (message: Toast["message"], timeout?: Toast["timeout"]) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -3,28 +3,30 @@ import { jsx as Q, jsxs as tr } from "react/jsx-runtime";
|
|
|
3
3
|
import { b as hr } from "./regular-Dfv3Fzq0.js";
|
|
4
4
|
import { FontAwesomeIcon as pr } from "@fortawesome/react-fontawesome";
|
|
5
5
|
import gr, { attributesToProps as yr, domToReact as mr } from "html-react-parser";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
import { useState as wr, useMemo as br } from "react";
|
|
7
|
+
import { u as vr } from "./use-dismissible-fJ_gWdkv.js";
|
|
8
|
+
import { Alert as _r } from "./alert.js";
|
|
9
|
+
import { Container as Er } from "./container.js";
|
|
10
|
+
import { Link as Ir } from "./link.js";
|
|
11
|
+
import { Modal as Ar } from "./modal.js";
|
|
12
|
+
import { AlertTitle as Br } from "./alert-title.js";
|
|
13
|
+
import { AlertMessage as xr } from "./alert-message.js";
|
|
14
|
+
import { AlertSubtitle as Lr } from "./alert-subtitle.js";
|
|
15
|
+
import { AlertFooter as Ur } from "./alert-footer.js";
|
|
16
|
+
function Sr(F) {
|
|
17
|
+
return F && F.__esModule && Object.prototype.hasOwnProperty.call(F, "default") ? F.default : F;
|
|
18
|
+
}
|
|
19
|
+
function er(F) {
|
|
20
|
+
throw new Error('Could not dynamically require "' + F + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
19
21
|
}
|
|
20
22
|
var sr = { exports: {} }, cr;
|
|
21
23
|
function jr() {
|
|
22
|
-
return cr || (cr = 1, (function(
|
|
24
|
+
return cr || (cr = 1, (function(F, rr) {
|
|
23
25
|
(function(_) {
|
|
24
|
-
|
|
26
|
+
F.exports = _();
|
|
25
27
|
})(function() {
|
|
26
28
|
return (function _(j, L, S) {
|
|
27
|
-
function
|
|
29
|
+
function q(T, R) {
|
|
28
30
|
if (!L[T]) {
|
|
29
31
|
if (!j[T]) {
|
|
30
32
|
var J = typeof er == "function" && er;
|
|
@@ -34,15 +36,15 @@ function jr() {
|
|
|
34
36
|
}
|
|
35
37
|
R = L[T] = { exports: {} }, j[T][0].call(R.exports, function(K) {
|
|
36
38
|
var X = j[T][1][K];
|
|
37
|
-
return
|
|
39
|
+
return q(X || K);
|
|
38
40
|
}, R, R.exports, _, j, L, S);
|
|
39
41
|
}
|
|
40
42
|
return L[T].exports;
|
|
41
43
|
}
|
|
42
|
-
for (var z = typeof er == "function" && er,
|
|
43
|
-
return
|
|
44
|
+
for (var z = typeof er == "function" && er, P = 0; P < S.length; P++) q(S[P]);
|
|
45
|
+
return q;
|
|
44
46
|
})({ 1: [function(_, j, L) {
|
|
45
|
-
(function(S,
|
|
47
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
46
48
|
var y = _("crypto");
|
|
47
49
|
function E(s, f) {
|
|
48
50
|
f = b(s, f);
|
|
@@ -212,7 +214,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
212
214
|
};
|
|
213
215
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/fake_9a5aa49d.js", "/");
|
|
214
216
|
}, { buffer: 3, crypto: 5, lYpoI2: 11 }], 2: [function(_, j, L) {
|
|
215
|
-
(function(S,
|
|
217
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
216
218
|
(function(y) {
|
|
217
219
|
var E = typeof Uint8Array < "u" ? Uint8Array : Array, l = 43, p = 47, b = 48, g = 97, h = 65, I = 45, s = 95;
|
|
218
220
|
function f(n) {
|
|
@@ -245,17 +247,17 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
245
247
|
})(L === void 0 ? this.base64js = {} : L);
|
|
246
248
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js", "/node_modules/gulp-browserify/node_modules/base64-js/lib");
|
|
247
249
|
}, { buffer: 3, lYpoI2: 11 }], 3: [function(_, j, L) {
|
|
248
|
-
(function(S,
|
|
250
|
+
(function(S, q, l, P, T, R, J, K, X) {
|
|
249
251
|
var y = _("base64-js"), E = _("ieee754");
|
|
250
252
|
function l(r, e, i) {
|
|
251
253
|
if (!(this instanceof l)) return new l(r, e, i);
|
|
252
254
|
var d, c, w, U, M = typeof r;
|
|
253
255
|
if (e === "base64" && M == "string") for (r = (U = r).trim ? U.trim() : U.replace(/^\s+|\s+$/g, ""); r.length % 4 != 0; ) r += "=";
|
|
254
|
-
if (M == "number") d =
|
|
256
|
+
if (M == "number") d = V(r);
|
|
255
257
|
else if (M == "string") d = l.byteLength(r, e);
|
|
256
258
|
else {
|
|
257
259
|
if (M != "object") throw new Error("First argument needs to be a number, array or string.");
|
|
258
|
-
d =
|
|
260
|
+
d = V(r.length);
|
|
259
261
|
}
|
|
260
262
|
if (l._useTypedArrays ? c = l._augment(new Uint8Array(d)) : ((c = this).length = d, c._isBuffer = !0), l._useTypedArrays && typeof r.byteLength == "number") c._set(r);
|
|
261
263
|
else if (N(U = r) || l.isBuffer(U) || U && typeof U == "object" && typeof U.length == "number") for (w = 0; w < d; w++) l.isBuffer(r) ? c[w] = r.readUInt8(w) : c[w] = r[w];
|
|
@@ -271,7 +273,7 @@ Use "options.replacer" or "options.ignoreUnknown"
|
|
|
271
273
|
}
|
|
272
274
|
function b(r, e, i, d) {
|
|
273
275
|
return l._charsWritten = nr((function(c) {
|
|
274
|
-
for (var w, U, M = [],
|
|
276
|
+
for (var w, U, M = [], D = 0; D < c.length; D++) U = c.charCodeAt(D), w = U >> 8, U = U % 256, M.push(U), M.push(w);
|
|
275
277
|
return M;
|
|
276
278
|
})(e), r, i, d);
|
|
277
279
|
}
|
|
@@ -388,15 +390,15 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
388
390
|
}
|
|
389
391
|
return i;
|
|
390
392
|
}, l.prototype.write = function(r, e, i, d) {
|
|
391
|
-
isFinite(e) ? isFinite(i) || (d = i, i = void 0) : (
|
|
392
|
-
var c, w, U, M,
|
|
393
|
-
switch ((!i ||
|
|
393
|
+
isFinite(e) ? isFinite(i) || (d = i, i = void 0) : (D = d, d = e, e = i, i = D), e = Number(e) || 0;
|
|
394
|
+
var c, w, U, M, D = this.length - e;
|
|
395
|
+
switch ((!i || D < (i = Number(i))) && (i = D), d = String(d || "utf8").toLowerCase()) {
|
|
394
396
|
case "hex":
|
|
395
|
-
c = (function(G, H, W,
|
|
397
|
+
c = (function(G, H, W, O) {
|
|
396
398
|
W = Number(W) || 0;
|
|
397
|
-
var
|
|
398
|
-
(!
|
|
399
|
-
for (var Z = 0; Z <
|
|
399
|
+
var Y = G.length - W;
|
|
400
|
+
(!O || Y < (O = Number(O))) && (O = Y), m((Y = H.length) % 2 == 0, "Invalid hex string"), Y / 2 < O && (O = Y / 2);
|
|
401
|
+
for (var Z = 0; Z < O; Z++) {
|
|
400
402
|
var lr = parseInt(H.substr(2 * Z, 2), 16);
|
|
401
403
|
m(!isNaN(lr), "Invalid hex string"), G[W + Z] = lr;
|
|
402
404
|
}
|
|
@@ -429,20 +431,20 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
429
431
|
if (r = String(r || "utf8").toLowerCase(), e = Number(e) || 0, (i = i !== void 0 ? Number(i) : M.length) === e) return "";
|
|
430
432
|
switch (r) {
|
|
431
433
|
case "hex":
|
|
432
|
-
d = (function(
|
|
433
|
-
var W =
|
|
434
|
+
d = (function(D, G, H) {
|
|
435
|
+
var W = D.length;
|
|
434
436
|
(!G || G < 0) && (G = 0), (!H || H < 0 || W < H) && (H = W);
|
|
435
|
-
for (var
|
|
436
|
-
return
|
|
437
|
+
for (var O = "", Y = G; Y < H; Y++) O += C(D[Y]);
|
|
438
|
+
return O;
|
|
437
439
|
})(M, e, i);
|
|
438
440
|
break;
|
|
439
441
|
case "utf8":
|
|
440
442
|
case "utf-8":
|
|
441
|
-
d = (function(
|
|
442
|
-
var W = "",
|
|
443
|
-
H = Math.min(
|
|
444
|
-
for (var
|
|
445
|
-
return W + ur(
|
|
443
|
+
d = (function(D, G, H) {
|
|
444
|
+
var W = "", O = "";
|
|
445
|
+
H = Math.min(D.length, H);
|
|
446
|
+
for (var Y = G; Y < H; Y++) D[Y] <= 127 ? (W += ur(O) + String.fromCharCode(D[Y]), O = "") : O += "%" + D[Y].toString(16);
|
|
447
|
+
return W + ur(O);
|
|
446
448
|
})(M, e, i);
|
|
447
449
|
break;
|
|
448
450
|
case "ascii":
|
|
@@ -456,9 +458,9 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
456
458
|
case "ucs-2":
|
|
457
459
|
case "utf16le":
|
|
458
460
|
case "utf-16le":
|
|
459
|
-
d = (function(
|
|
460
|
-
for (var W =
|
|
461
|
-
return
|
|
461
|
+
d = (function(D, G, H) {
|
|
462
|
+
for (var W = D.slice(G, H), O = "", Y = 0; Y < W.length; Y += 2) O += String.fromCharCode(W[Y] + 256 * W[Y + 1]);
|
|
463
|
+
return O;
|
|
462
464
|
})(M, e, i);
|
|
463
465
|
break;
|
|
464
466
|
default:
|
|
@@ -560,7 +562,7 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
560
562
|
function k(r, e, i) {
|
|
561
563
|
return typeof r != "number" ? i : e <= (r = ~~r) ? e : 0 <= r || 0 <= (r += e) ? r : 0;
|
|
562
564
|
}
|
|
563
|
-
function
|
|
565
|
+
function V(r) {
|
|
564
566
|
return (r = ~~Math.ceil(+r)) < 0 ? 0 : r;
|
|
565
567
|
}
|
|
566
568
|
function N(r) {
|
|
@@ -610,7 +612,7 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
610
612
|
};
|
|
611
613
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/buffer/index.js", "/node_modules/gulp-browserify/node_modules/buffer");
|
|
612
614
|
}, { "base64-js": 2, buffer: 3, ieee754: 10, lYpoI2: 11 }], 4: [function(_, j, L) {
|
|
613
|
-
(function(S,
|
|
615
|
+
(function(S, q, y, P, T, R, J, K, X) {
|
|
614
616
|
var y = _("buffer").Buffer, E = 4, l = new y(E);
|
|
615
617
|
l.fill(0), j.exports = { hash: function(p, b, g, h) {
|
|
616
618
|
for (var I = b((function(t, a) {
|
|
@@ -622,17 +624,17 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
622
624
|
} };
|
|
623
625
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
624
626
|
}, { buffer: 3, lYpoI2: 11 }], 5: [function(_, j, L) {
|
|
625
|
-
(function(S,
|
|
627
|
+
(function(S, q, y, P, T, R, J, K, X) {
|
|
626
628
|
var y = _("buffer").Buffer, E = _("./sha"), l = _("./sha256"), p = _("./rng"), b = { sha1: E, sha256: l, md5: _("./md5") }, g = 64, h = new y(g);
|
|
627
629
|
function I(t, a) {
|
|
628
630
|
var u = b[t = t || "sha1"], B = [];
|
|
629
631
|
return u || s("algorithm:", t, "is not yet supported"), { update: function(A) {
|
|
630
632
|
return y.isBuffer(A) || (A = new y(A)), B.push(A), A.length, this;
|
|
631
633
|
}, digest: function(A) {
|
|
632
|
-
var x = y.concat(B), x = a ? (function(v, k,
|
|
633
|
-
y.isBuffer(k) || (k = new y(k)), y.isBuffer(
|
|
634
|
+
var x = y.concat(B), x = a ? (function(v, k, V) {
|
|
635
|
+
y.isBuffer(k) || (k = new y(k)), y.isBuffer(V) || (V = new y(V)), k.length > g ? k = v(k) : k.length < g && (k = y.concat([k, h], g));
|
|
634
636
|
for (var N = new y(g), C = new y(g), $ = 0; $ < g; $++) N[$] = 54 ^ k[$], C[$] = 92 ^ k[$];
|
|
635
|
-
return
|
|
637
|
+
return V = v(y.concat([N, V])), v(y.concat([C, V]));
|
|
636
638
|
})(u, a, x) : u(x);
|
|
637
639
|
return B = null, A ? x.toString(A) : x;
|
|
638
640
|
} };
|
|
@@ -660,7 +662,7 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
660
662
|
for (f in n) o(n[f]);
|
|
661
663
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
662
664
|
}, { "./md5": 6, "./rng": 7, "./sha": 8, "./sha256": 9, buffer: 3, lYpoI2: 11 }], 6: [function(_, j, L) {
|
|
663
|
-
(function(S,
|
|
665
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
664
666
|
var y = _("./helpers");
|
|
665
667
|
function E(s, f) {
|
|
666
668
|
s[f >> 5] |= 128 << f % 32, s[14 + (f + 64 >>> 9 << 4)] = f;
|
|
@@ -694,23 +696,23 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
694
696
|
};
|
|
695
697
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
696
698
|
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 7: [function(_, j, L) {
|
|
697
|
-
(function(S,
|
|
699
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
698
700
|
j.exports = function(y) {
|
|
699
701
|
for (var E, l = new Array(y), p = 0; p < y; p++) (3 & p) == 0 && (E = 4294967296 * Math.random()), l[p] = E >>> ((3 & p) << 3) & 255;
|
|
700
702
|
return l;
|
|
701
703
|
};
|
|
702
704
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
703
705
|
}, { buffer: 3, lYpoI2: 11 }], 8: [function(_, j, L) {
|
|
704
|
-
(function(S,
|
|
706
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
705
707
|
var y = _("./helpers");
|
|
706
708
|
function E(b, g) {
|
|
707
709
|
b[g >> 5] |= 128 << 24 - g % 32, b[15 + (g + 64 >> 9 << 4)] = g;
|
|
708
710
|
for (var h, I, s, f = Array(80), n = 1732584193, o = -271733879, t = -1732584194, a = 271733878, u = -1009589776, B = 0; B < b.length; B += 16) {
|
|
709
|
-
for (var A = n, x = o, v = t, k = a,
|
|
711
|
+
for (var A = n, x = o, v = t, k = a, V = u, N = 0; N < 80; N++) {
|
|
710
712
|
f[N] = N < 16 ? b[B + N] : p(f[N - 3] ^ f[N - 8] ^ f[N - 14] ^ f[N - 16], 1);
|
|
711
713
|
var C = l(l(p(n, 5), (C = o, I = t, s = a, (h = N) < 20 ? C & I | ~C & s : !(h < 40) && h < 60 ? C & I | C & s | I & s : C ^ I ^ s)), l(l(u, f[N]), (h = N) < 20 ? 1518500249 : h < 40 ? 1859775393 : h < 60 ? -1894007588 : -899497514)), u = a, a = t, t = p(o, 30), o = n, n = C;
|
|
712
714
|
}
|
|
713
|
-
n = l(n, A), o = l(o, x), t = l(t, v), a = l(a, k), u = l(u,
|
|
715
|
+
n = l(n, A), o = l(o, x), t = l(t, v), a = l(a, k), u = l(u, V);
|
|
714
716
|
}
|
|
715
717
|
return Array(n, o, t, a, u);
|
|
716
718
|
}
|
|
@@ -726,7 +728,7 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
726
728
|
};
|
|
727
729
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
728
730
|
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 9: [function(_, j, L) {
|
|
729
|
-
(function(S,
|
|
731
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
730
732
|
function y(g, h) {
|
|
731
733
|
var I = (65535 & g) + (65535 & h);
|
|
732
734
|
return (g >> 16) + (h >> 16) + (I >> 16) << 16 | 65535 & I;
|
|
@@ -735,8 +737,8 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
735
737
|
var I, s = new Array(1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298), f = new Array(1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225), n = new Array(64);
|
|
736
738
|
g[h >> 5] |= 128 << 24 - h % 32, g[15 + (h + 64 >> 9 << 4)] = h;
|
|
737
739
|
for (var o, t, a = 0; a < g.length; a += 16) {
|
|
738
|
-
for (var u = f[0], B = f[1], A = f[2], x = f[3], v = f[4], k = f[5],
|
|
739
|
-
f[0] = y(u, f[0]), f[1] = y(B, f[1]), f[2] = y(A, f[2]), f[3] = y(x, f[3]), f[4] = y(v, f[4]), f[5] = y(k, f[5]), f[6] = y(
|
|
740
|
+
for (var u = f[0], B = f[1], A = f[2], x = f[3], v = f[4], k = f[5], V = f[6], N = f[7], C = 0; C < 64; C++) n[C] = C < 16 ? g[C + a] : y(y(y((t = n[C - 2], p(t, 17) ^ p(t, 19) ^ b(t, 10)), n[C - 7]), (t = n[C - 15], p(t, 7) ^ p(t, 18) ^ b(t, 3))), n[C - 16]), I = y(y(y(y(N, p(t = v, 6) ^ p(t, 11) ^ p(t, 25)), v & k ^ ~v & V), s[C]), n[C]), o = y(p(o = u, 2) ^ p(o, 13) ^ p(o, 22), u & B ^ u & A ^ B & A), N = V, V = k, k = v, v = y(x, I), x = A, A = B, B = u, u = y(I, o);
|
|
741
|
+
f[0] = y(u, f[0]), f[1] = y(B, f[1]), f[2] = y(A, f[2]), f[3] = y(x, f[3]), f[4] = y(v, f[4]), f[5] = y(k, f[5]), f[6] = y(V, f[6]), f[7] = y(N, f[7]);
|
|
740
742
|
}
|
|
741
743
|
return f;
|
|
742
744
|
}
|
|
@@ -750,7 +752,7 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
750
752
|
};
|
|
751
753
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js", "/node_modules/gulp-browserify/node_modules/crypto-browserify");
|
|
752
754
|
}, { "./helpers": 4, buffer: 3, lYpoI2: 11 }], 10: [function(_, j, L) {
|
|
753
|
-
(function(S,
|
|
755
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
754
756
|
L.read = function(y, E, l, p, a) {
|
|
755
757
|
var g, h, I = 8 * a - p - 1, s = (1 << I) - 1, f = s >> 1, n = -7, o = l ? a - 1 : 0, t = l ? -1 : 1, a = y[E + o];
|
|
756
758
|
for (o += t, g = a & (1 << -n) - 1, a >>= -n, n += I; 0 < n; g = 256 * g + y[E + o], o += t, n -= 8) ;
|
|
@@ -769,7 +771,7 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
769
771
|
};
|
|
770
772
|
}).call(this, _("lYpoI2"), typeof self < "u" ? self : typeof window < "u" ? window : {}, _("buffer").Buffer, arguments[3], arguments[4], arguments[5], arguments[6], "/node_modules/gulp-browserify/node_modules/ieee754/index.js", "/node_modules/gulp-browserify/node_modules/ieee754");
|
|
771
773
|
}, { buffer: 3, lYpoI2: 11 }], 11: [function(_, j, L) {
|
|
772
|
-
(function(S,
|
|
774
|
+
(function(S, q, z, P, T, R, J, K, X) {
|
|
773
775
|
var y, E, l;
|
|
774
776
|
function p() {
|
|
775
777
|
}
|
|
@@ -795,16 +797,16 @@ list should be an Array.`), r.length === 0) return new l(0);
|
|
|
795
797
|
})(sr)), sr.exports;
|
|
796
798
|
}
|
|
797
799
|
var Cr = jr();
|
|
798
|
-
const kr = /* @__PURE__ */
|
|
799
|
-
replace: (
|
|
800
|
-
if (
|
|
801
|
-
return
|
|
802
|
-
if (
|
|
800
|
+
const kr = /* @__PURE__ */ Sr(Cr), dr = {
|
|
801
|
+
replace: (F, rr) => {
|
|
802
|
+
if (F.type === "text")
|
|
803
|
+
return F.data;
|
|
804
|
+
if (F.type !== "tag")
|
|
803
805
|
return null;
|
|
804
|
-
const _ = yr(
|
|
805
|
-
switch (
|
|
806
|
+
const _ = yr(F.attribs), j = mr(F.children, dr);
|
|
807
|
+
switch (F.tagName) {
|
|
806
808
|
case "a":
|
|
807
|
-
return /* @__PURE__ */ Q(
|
|
809
|
+
return /* @__PURE__ */ Q(Ir, { href: String(_.href), children: j });
|
|
808
810
|
case "br":
|
|
809
811
|
return /* @__PURE__ */ Q("br", {});
|
|
810
812
|
default:
|
|
@@ -812,34 +814,34 @@ const kr = /* @__PURE__ */ wr(Cr), dr = {
|
|
|
812
814
|
}
|
|
813
815
|
}
|
|
814
816
|
};
|
|
815
|
-
function
|
|
816
|
-
const [j, L] =
|
|
817
|
-
return
|
|
817
|
+
function Jr({ title: F, description: rr, timestamp: _ }) {
|
|
818
|
+
const [j, L] = wr(!0), S = br(() => kr({ title: F, description: rr, timestamp: _ }), [F, rr, _]), { dismissed: q, dismiss: z, clear: P } = vr("app-armor-alert", S, "session"), T = gr(rr ?? "", dr);
|
|
819
|
+
return q ? /* @__PURE__ */ tr(
|
|
818
820
|
"button",
|
|
819
821
|
{
|
|
820
822
|
onClick: () => {
|
|
821
|
-
|
|
823
|
+
P(), L(!0);
|
|
822
824
|
},
|
|
823
825
|
className: "uofg-dismissable-alert-bar sticky top-0 left-0 z-10000 flex w-dvw cursor-pointer items-center justify-center gap-[0.25em] bg-red p-2 text-red-contrast shadow-md transition hover:bg-black hover:text-white focus:bg-black focus:text-white",
|
|
824
826
|
children: [
|
|
825
827
|
/* @__PURE__ */ Q(pr, { className: "uofg-dismissable-alert-bar-icon", icon: hr }),
|
|
826
|
-
/* @__PURE__ */ Q("span", { className: "uofg-dismissable-alert-bar-text overflow-hidden text-sm text-ellipsis whitespace-nowrap", children:
|
|
828
|
+
/* @__PURE__ */ Q("span", { className: "uofg-dismissable-alert-bar-text overflow-hidden text-sm text-ellipsis whitespace-nowrap", children: F })
|
|
827
829
|
]
|
|
828
830
|
}
|
|
829
831
|
) : /* @__PURE__ */ Q(
|
|
830
|
-
|
|
832
|
+
Ar,
|
|
831
833
|
{
|
|
832
834
|
open: j,
|
|
833
835
|
onClose: () => {
|
|
834
836
|
L(!1), z();
|
|
835
837
|
},
|
|
836
|
-
children: /* @__PURE__ */ Q(
|
|
837
|
-
/* @__PURE__ */ Q(
|
|
838
|
-
/* @__PURE__ */ tr(
|
|
839
|
-
/* @__PURE__ */ Q(
|
|
838
|
+
children: /* @__PURE__ */ Q(Er, { className: "uofg-dismissable-alert-popup-container max-w-[80rem]! p-0", children: /* @__PURE__ */ tr(_r, { children: [
|
|
839
|
+
/* @__PURE__ */ Q(Br, { children: "University of Guelph Alert" }),
|
|
840
|
+
/* @__PURE__ */ tr(xr, { children: [
|
|
841
|
+
/* @__PURE__ */ Q(Lr, { children: F }),
|
|
840
842
|
T
|
|
841
843
|
] }),
|
|
842
|
-
/* @__PURE__ */ tr(
|
|
844
|
+
/* @__PURE__ */ tr(Ur, { className: "flex flex-col gap-4", children: [
|
|
843
845
|
/* @__PURE__ */ tr("span", { children: [
|
|
844
846
|
"Last Updated: ",
|
|
845
847
|
_
|
|
@@ -851,5 +853,5 @@ function Kr({ title: V, description: rr, timestamp: _ }) {
|
|
|
851
853
|
);
|
|
852
854
|
}
|
|
853
855
|
export {
|
|
854
|
-
|
|
856
|
+
Jr as DismissibleAlert
|
|
855
857
|
};
|
package/dist/pagination.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { h as
|
|
2
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { h as v } from "./solid-CpJcQLq3.js";
|
|
4
4
|
import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
5
|
+
import { n as q } from "./index.browser-E4KzWirf.js";
|
|
6
|
+
import { useState as x, useEffect as B } from "react";
|
|
7
|
+
import { twMerge as F } from "tailwind-merge";
|
|
8
|
+
import { tv as G } from "tailwind-variants";
|
|
9
|
+
import { c as N } from "./math-utils-CnAd98v6.js";
|
|
10
|
+
import { Button as V } from "./button.js";
|
|
11
|
+
import { NumberInput as _ } from "./number-input.js";
|
|
12
|
+
var D = {
|
|
12
13
|
prefix: "fad",
|
|
13
14
|
iconName: "chevrons-right",
|
|
14
15
|
icon: [
|
|
@@ -18,7 +19,7 @@ var U = {
|
|
|
18
19
|
"f324",
|
|
19
20
|
["M32 448c0 8.2 3.1 16.4 9.4 22.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3l-192-192C80.4 35.1 72.2 32 64 32s-16.4 3.1-22.6 9.4c-12.5 12.5-12.5 32.8 0 45.3L210.7 256 41.4 425.4C35.1 431.6 32 439.8 32 448z", "M470.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L402.7 256 233.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]
|
|
20
21
|
]
|
|
21
|
-
},
|
|
22
|
+
}, H = {
|
|
22
23
|
prefix: "fad",
|
|
23
24
|
iconName: "chevrons-left",
|
|
24
25
|
icon: [
|
|
@@ -29,53 +30,47 @@ var U = {
|
|
|
29
30
|
["M224 256c0 8.2 3.1 16.4 9.4 22.6l192 192c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4c12.5-12.5 12.5-32.8 0-45.3L301.3 256 470.6 86.6c12.5-12.5 12.5-32.8 0-45.3C464.4 35.1 456.2 32 448 32s-16.4 3.1-22.6 9.4l-192 192c-6.2 6.2-9.4 14.4-9.4 22.6z", "M41.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l192-192c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L109.3 256 278.6 425.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-192-192z"]
|
|
30
31
|
]
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
for (; i--; )
|
|
35
|
-
e += D[m[i] & 63];
|
|
36
|
-
return e;
|
|
37
|
-
};
|
|
38
|
-
function re({
|
|
39
|
-
page: i,
|
|
33
|
+
function se({
|
|
34
|
+
page: d,
|
|
40
35
|
count: e,
|
|
41
|
-
visible:
|
|
42
|
-
defaultPage:
|
|
36
|
+
visible: w,
|
|
37
|
+
defaultPage: h,
|
|
43
38
|
onChange: P,
|
|
44
|
-
color:
|
|
39
|
+
color: m = "yellow",
|
|
45
40
|
hideInput: C = !1,
|
|
46
41
|
hideList: k = !1,
|
|
47
42
|
className: $
|
|
48
43
|
}) {
|
|
49
|
-
const [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}, [
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
P?.(
|
|
56
|
-
},
|
|
57
|
-
const
|
|
58
|
-
return /* @__PURE__ */
|
|
44
|
+
const [s, I] = x(h ?? 0), [L, M] = x(h ?? 0), j = [...Array(e).keys()], o = Math.max(Math.ceil(w), 3), b = q();
|
|
45
|
+
B(() => {
|
|
46
|
+
l(d ?? 0);
|
|
47
|
+
}, [d]);
|
|
48
|
+
const l = (r) => {
|
|
49
|
+
const g = N(r, 0, e - 1);
|
|
50
|
+
P?.(g), I(g);
|
|
51
|
+
}, u = (r) => {
|
|
52
|
+
const g = s === r;
|
|
53
|
+
return /* @__PURE__ */ n(
|
|
59
54
|
"button",
|
|
60
55
|
{
|
|
61
|
-
className: `uofg-pagination-item ${W({ active:
|
|
56
|
+
className: `uofg-pagination-item ${W({ active: g })}`,
|
|
62
57
|
onClick: () => {
|
|
63
|
-
|
|
58
|
+
l(r);
|
|
64
59
|
},
|
|
65
60
|
children: [
|
|
66
61
|
/* @__PURE__ */ t("span", { className: "sr-only", children: "Page" }),
|
|
67
62
|
" ",
|
|
68
|
-
|
|
63
|
+
r + 1,
|
|
69
64
|
" ",
|
|
70
|
-
|
|
65
|
+
g ? /* @__PURE__ */ t("span", { className: "sr-only", children: "(Current Page)" }) : ""
|
|
71
66
|
]
|
|
72
67
|
},
|
|
73
|
-
|
|
68
|
+
r
|
|
74
69
|
);
|
|
75
70
|
};
|
|
76
|
-
let a,
|
|
77
|
-
e <= o || e < 5 ? (
|
|
78
|
-
const { base:
|
|
71
|
+
let i, a, c, p;
|
|
72
|
+
e <= o || e < 5 ? (i = 1, a = e - 1, c = !1, p = !1) : s < o - 1 ? (i = 1, a = o, p = !0, c = !1) : s > e - o ? (i = e - o, a = e - 1, c = !0, p = !1) : (i = s - Math.floor(o / 2), a = i + o, c = i > 1, p = a < e);
|
|
73
|
+
const { base: z, list: E, seperator: A, control: y, item: W, inputWrapper: R, goTo: S, input: T } = G({
|
|
79
74
|
slots: {
|
|
80
75
|
base: "flex w-full flex-col items-center justify-center gap-4 md:flex-row",
|
|
81
76
|
list: "flex items-center justify-center gap-4",
|
|
@@ -148,67 +143,67 @@ function re({
|
|
|
148
143
|
}
|
|
149
144
|
]
|
|
150
145
|
})({
|
|
151
|
-
color:
|
|
146
|
+
color: m ?? "yellow",
|
|
152
147
|
hideList: k ?? !1,
|
|
153
148
|
hideInput: C ?? !1
|
|
154
149
|
});
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */ t("a", { href: `#uofg-pagination-skip-${
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ n("div", { className: `uofg-pagination ${F(z(), $)}`, children: [
|
|
151
|
+
/* @__PURE__ */ t("a", { href: `#uofg-pagination-skip-${b}`, className: "sr-only! focus-visible:not-sr-only!", children: "Skip Pagination" }),
|
|
152
|
+
/* @__PURE__ */ n("div", { className: `uofg-pagination-list ${E()}`, children: [
|
|
153
|
+
/* @__PURE__ */ n(
|
|
159
154
|
"button",
|
|
160
155
|
{
|
|
161
|
-
disabled:
|
|
162
|
-
className: `uofg-pagination-previous ${
|
|
163
|
-
onClick: () =>
|
|
156
|
+
disabled: s <= 0,
|
|
157
|
+
className: `uofg-pagination-previous ${y()}`,
|
|
158
|
+
onClick: () => l(s - 1),
|
|
164
159
|
children: [
|
|
165
|
-
/* @__PURE__ */ t(f, { icon:
|
|
160
|
+
/* @__PURE__ */ t(f, { icon: H }),
|
|
166
161
|
/* @__PURE__ */ t("span", { className: "sr-only", children: "Previous Page" })
|
|
167
162
|
]
|
|
168
163
|
}
|
|
169
164
|
),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
j.slice(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */
|
|
165
|
+
u(0),
|
|
166
|
+
c && /* @__PURE__ */ t(f, { icon: v }),
|
|
167
|
+
j.slice(i, a).map(u),
|
|
168
|
+
p && /* @__PURE__ */ t(f, { icon: v }),
|
|
169
|
+
u(e - 1),
|
|
170
|
+
/* @__PURE__ */ n(
|
|
176
171
|
"button",
|
|
177
172
|
{
|
|
178
|
-
disabled:
|
|
179
|
-
className: `uofg-pagination-next ${
|
|
180
|
-
onClick: () =>
|
|
173
|
+
disabled: s >= e - 1,
|
|
174
|
+
className: `uofg-pagination-next ${y()}`,
|
|
175
|
+
onClick: () => l(s + 1),
|
|
181
176
|
children: [
|
|
182
|
-
/* @__PURE__ */ t(f, { icon:
|
|
177
|
+
/* @__PURE__ */ t(f, { icon: D }),
|
|
183
178
|
/* @__PURE__ */ t("span", { className: "sr-only", children: "Next Page" })
|
|
184
179
|
]
|
|
185
180
|
}
|
|
186
181
|
)
|
|
187
182
|
] }),
|
|
188
|
-
/* @__PURE__ */ t("span", { className: `uofg-pagination-seperator ${
|
|
189
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ t("span", { className: `uofg-pagination-seperator ${A()}` }),
|
|
184
|
+
/* @__PURE__ */ n("div", { className: `uofg-pagination-go-to-wrapper ${R()}`, children: [
|
|
190
185
|
/* @__PURE__ */ t(
|
|
191
|
-
|
|
186
|
+
_,
|
|
192
187
|
{
|
|
193
|
-
color:
|
|
188
|
+
color: m,
|
|
194
189
|
min: 1,
|
|
195
190
|
max: e,
|
|
196
|
-
value:
|
|
197
|
-
onInput: (
|
|
198
|
-
M(isNaN(
|
|
191
|
+
value: s + 1,
|
|
192
|
+
onInput: (r) => {
|
|
193
|
+
M(isNaN(r) ? 0 : N(r - 1, 0, e - 1));
|
|
199
194
|
},
|
|
200
195
|
className: `uofg-pagination-go-to-input ${T()}`,
|
|
201
196
|
children: /* @__PURE__ */ t("span", { className: "sr-only", children: "Input Page Number" })
|
|
202
197
|
}
|
|
203
198
|
),
|
|
204
199
|
/* @__PURE__ */ t(
|
|
205
|
-
|
|
200
|
+
V,
|
|
206
201
|
{
|
|
207
|
-
id: `uofg-pagination-skip-${
|
|
208
|
-
color:
|
|
202
|
+
id: `uofg-pagination-skip-${b}`,
|
|
203
|
+
color: m,
|
|
209
204
|
className: `uofg-pagination-go-to-button ${S()}`,
|
|
210
205
|
onClick: () => {
|
|
211
|
-
|
|
206
|
+
l(L);
|
|
212
207
|
},
|
|
213
208
|
children: "Go to page"
|
|
214
209
|
}
|
|
@@ -217,5 +212,5 @@ function re({
|
|
|
217
212
|
] });
|
|
218
213
|
}
|
|
219
214
|
export {
|
|
220
|
-
|
|
215
|
+
se as Pagination
|
|
221
216
|
};
|