@uoguelph/react-components 1.3.4 → 1.3.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 -0
- package/dist/accordion-content.js +7 -6
- package/dist/accordion.js +1 -0
- package/dist/button.js +5 -4
- package/dist/carousel.js +1 -0
- package/dist/checkbox.js +4 -3
- package/dist/dismissible-alert.js +1 -0
- package/dist/link-carousel.js +1 -0
- package/dist/modal.js +4 -3
- package/dist/number-input.js +1 -0
- package/dist/pagination.js +1 -0
- package/dist/radio-group.js +6 -5
- package/dist/radio.js +1 -0
- package/dist/select-button.js +1 -0
- package/dist/select-option.js +5 -4
- package/dist/select-options.js +4 -3
- package/dist/select.js +7 -6
- package/dist/tab-list.js +9 -8
- package/dist/tab-panel.js +8 -7
- package/dist/tab-panels.js +9 -8
- package/dist/tab.js +1 -0
- package/dist/tabs.js +9 -8
- package/dist/text-input.js +1 -0
- package/package.json +3 -2
package/dist/accordion-button.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
3
|
import { DisclosurePanel as i } from "@headlessui/react";
|
|
3
4
|
import { useContext as c } from "react";
|
|
4
5
|
import m from "react-animate-height";
|
|
5
|
-
import { twMerge as
|
|
6
|
-
import { AccordionContext as
|
|
7
|
-
function
|
|
8
|
-
const o = c(
|
|
6
|
+
import { twMerge as s } from "tailwind-merge";
|
|
7
|
+
import { AccordionContext as u } from "./accordion-context.js";
|
|
8
|
+
function a({ children: r, className: e }) {
|
|
9
|
+
const o = c(u), n = s("uog:border-l-4 uog:border-yellow uog:py-3 uog:pl-5", e);
|
|
9
10
|
return /* @__PURE__ */ t(m, { height: o != null && o.isOpen ? "auto" : 0, duration: 200, easing: "ease-in-out", children: /* @__PURE__ */ t(i, { static: !0, className: `uofg-accordion-content ${n}`, children: r }) });
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
a.displayName = "AccordionContent";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
a as AccordionContent
|
|
14
15
|
};
|
package/dist/accordion.js
CHANGED
package/dist/button.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { twMerge as
|
|
3
|
-
import { tv as
|
|
3
|
+
import { twMerge as n } from "tailwind-merge";
|
|
4
|
+
import { tv as b } from "tailwind-variants";
|
|
4
5
|
const d = "button";
|
|
5
6
|
function f({
|
|
6
7
|
as: e,
|
|
@@ -11,7 +12,7 @@ function f({
|
|
|
11
12
|
disabled: o = !1,
|
|
12
13
|
...r
|
|
13
14
|
}) {
|
|
14
|
-
const c = e ?? d, i =
|
|
15
|
+
const c = e ?? d, i = b({
|
|
15
16
|
base: "uog:font-medium uog:shadow-sm uog:inline-flex uog:items-center uog:justify-center uog:px-6 uog:py-4 uog:text-lg uog:no-underline uog:transition-colors uog:focus-visible:outline-none uog:cursor-pointer uog:focus-visible:ring-2 uog:focus-visible:ring-offset-2",
|
|
16
17
|
variants: {
|
|
17
18
|
color: {
|
|
@@ -140,7 +141,7 @@ function f({
|
|
|
140
141
|
class: "uog:hocus-visible:bg-black uog:hocus-visible:text-black-contrast"
|
|
141
142
|
}
|
|
142
143
|
]
|
|
143
|
-
}), g =
|
|
144
|
+
}), g = n(i({ color: l, outlined: s, disabled: o }), t);
|
|
144
145
|
return /* @__PURE__ */ a(c, { className: `uofg-button ${g}`, disabled: o, ...r, children: u });
|
|
145
146
|
}
|
|
146
147
|
f.displayName = "Button";
|
package/dist/carousel.js
CHANGED
package/dist/checkbox.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
3
|
import { d as p } from "./regular-DmWV6rTj.js";
|
|
3
4
|
import { FontAwesomeIcon as y } from "@fortawesome/react-fontawesome";
|
|
@@ -13,7 +14,7 @@ function F({
|
|
|
13
14
|
onChange: o,
|
|
14
15
|
...r
|
|
15
16
|
}) {
|
|
16
|
-
const [a,
|
|
17
|
+
const [a, n] = C(g), b = j({
|
|
17
18
|
slots: {
|
|
18
19
|
base: "uog:flex uog:flex-col uog:gap-0.5 uog:cursor-pointer",
|
|
19
20
|
container: "uog:flex uog:items-center uog:gap-2",
|
|
@@ -60,7 +61,7 @@ function F({
|
|
|
60
61
|
check: k,
|
|
61
62
|
label: d,
|
|
62
63
|
description: m
|
|
63
|
-
} =
|
|
64
|
+
} = b({ color: l, disabled: i });
|
|
64
65
|
return /* @__PURE__ */ s(w, { className: `uofg-checkbox-field ${h()}`, children: [
|
|
65
66
|
/* @__PURE__ */ s("div", { className: `uofg-checkbox-container ${x()}`, children: [
|
|
66
67
|
/* @__PURE__ */ e(
|
|
@@ -68,7 +69,7 @@ function F({
|
|
|
68
69
|
{
|
|
69
70
|
checked: a,
|
|
70
71
|
onChange: (t) => {
|
|
71
|
-
|
|
72
|
+
n(t), o == null || o(t);
|
|
72
73
|
},
|
|
73
74
|
disabled: i,
|
|
74
75
|
className: `uofg-checkbox ${f()}`,
|
package/dist/link-carousel.js
CHANGED
package/dist/modal.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
3
|
import { e as f } from "./solid-D19hAF5t.js";
|
|
3
4
|
import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
|
|
4
5
|
import { Dialog as x, DialogBackdrop as w, CloseButton as h, DialogPanel as y } from "@headlessui/react";
|
|
5
6
|
import { tv as N } from "tailwind-variants";
|
|
6
7
|
function k({ open: u, onClose: a = () => {
|
|
7
|
-
}, role:
|
|
8
|
+
}, role: t = "dialog", labelledBy: r, centered: l, children: g }) {
|
|
8
9
|
const s = N({
|
|
9
10
|
slots: {
|
|
10
11
|
base: "uog:ease-out uog:relative uog:z-50 uog:transition uog:duration-300 uog:data-[closed]:opacity-0",
|
|
@@ -27,10 +28,10 @@ function k({ open: u, onClose: a = () => {
|
|
|
27
28
|
{
|
|
28
29
|
transition: !0,
|
|
29
30
|
open: u,
|
|
30
|
-
role:
|
|
31
|
+
role: t,
|
|
31
32
|
onClose: a,
|
|
32
33
|
className: `uofg-modal ${i()}`,
|
|
33
|
-
"aria-labelledby":
|
|
34
|
+
"aria-labelledby": r,
|
|
34
35
|
children: [
|
|
35
36
|
/* @__PURE__ */ o(w, { transition: !0, className: `uofg-modal-backdrop ${n()}` }),
|
|
36
37
|
/* @__PURE__ */ o("div", { className: `uofg-modal-wrapper ${d()}`, children: /* @__PURE__ */ e("div", { className: `uofg-modal-panel-wrapper ${c()}`, children: [
|
package/dist/number-input.js
CHANGED
package/dist/pagination.js
CHANGED
package/dist/radio-group.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
3
|
import { RadioGroup as d } from "@headlessui/react";
|
|
3
|
-
import { useState as
|
|
4
|
+
import { useState as c, useMemo as f } from "react";
|
|
4
5
|
import { tv as n } from "tailwind-variants";
|
|
5
6
|
import { RadioContext as x } from "./radio-context.js";
|
|
6
7
|
import { Radio as j } from "./radio.js";
|
|
7
|
-
function R({ name:
|
|
8
|
-
const [l, e] =
|
|
8
|
+
function R({ name: s, inline: a = !1, onChange: o, children: i }) {
|
|
9
|
+
const [l, e] = c(null), u = f(() => ({ setSelected: e }), [e]), m = n({
|
|
9
10
|
slots: {
|
|
10
11
|
base: "uog:flex uog:gap-2"
|
|
11
12
|
},
|
|
@@ -16,11 +17,11 @@ function R({ name: a, inline: s = !1, onChange: o, children: i }) {
|
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
}), { base: p } = m({ inline:
|
|
20
|
+
}), { base: p } = m({ inline: a });
|
|
20
21
|
return /* @__PURE__ */ t(
|
|
21
22
|
d,
|
|
22
23
|
{
|
|
23
|
-
name:
|
|
24
|
+
name: s,
|
|
24
25
|
value: l,
|
|
25
26
|
onChange: (r) => {
|
|
26
27
|
e(r), o == null || o(r);
|
package/dist/radio.js
CHANGED
package/dist/select-button.js
CHANGED
package/dist/select-option.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
3
|
import { d as m } from "./regular-DmWV6rTj.js";
|
|
3
4
|
import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
|
|
@@ -5,7 +6,7 @@ import { ListboxOption as b } from "@headlessui/react";
|
|
|
5
6
|
import { twMerge as x } from "tailwind-merge";
|
|
6
7
|
import { tv as d } from "tailwind-variants";
|
|
7
8
|
function v({ children: o, className: r, ...i }) {
|
|
8
|
-
const
|
|
9
|
+
const n = d({
|
|
9
10
|
slots: {
|
|
10
11
|
option: [
|
|
11
12
|
"uofg-select-option",
|
|
@@ -39,10 +40,10 @@ function v({ children: o, className: r, ...i }) {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
}), { option:
|
|
43
|
-
return /* @__PURE__ */ e(b, { ...i, className: x(
|
|
43
|
+
}), { option: s, icon: g, wrapper: u, content: c } = n();
|
|
44
|
+
return /* @__PURE__ */ e(b, { ...i, className: x(s(), r), children: ({ focus: a, selected: t, ...l }) => /* @__PURE__ */ p("div", { className: u(), children: [
|
|
44
45
|
/* @__PURE__ */ e("span", { className: c(), children: typeof o == "function" ? o({ focus: a, selected: t, ...l }) : o }),
|
|
45
|
-
/* @__PURE__ */ e(f, { icon: m, className:
|
|
46
|
+
/* @__PURE__ */ e(f, { icon: m, className: g({ selected: t }) })
|
|
46
47
|
] }) });
|
|
47
48
|
}
|
|
48
49
|
v.displayName = "SelectOptions";
|
package/dist/select-options.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
3
|
import { ListboxOptions as g } from "@headlessui/react";
|
|
3
4
|
import { twMerge as i } from "tailwind-merge";
|
|
4
5
|
function s({ children: o, className: u, ...e }) {
|
|
5
|
-
const
|
|
6
|
+
const t = i(
|
|
6
7
|
"uog:z-10",
|
|
7
8
|
"uog:max-h-[20rem]",
|
|
8
9
|
"uog:w-full",
|
|
@@ -23,7 +24,7 @@ function s({ children: o, className: u, ...e }) {
|
|
|
23
24
|
"uog:data-[closed]:opacity-0",
|
|
24
25
|
u
|
|
25
26
|
);
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ r(g, { ...e, className: t, children: o });
|
|
27
28
|
}
|
|
28
29
|
s.displayName = "SelectOptions";
|
|
29
30
|
export {
|
package/dist/select.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
3
|
import { Listbox as r } from "@headlessui/react";
|
|
3
|
-
import { SelectButton as
|
|
4
|
-
import { SelectOption as
|
|
5
|
-
import { SelectOptions as
|
|
4
|
+
import { SelectButton as m } from "./select-button.js";
|
|
5
|
+
import { SelectOption as f } from "./select-option.js";
|
|
6
|
+
import { SelectOptions as a } from "./select-options.js";
|
|
6
7
|
function l({ children: e, ...o }) {
|
|
7
8
|
return /* @__PURE__ */ t(r, { className: "uofg-select uog:group uog:relative uog:w-full", ...o, as: "div", children: e });
|
|
8
9
|
}
|
|
9
10
|
l.displayName = "Select";
|
|
10
11
|
export {
|
|
11
12
|
l as Select,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
m as SelectButton,
|
|
14
|
+
f as SelectOption,
|
|
15
|
+
a as SelectOptions
|
|
15
16
|
};
|
package/dist/tab-list.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { TabList as r } from "@headlessui/react";
|
|
4
|
+
import { twMerge as l } from "tailwind-merge";
|
|
5
|
+
function a({ children: o, className: t }) {
|
|
6
|
+
const s = l(
|
|
6
7
|
"uofg-tab-list uog:flex uog:gap-1 uog:border-b-4 uog:border-yellow uog:w-full uog:flex-col uog:md:flex-row",
|
|
7
8
|
t
|
|
8
9
|
);
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ e(r, { className: `uofg-tab-list ${s}`, children: o });
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
a.displayName = "TabList";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
a as TabList
|
|
14
15
|
};
|
package/dist/tab-panel.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { TabPanel as
|
|
3
|
-
import { twMerge as
|
|
4
|
-
function
|
|
5
|
-
const o =
|
|
6
|
-
return /* @__PURE__ */ n(
|
|
3
|
+
import { TabPanel as t } from "@headlessui/react";
|
|
4
|
+
import { twMerge as l } from "tailwind-merge";
|
|
5
|
+
function r({ children: a, className: e }) {
|
|
6
|
+
const o = l("uofg-tab-panel uog:py-4", e);
|
|
7
|
+
return /* @__PURE__ */ n(t, { className: `uofg-tab-panel ${o}`, children: a });
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
r.displayName = "TabPanel";
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
r as TabPanel
|
|
11
12
|
};
|
package/dist/tab-panels.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { TabPanels as o } from "@headlessui/react";
|
|
4
|
+
import { twMerge as t } from "tailwind-merge";
|
|
5
|
+
function l({ children: a, className: s }) {
|
|
6
|
+
const e = t("uofg-tab-panels", s);
|
|
7
|
+
return /* @__PURE__ */ n(o, { className: `uofg-tab-panels ${e}`, children: a });
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
l.displayName = "TabPanels";
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
l as TabPanels
|
|
11
12
|
};
|
package/dist/tab.js
CHANGED
package/dist/tabs.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { TabGroup as
|
|
3
|
-
import { twMerge as
|
|
4
|
-
import { Tab as
|
|
5
|
-
import { TabList as
|
|
3
|
+
import { TabGroup as e } from "@headlessui/react";
|
|
4
|
+
import { twMerge as s } from "tailwind-merge";
|
|
5
|
+
import { Tab as T } from "./tab.js";
|
|
6
|
+
import { TabList as u } from "./tab-list.js";
|
|
6
7
|
import { TabPanel as c } from "./tab-panel.js";
|
|
7
8
|
import { TabPanels as N } from "./tab-panels.js";
|
|
8
9
|
function m({ children: o, className: r }) {
|
|
9
|
-
const a =
|
|
10
|
-
return /* @__PURE__ */ t(
|
|
10
|
+
const a = s("uofg-tabs", r);
|
|
11
|
+
return /* @__PURE__ */ t(e, { className: `uofg-tabs ${a}`, children: o });
|
|
11
12
|
}
|
|
12
13
|
m.displayName = "Tabs";
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
T as Tab,
|
|
16
|
+
u as TabList,
|
|
16
17
|
c as TabPanel,
|
|
17
18
|
N as TabPanels,
|
|
18
19
|
m as Tabs
|
package/dist/text-input.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "University of Guelph React Components Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"react": "^19.0.0",
|
|
68
68
|
"react-animate-height": "^3.2.3",
|
|
69
69
|
"react-dom": "^19.0.0",
|
|
70
|
+
"rollup-preserve-directives": "^1.1.3",
|
|
70
71
|
"tailwind-merge": "^3.0.1",
|
|
71
72
|
"tailwind-variants": "^1.0.0",
|
|
72
73
|
"tailwindcss": "^4.0.6",
|
|
@@ -84,5 +85,5 @@
|
|
|
84
85
|
"bugs": {
|
|
85
86
|
"url": "https://github.com/ccswbs/uofg-components/issues"
|
|
86
87
|
},
|
|
87
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "27888e7180d28287f1477a50be72fa05f0e2f517"
|
|
88
89
|
}
|