@uoguelph/react-components 1.2.2 → 1.2.5
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/accordion-button.js +1 -1
- package/dist/alert-title.js +4 -4
- package/dist/blockquote-content.js +1 -1
- package/dist/breadcrumb-home.js +6 -6
- package/dist/breadcrumb.js +5 -5
- package/dist/carousel.js +1 -1
- package/dist/checkbox.js +7 -7
- package/dist/components/dismissible-alert/dismissible-alert.d.ts +10 -0
- package/dist/components/footer/footer-link.d.ts +6 -0
- package/dist/components/footer/footer.d.ts +15 -0
- package/dist/components/header/header-link.d.ts +6 -0
- package/dist/components/header/header-menu-item.d.ts +3 -0
- package/dist/components/header/header-menu.d.ts +6 -0
- package/dist/components/header/header.d.ts +28 -0
- package/dist/components/layout/layout-content.d.ts +12 -0
- package/dist/components/layout/layout.d.ts +13 -0
- package/dist/contact-email.js +1 -1
- package/dist/contact-phone.js +1 -1
- package/dist/dismissible-alert.d.ts +2 -0
- package/dist/dismissible-alert.js +827 -0
- package/dist/embedded-video-modal-button.js +8 -8
- package/dist/footer-link.d.ts +2 -0
- package/dist/footer-link.js +7 -0
- package/dist/footer.d.ts +2 -0
- package/dist/footer.js +9 -0
- package/dist/header-link.d.ts +2 -0
- package/dist/header-link.js +7 -0
- package/dist/header-menu-item.d.ts +2 -0
- package/dist/header-menu-item.js +7 -0
- package/dist/header-menu.d.ts +2 -0
- package/dist/header-menu.js +7 -0
- package/dist/header.d.ts +2 -0
- package/dist/header.js +13 -0
- package/dist/hero-video.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +25 -11
- package/dist/layout-content.d.ts +2 -0
- package/dist/layout-content.js +10 -0
- package/dist/layout.d.ts +2 -0
- package/dist/layout.js +55 -0
- package/dist/modal.js +1 -1
- package/dist/{regular-BRNZck7j.js → regular-23gOebKJ.js} +5 -5
- package/dist/select-button.js +1 -1
- package/dist/select-option.js +1 -1
- package/dist/{solid-DyAB2_Ed.js → solid-D4xgBves.js} +2 -2
- package/dist/statistics.js +27 -37
- package/dist/text-input.js +1 -1
- package/dist/use-dismissible-CWEoUQGp.js +26 -0
- package/dist/use-resize-observer-DmddO4OQ.js +15 -0
- package/dist/utils/use-dismissible.d.ts +5 -0
- package/package.json +15 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useState as l, useEffect as c } from "react";
|
|
2
|
+
const w = (r, t, m = "local") => {
|
|
3
|
+
const s = `${r}-use-dismissible-hash`, e = typeof window == "object" ? m === "session" ? window.sessionStorage : window.localStorage : null, [u, i] = l(!0);
|
|
4
|
+
return c(() => {
|
|
5
|
+
const o = (d) => {
|
|
6
|
+
d.key === s && e !== null && i(e.getItem(s) === t);
|
|
7
|
+
};
|
|
8
|
+
if (!t)
|
|
9
|
+
return;
|
|
10
|
+
const n = e == null ? void 0 : e.getItem(s);
|
|
11
|
+
return i(n === t), n && n !== t && (e == null || e.removeItem(s)), window.addEventListener("storage", o), () => {
|
|
12
|
+
window.removeEventListener("storage", o);
|
|
13
|
+
};
|
|
14
|
+
}, [t, s, e]), {
|
|
15
|
+
dismissed: u,
|
|
16
|
+
dismiss: () => {
|
|
17
|
+
t && (i(!0), e == null || e.setItem(s, t));
|
|
18
|
+
},
|
|
19
|
+
clear: () => {
|
|
20
|
+
i(!1), e == null || e.removeItem(s);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
w as u
|
|
26
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useState as o, useRef as c, useEffect as f } from "react";
|
|
2
|
+
function v() {
|
|
3
|
+
const [n, s] = o(null), e = c(null);
|
|
4
|
+
return f(() => {
|
|
5
|
+
if (!e.current) return;
|
|
6
|
+
const r = new ResizeObserver((u, i) => {
|
|
7
|
+
const t = u[0];
|
|
8
|
+
t && s(t);
|
|
9
|
+
});
|
|
10
|
+
return r.observe(e.current), () => r.disconnect();
|
|
11
|
+
}, [e.current]), [e, n];
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
v as u
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/react-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "University of Guelph React Components Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
"
|
|
33
|
+
"peerDependencies": {
|
|
34
34
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
35
35
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
36
36
|
"@headlessui/react": "^2.2.0",
|
|
37
37
|
"@headlessui/tailwindcss": "^0.2.2",
|
|
38
|
+
"object-hash": "^3.0.0",
|
|
38
39
|
"react": "^19.0.0",
|
|
39
40
|
"react-animate-height": "^3.2.3",
|
|
40
41
|
"react-dom": "^19.0.0",
|
|
@@ -44,8 +45,13 @@
|
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@awesome.me/kit-7993323d0c": "^1.0.10",
|
|
46
47
|
"@eslint/js": "^9.19.0",
|
|
48
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
49
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
50
|
+
"@headlessui/react": "^2.2.0",
|
|
51
|
+
"@headlessui/tailwindcss": "^0.2.2",
|
|
47
52
|
"@tailwindcss/vite": "^4.0.9",
|
|
48
53
|
"@types/node": "^22.13.1",
|
|
54
|
+
"@types/object-hash": "^3.0.6",
|
|
49
55
|
"@types/react": "^19.0.8",
|
|
50
56
|
"@types/react-dom": "^19.0.3",
|
|
51
57
|
"@uoguelph/tailwind-theme": "^1.0.0",
|
|
@@ -56,7 +62,13 @@
|
|
|
56
62
|
"eslint-plugin-react-refresh": "^0.4.18",
|
|
57
63
|
"fast-glob": "^3.3.3",
|
|
58
64
|
"globals": "^15.14.0",
|
|
65
|
+
"object-hash": "^3.0.0",
|
|
59
66
|
"postcss": "^8.5.2",
|
|
67
|
+
"react": "^19.0.0",
|
|
68
|
+
"react-animate-height": "^3.2.3",
|
|
69
|
+
"react-dom": "^19.0.0",
|
|
70
|
+
"tailwind-merge": "^3.0.1",
|
|
71
|
+
"tailwind-variants": "^0.3.1",
|
|
60
72
|
"tailwindcss": "^4.0.6",
|
|
61
73
|
"typescript": "~5.7.2",
|
|
62
74
|
"typescript-eslint": "^8.22.0",
|
|
@@ -72,5 +84,5 @@
|
|
|
72
84
|
"bugs": {
|
|
73
85
|
"url": "https://github.com/ccswbs/uofg-components/issues"
|
|
74
86
|
},
|
|
75
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "f688888837675197db25465924a86e3e788498ea"
|
|
76
88
|
}
|