@uoguelph/react-components 1.0.0-rc.9 → 1.1.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/dist/accordion-button.js +1 -1
- package/dist/alert-footer.js +1 -1
- package/dist/alert-message.js +1 -1
- package/dist/alert-title.js +4 -4
- package/dist/blockquote-author.d.ts +2 -0
- package/dist/blockquote-author.js +30 -0
- package/dist/blockquote-content.d.ts +2 -0
- package/dist/blockquote-content.js +54 -0
- package/dist/blockquote-context.d.ts +2 -0
- package/dist/blockquote-context.js +5 -0
- package/dist/blockquote.js +11 -40
- package/dist/button.js +8 -77
- package/dist/card-content.js +1 -1
- package/dist/card-footer.js +1 -1
- package/dist/carousel.js +18 -18
- package/dist/checkbox.js +24 -36
- package/dist/components/alert/alert-title.d.ts +1 -1
- package/dist/components/blockquote/blockquote-author.d.ts +7 -0
- package/dist/components/blockquote/blockquote-content.d.ts +10 -0
- package/dist/components/blockquote/blockquote-context.d.ts +5 -0
- package/dist/components/blockquote/blockquote.d.ts +3 -1
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -2
- package/dist/components/container/container.d.ts +6 -10
- package/dist/components/info/info.d.ts +1 -1
- package/dist/components/media-caption/media-caption.d.ts +1 -1
- package/dist/components/statistics/statistics-context.d.ts +6 -0
- package/dist/components/statistics/statistics-item-image.d.ts +31 -0
- package/dist/components/statistics/statistics-item-represents.d.ts +9 -0
- package/dist/components/statistics/statistics-item-value.d.ts +9 -0
- package/dist/components/statistics/statistics-item.d.ts +9 -0
- package/dist/components/statistics/statistics.d.ts +13 -0
- package/dist/components/story/story-background-image.d.ts +28 -0
- package/dist/components/story/story-background.d.ts +6 -0
- package/dist/components/story/story-body.d.ts +6 -0
- package/dist/components/story/story-footer.d.ts +6 -0
- package/dist/components/story/story-foreground-content.d.ts +6 -0
- package/dist/components/story/story-foreground-image.d.ts +28 -0
- package/dist/components/story/story-foreground.d.ts +6 -0
- package/dist/components/story/story.d.ts +13 -0
- package/dist/contact.js +1 -1
- package/dist/container.js +14 -20
- package/dist/divider.js +2 -2
- package/dist/embedded-video-modal-button.js +6 -6
- package/dist/embedded-video.js +13 -13
- package/dist/index.css +1 -1
- package/dist/info.js +2 -2
- package/dist/media-caption.js +4 -4
- package/dist/modal.js +1 -1
- package/dist/navigation-link.js +1 -1
- package/dist/statistics-context.d.ts +2 -0
- package/dist/statistics-context.js +5 -0
- package/dist/statistics-item-image.d.ts +2 -0
- package/dist/statistics-item-image.js +19 -0
- package/dist/statistics-item-represents.d.ts +2 -0
- package/dist/statistics-item-represents.js +13 -0
- package/dist/statistics-item-value.d.ts +2 -0
- package/dist/statistics-item-value.js +13 -0
- package/dist/statistics-item.d.ts +2 -0
- package/dist/statistics-item.js +61 -0
- package/dist/statistics.d.ts +2 -0
- package/dist/statistics.js +93 -0
- package/dist/story-background-image.d.ts +2 -0
- package/dist/story-background-image.js +18 -0
- package/dist/story-background.d.ts +2 -0
- package/dist/story-background.js +9 -0
- package/dist/story-body.d.ts +2 -0
- package/dist/story-body.js +12 -0
- package/dist/story-footer.d.ts +2 -0
- package/dist/story-footer.js +16 -0
- package/dist/story-foreground-content.d.ts +2 -0
- package/dist/story-foreground-content.js +12 -0
- package/dist/story-foreground-image.d.ts +2 -0
- package/dist/story-foreground-image.js +24 -0
- package/dist/story-foreground.d.ts +2 -0
- package/dist/story-foreground.js +12 -0
- package/dist/story.d.ts +2 -0
- package/dist/story.js +23 -0
- package/dist/text-input.js +1 -1
- package/dist/utils/use-resize-observer.d.ts +1 -0
- package/dist/utils/use-window-size.d.ts +4 -0
- package/package.json +3 -3
package/dist/accordion-button.js
CHANGED
package/dist/alert-footer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { twMerge as g } from "tailwind-merge";
|
|
3
3
|
function l({ children: o, className: r }) {
|
|
4
|
-
const e = g("uog:flex uog:bg-light
|
|
4
|
+
const e = g("uog:flex uog:bg-grey-light uog:px-4 uog:py-2", r);
|
|
5
5
|
return /* @__PURE__ */ t("div", { className: `uofg-alert-footer ${e}`, children: o });
|
|
6
6
|
}
|
|
7
7
|
l.displayName = "AlertFooter";
|
package/dist/alert-message.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as g } from "react/jsx-runtime";
|
|
|
2
2
|
import { twMerge as s } from "tailwind-merge";
|
|
3
3
|
function t({ children: e, className: o }) {
|
|
4
4
|
const r = s(
|
|
5
|
-
"uog:flex uog:flex-col uog:border-x uog:border-b uog:border-light
|
|
5
|
+
"uog:flex uog:flex-col uog:border-x uog:border-b uog:border-grey-light uog:bg-white uog:px-4 uog:py-3",
|
|
6
6
|
o
|
|
7
7
|
);
|
|
8
8
|
return /* @__PURE__ */ g("div", { className: `uofg-alert-message ${r}`, children: e });
|
package/dist/alert-title.js
CHANGED
|
@@ -24,11 +24,11 @@ function x({ color: e = "red", className: o, children: r }) {
|
|
|
24
24
|
green: {
|
|
25
25
|
container: "uog:bg-green uog:text-green-contrast"
|
|
26
26
|
},
|
|
27
|
-
"light
|
|
28
|
-
container: "uog:bg-light
|
|
27
|
+
"grey-light": {
|
|
28
|
+
container: "uog:bg-grey-light uog:text-grey-light-contrast"
|
|
29
29
|
},
|
|
30
|
-
"dark
|
|
31
|
-
container: "uog:bg-dark
|
|
30
|
+
"grey-dark": {
|
|
31
|
+
container: "uog:bg-grey-dark uog:text-grey-dark-contrast"
|
|
32
32
|
},
|
|
33
33
|
black: {
|
|
34
34
|
container: "uog:bg-black uog:text-black-contrast"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as i } from "react";
|
|
3
|
+
import { tv as g } from "tailwind-variants";
|
|
4
|
+
import { BlockquoteContext as n } from "./blockquote-context.js";
|
|
5
|
+
function h({ name: l, title: e }) {
|
|
6
|
+
const o = i(n), s = g({
|
|
7
|
+
slots: {
|
|
8
|
+
base: "uog:border-l-3 uog:pl-4 uog:flex uog:flex-col uog:gap-1 uog:items-start uog:font-light",
|
|
9
|
+
name: "uog:text-base uog:not-italic uog:font-bold",
|
|
10
|
+
title: "uog:text-base uog:italic"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
color: {
|
|
14
|
+
yellow: {
|
|
15
|
+
base: "uog:border-yellow"
|
|
16
|
+
},
|
|
17
|
+
blue: {
|
|
18
|
+
base: "uog:border-blue"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}), { base: u, name: a, title: r } = s({ color: (o == null ? void 0 : o.color) ?? "yellow" });
|
|
23
|
+
return /* @__PURE__ */ c("div", { className: `uofg-blockquote-author ${u()}`, children: [
|
|
24
|
+
/* @__PURE__ */ t("cite", { className: `uofg-blockquote-author-name ${a()}`, children: l }),
|
|
25
|
+
e && /* @__PURE__ */ t("span", { className: `uofg-blockquote-author-title ${r()}`, children: e })
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
h as BlockquoteAuthor
|
|
30
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { f as r, a as m } from "./solid-DM6GVhkF.js";
|
|
3
|
+
import { FontAwesomeIcon as c } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { useContext as a } from "react";
|
|
5
|
+
import { twMerge as g } from "tailwind-merge";
|
|
6
|
+
import { tv as f } from "tailwind-variants";
|
|
7
|
+
import { BlockquoteContext as b } from "./blockquote-context.js";
|
|
8
|
+
function k({ className: l, children: n }) {
|
|
9
|
+
const o = a(b), i = f({
|
|
10
|
+
slots: {
|
|
11
|
+
base: "uog:font-light uog:block uog:w-full uog:text-center uog:text-3xl uog:italic",
|
|
12
|
+
icons: "uog:inline-block uog:h-[1em]"
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
color: {
|
|
16
|
+
yellow: {
|
|
17
|
+
icons: "uog:text-yellow"
|
|
18
|
+
},
|
|
19
|
+
blue: {
|
|
20
|
+
icons: "uog:text-blue"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
direction: {
|
|
24
|
+
left: {
|
|
25
|
+
icons: "uog:mr-[0.3em]"
|
|
26
|
+
},
|
|
27
|
+
right: {
|
|
28
|
+
icons: "uog:ml-[0.25em]"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}), { base: s, icons: e } = i({ color: (o == null ? void 0 : o.color) ?? "yellow" });
|
|
33
|
+
return /* @__PURE__ */ u("blockquote", { className: `uofg-blockquote-content ${g(s(), l)}`, children: [
|
|
34
|
+
/* @__PURE__ */ t(
|
|
35
|
+
c,
|
|
36
|
+
{
|
|
37
|
+
icon: r,
|
|
38
|
+
className: `uofg-blockquote-content-left-quote ${e({ direction: "left" })}`
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ t("span", { className: "uofg-blockquote-content-text", children: n }),
|
|
42
|
+
/* @__PURE__ */ t(
|
|
43
|
+
c,
|
|
44
|
+
{
|
|
45
|
+
icon: m,
|
|
46
|
+
className: `uofg-blockquote-content-right-quote ${e({ direction: "right" })}`
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
k.displayName = "BlockquoteContent";
|
|
52
|
+
export {
|
|
53
|
+
k as BlockquoteContent
|
|
54
|
+
};
|
package/dist/blockquote.js
CHANGED
|
@@ -1,43 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
slots: {
|
|
9
|
-
base: a("uog:font-light uog:block uog:w-full uog:text-center uog:text-3xl uog:italic", l),
|
|
10
|
-
icons: "uog:inline-block uog:h-[1em]"
|
|
11
|
-
},
|
|
12
|
-
variants: {
|
|
13
|
-
color: {
|
|
14
|
-
red: {
|
|
15
|
-
icons: "uog:text-red"
|
|
16
|
-
},
|
|
17
|
-
yellow: {
|
|
18
|
-
icons: "uog:text-yellow"
|
|
19
|
-
},
|
|
20
|
-
blue: {
|
|
21
|
-
icons: "uog:text-blue"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
direction: {
|
|
25
|
-
left: {
|
|
26
|
-
icons: "uog:mr-[0.3em]"
|
|
27
|
-
},
|
|
28
|
-
right: {
|
|
29
|
-
icons: "uog:ml-[0.25em]"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}), { base: s, icons: t } = i({ color: u });
|
|
34
|
-
return /* @__PURE__ */ n("blockquote", { className: `uofg-blockquote ${s()}`, children: [
|
|
35
|
-
/* @__PURE__ */ o(e, { icon: r, className: `uofg-blockquote-left-quote ${t({ direction: "left" })}` }),
|
|
36
|
-
/* @__PURE__ */ o("span", { className: "uofg-blockquote-content", children: c }),
|
|
37
|
-
/* @__PURE__ */ o(e, { icon: g, className: `uofg-blockquote-right-quote ${t({ direction: "right" })}` })
|
|
38
|
-
] });
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as l } from "tailwind-merge";
|
|
3
|
+
import { BlockquoteContext as u } from "./blockquote-context.js";
|
|
4
|
+
import { BlockquoteAuthor as x } from "./blockquote-author.js";
|
|
5
|
+
import { BlockquoteContent as k } from "./blockquote-content.js";
|
|
6
|
+
function c({ className: e, children: t, color: r = "yellow" }) {
|
|
7
|
+
return /* @__PURE__ */ o(u.Provider, { value: { color: r }, children: /* @__PURE__ */ o("div", { className: `uofg-blockquote ${l("flex flex-col gap-2", e)}`, children: t }) });
|
|
39
8
|
}
|
|
40
|
-
|
|
9
|
+
c.displayName = "Blockquote";
|
|
41
10
|
export {
|
|
42
|
-
|
|
11
|
+
c as Blockquote,
|
|
12
|
+
x as BlockquoteAuthor,
|
|
13
|
+
k as BlockquoteContent
|
|
43
14
|
};
|
package/dist/button.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { twMerge as b } from "tailwind-merge";
|
|
3
|
-
import { tv as
|
|
4
|
-
const
|
|
3
|
+
import { tv as n } from "tailwind-variants";
|
|
4
|
+
const d = "button";
|
|
5
5
|
function f({
|
|
6
|
-
as:
|
|
6
|
+
as: e,
|
|
7
7
|
color: l = "red",
|
|
8
8
|
outlined: s = !1,
|
|
9
9
|
children: u,
|
|
10
10
|
className: t,
|
|
11
|
-
disabled:
|
|
11
|
+
disabled: o = !1,
|
|
12
12
|
...r
|
|
13
13
|
}) {
|
|
14
|
-
const
|
|
14
|
+
const c = e ?? d, i = n({
|
|
15
15
|
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:focus-visible:ring-2 uog:focus-visible:ring-offset-2",
|
|
16
16
|
variants: {
|
|
17
17
|
color: {
|
|
@@ -19,10 +19,7 @@ function f({
|
|
|
19
19
|
yellow: "uog:focus-visible:ring-yellow",
|
|
20
20
|
blue: "uog:focus-visible:ring-blue",
|
|
21
21
|
green: "uog:focus-visible:ring-green",
|
|
22
|
-
|
|
23
|
-
"dark-grey": "uog:focus-visible:ring-dark-grey",
|
|
24
|
-
black: "uog:focus-visible:ring-black",
|
|
25
|
-
white: "uog:focus-visible:ring-white"
|
|
22
|
+
black: "uog:focus-visible:ring-black"
|
|
26
23
|
},
|
|
27
24
|
outlined: {
|
|
28
25
|
true: "uog:border-2"
|
|
@@ -120,50 +117,6 @@ function f({
|
|
|
120
117
|
disabled: !1,
|
|
121
118
|
class: "uog:hocus-visible:bg-green uog:hocus-visible:text-green-contrast"
|
|
122
119
|
},
|
|
123
|
-
{
|
|
124
|
-
color: "light-grey",
|
|
125
|
-
outlined: !1,
|
|
126
|
-
class: "uog:bg-light-grey uog:text-light-grey-contrast"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
color: "light-grey",
|
|
130
|
-
outlined: !0,
|
|
131
|
-
class: "uog:border-light-grey uog:text-light-grey"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
color: "light-grey",
|
|
135
|
-
outlined: !1,
|
|
136
|
-
disabled: !1,
|
|
137
|
-
class: "uog:hocus-visible:bg-light-grey-focus"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
color: "light-grey",
|
|
141
|
-
outlined: !0,
|
|
142
|
-
disabled: !1,
|
|
143
|
-
class: "uog:hocus-visible:bg-light-grey uog:hocus-visible:text-light-grey-contrast"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
color: "dark-grey",
|
|
147
|
-
outlined: !1,
|
|
148
|
-
class: "uog:bg-dark-grey uog:text-dark-grey-contrast"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
color: "dark-grey",
|
|
152
|
-
outlined: !0,
|
|
153
|
-
class: "uog:border-dark-grey uog:text-dark-grey"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
color: "dark-grey",
|
|
157
|
-
outlined: !1,
|
|
158
|
-
disabled: !1,
|
|
159
|
-
class: "uog:hocus-visible:bg-dark-grey-focus"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
color: "dark-grey",
|
|
163
|
-
outlined: !0,
|
|
164
|
-
disabled: !1,
|
|
165
|
-
class: "uog:hocus-visible:bg-dark-grey uog:hocus-visible:text-dark-grey-contrast"
|
|
166
|
-
},
|
|
167
120
|
{
|
|
168
121
|
color: "black",
|
|
169
122
|
outlined: !1,
|
|
@@ -185,32 +138,10 @@ function f({
|
|
|
185
138
|
outlined: !0,
|
|
186
139
|
disabled: !1,
|
|
187
140
|
class: "uog:hocus-visible:bg-black uog:hocus-visible:text-black-contrast"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
color: "white",
|
|
191
|
-
outlined: !1,
|
|
192
|
-
class: "uog:bg-white uog:text-white-contrast"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
color: "white",
|
|
196
|
-
outlined: !0,
|
|
197
|
-
class: "uog:border-white uog:text-white"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
color: "white",
|
|
201
|
-
outlined: !1,
|
|
202
|
-
disabled: !1,
|
|
203
|
-
class: "uog:hocus-visible:bg-white-focus"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
color: "white",
|
|
207
|
-
outlined: !0,
|
|
208
|
-
disabled: !1,
|
|
209
|
-
class: "uog:hocus-visible:bg-white uog:hocus-visible:text-white-contrast"
|
|
210
141
|
}
|
|
211
142
|
]
|
|
212
|
-
}),
|
|
213
|
-
return /* @__PURE__ */ a(
|
|
143
|
+
}), g = b(i({ color: l, outlined: s, disabled: o }), t);
|
|
144
|
+
return /* @__PURE__ */ a(c, { className: `uofg-button ${g}`, disabled: o, ...r, children: u });
|
|
214
145
|
}
|
|
215
146
|
f.displayName = "Button";
|
|
216
147
|
export {
|
package/dist/card-content.js
CHANGED
|
@@ -5,7 +5,7 @@ import { tv as n } from "tailwind-variants";
|
|
|
5
5
|
import { CardContext as u } from "./card-context.js";
|
|
6
6
|
function a({ children: t, className: r }) {
|
|
7
7
|
const o = s(u), e = n({
|
|
8
|
-
base: "uog:flex uog:flex-col uog:gap-2 uog:bg-light-
|
|
8
|
+
base: "uog:flex uog:flex-col uog:gap-2 uog:bg-grey-light-bg uog:p-5 uog:text-grey-light-contrast",
|
|
9
9
|
variants: {
|
|
10
10
|
isLink: {
|
|
11
11
|
true: "uog:transition-colors uog:group-hocus-visible:bg-yellow uog:group-hocus-visible:text-yellow-contrast"
|
package/dist/card-footer.js
CHANGED
|
@@ -5,7 +5,7 @@ import { tv as n } from "tailwind-variants";
|
|
|
5
5
|
import { CardContext as s } from "./card-context.js";
|
|
6
6
|
function u({ children: r, className: t }) {
|
|
7
7
|
const o = g(s), e = n({
|
|
8
|
-
base: "uog:flex uog:gap-2 uog:bg-light
|
|
8
|
+
base: "uog:flex uog:gap-2 uog:bg-grey-light uog:px-5 uog:py-2 uog:text-grey-light-contrast uog:transition-colors",
|
|
9
9
|
variants: {
|
|
10
10
|
centered: {
|
|
11
11
|
true: "uog:justify-center"
|
package/dist/carousel.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsxs as g, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { b as
|
|
2
|
+
import { b as k, c as I } from "./solid-DM6GVhkF.js";
|
|
3
3
|
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { Children as A, useRef as d, useState as F, useEffect as L } from "react";
|
|
5
5
|
import { tv as S } from "tailwind-variants";
|
|
6
6
|
import { l as q, b as M, m as w, c as R } from "./math-utils-BwzyIQRL.js";
|
|
7
|
-
const z = (
|
|
8
|
-
const n =
|
|
7
|
+
const z = (c, m, e) => {
|
|
8
|
+
const n = c.scrollLeft, s = performance.now();
|
|
9
9
|
return new Promise((r) => {
|
|
10
10
|
const a = (o) => {
|
|
11
11
|
const f = o - s, i = M(Math.min(f / e, 1), 0.25, 0, 0.25, 1);
|
|
12
|
-
|
|
12
|
+
c.scrollLeft = q(n, m, i), f < e ? requestAnimationFrame(a) : r();
|
|
13
13
|
};
|
|
14
14
|
requestAnimationFrame(a);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
function H({ children:
|
|
18
|
-
const n = A.count(
|
|
17
|
+
function H({ children: c, display: m = 1, loop: e = "none" }) {
|
|
18
|
+
const n = A.count(c), s = Math.max(m, 1), r = d(null), a = d(0), [o, f] = F(0), i = n - s, h = d(!1);
|
|
19
19
|
L(() => {
|
|
20
20
|
var t;
|
|
21
21
|
if (!r.current)
|
|
22
22
|
return;
|
|
23
|
-
const
|
|
24
|
-
(e === "jump" || e === "none") && (h.current = !0, z(r.current,
|
|
23
|
+
const l = ((t = r.current) == null ? void 0 : t.offsetWidth) / s;
|
|
24
|
+
(e === "jump" || e === "none") && (h.current = !0, z(r.current, l * o, 250).then(() => {
|
|
25
25
|
h.current = !1;
|
|
26
26
|
})), a.current = o;
|
|
27
27
|
}, [o, e, i, s]);
|
|
28
|
-
const x = (
|
|
28
|
+
const x = (l) => {
|
|
29
29
|
if (h.current) return;
|
|
30
30
|
let t;
|
|
31
31
|
switch (e) {
|
|
32
32
|
case "none":
|
|
33
|
-
t = R(o +
|
|
33
|
+
t = R(o + l, 0, i);
|
|
34
34
|
break;
|
|
35
35
|
case "jump":
|
|
36
|
-
t = w(o +
|
|
36
|
+
t = w(o + l, i + 1);
|
|
37
37
|
break;
|
|
38
38
|
case "continuous":
|
|
39
|
-
t = w(o +
|
|
39
|
+
t = w(o + l, n);
|
|
40
40
|
break;
|
|
41
41
|
default:
|
|
42
42
|
t = 0;
|
|
@@ -47,7 +47,7 @@ function H({ children: l, display: m = 1, loop: e = "none" }) {
|
|
|
47
47
|
base: "uog:relative uog:flex uog:h-fit uog:min-h-[7rem] uog:w-full uog:flex-col-reverse",
|
|
48
48
|
contentContainer: "uog:grid uog:w-full uog:flex-1 uog:grid-cols-[repeat(var(--items),calc(100%/var(--display)))] uog:overflow-x-hidden [&>*]:[grid-row:1]",
|
|
49
49
|
controlContainer: "uog:md:contents uog:flex uog:h-16 uog:w-full uog:pt-8",
|
|
50
|
-
control: "uog:sm:text-6xl uog:md:absolute uog:flex uog:h-full uog:w-16 uog:flex-1 uog:items-center uog:justify-center uog:text-3xl uog:text-
|
|
50
|
+
control: "uog:sm:text-6xl uog:md:absolute uog:flex uog:h-full uog:w-16 uog:flex-1 uog:items-center uog:justify-center uog:text-3xl uog:text-blue uog:transition-[transform,color,opacity,visibility] uog:focus-visible:ring-2 uog:focus-visible:ring-offset-2 uog:focus-visible:outline-none uog:hocus-visible:text-blue-focus"
|
|
51
51
|
},
|
|
52
52
|
variants: {
|
|
53
53
|
showControls: {
|
|
@@ -67,9 +67,9 @@ function H({ children: l, display: m = 1, loop: e = "none" }) {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
}), b = n > s, { base: y, contentContainer:
|
|
70
|
+
}), b = n > s, { base: y, contentContainer: N, controlContainer: j, control: v } = C({ showControls: b });
|
|
71
71
|
return /* @__PURE__ */ g("div", { className: y(), children: [
|
|
72
|
-
b && /* @__PURE__ */ g("div", { className:
|
|
72
|
+
b && /* @__PURE__ */ g("div", { className: j(), children: [
|
|
73
73
|
/* @__PURE__ */ g(
|
|
74
74
|
"button",
|
|
75
75
|
{
|
|
@@ -77,7 +77,7 @@ function H({ children: l, display: m = 1, loop: e = "none" }) {
|
|
|
77
77
|
className: v({ showControls: !(e === "none" && o === 0), direction: "left" }),
|
|
78
78
|
children: [
|
|
79
79
|
/* @__PURE__ */ u("span", { className: "uog:sr-only", children: "Shift left" }),
|
|
80
|
-
/* @__PURE__ */ u(p, { icon:
|
|
80
|
+
/* @__PURE__ */ u(p, { icon: k })
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
),
|
|
@@ -96,14 +96,14 @@ function H({ children: l, display: m = 1, loop: e = "none" }) {
|
|
|
96
96
|
/* @__PURE__ */ u(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
|
-
className:
|
|
99
|
+
className: N(),
|
|
100
100
|
ref: r,
|
|
101
101
|
style: {
|
|
102
102
|
// Define CSS variables for the grid layout
|
|
103
103
|
"--items": n,
|
|
104
104
|
"--display": s
|
|
105
105
|
},
|
|
106
|
-
children:
|
|
106
|
+
children: c
|
|
107
107
|
}
|
|
108
108
|
)
|
|
109
109
|
] });
|
package/dist/checkbox.js
CHANGED
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { e as p } from "./regular-BRNZck7j.js";
|
|
3
3
|
import { FontAwesomeIcon as y } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { Field as
|
|
4
|
+
import { Field as w, Checkbox as v, Label as N, Description as C } from "@headlessui/react";
|
|
5
5
|
import { useState as j } from "react";
|
|
6
6
|
import { tv as F } from "tailwind-variants";
|
|
7
7
|
function z({
|
|
8
|
-
checked:
|
|
8
|
+
checked: g = !1,
|
|
9
9
|
label: c,
|
|
10
|
-
description:
|
|
11
|
-
color:
|
|
12
|
-
disabled:
|
|
10
|
+
description: t,
|
|
11
|
+
color: r = "yellow",
|
|
12
|
+
disabled: s = !1,
|
|
13
13
|
onChange: o,
|
|
14
14
|
...l
|
|
15
15
|
}) {
|
|
16
|
-
const [a,
|
|
16
|
+
const [a, n] = j(g), b = F({
|
|
17
17
|
slots: {
|
|
18
18
|
base: "uog:flex uog:flex-col uog:gap-0.5 uog:cursor-pointer",
|
|
19
19
|
container: "uog:flex uog:items-center uog:gap-2",
|
|
20
20
|
box: "uog:group uog:rounded uog:flex uog:size-4 uog:items-center uog:justify-center uog:border uog:bg-white uog:p-3 uog:transition-colors uog:focus-visible:ring-2 uog:focus-visible:ring-offset-2 uog:focus-visible:outline-none",
|
|
21
21
|
check: "uog:h-5 uog:w-5 uog:opacity-0 uog:transition-opacity uog:group-ui-checked:opacity-100 uog:user-select-none",
|
|
22
22
|
label: "uog:text-body-copy",
|
|
23
|
-
description: "uog:text-sm uog:text-dark
|
|
23
|
+
description: "uog:text-sm uog:text-grey-dark"
|
|
24
24
|
},
|
|
25
25
|
variants: {
|
|
26
26
|
color: {
|
|
27
|
-
red: {
|
|
28
|
-
box: "uog:focus-visible:ring-red uog:ui-checked:bg-red",
|
|
29
|
-
check: "uog:text-red-contrast"
|
|
30
|
-
},
|
|
31
27
|
yellow: {
|
|
32
28
|
box: "uog:focus-visible:ring-yellow uog:ui-checked:bg-yellow",
|
|
33
29
|
check: "uog:text-yellow-contrast"
|
|
@@ -40,14 +36,6 @@ function z({
|
|
|
40
36
|
box: "uog:focus-visible:ring-green uog:ui-checked:bg-green",
|
|
41
37
|
check: "uog:text-green-contrast"
|
|
42
38
|
},
|
|
43
|
-
"light-grey": {
|
|
44
|
-
box: "uog:focus-visible:ring-light-grey uog:ui-checked:bg-light-grey",
|
|
45
|
-
check: "uog:text-light-grey-contrast"
|
|
46
|
-
},
|
|
47
|
-
"dark-grey": {
|
|
48
|
-
box: "uog:focus-visible:ring-dark-grey uog:ui-checked:bg-dark-grey",
|
|
49
|
-
check: "uog:text-dark-grey-contrast"
|
|
50
|
-
},
|
|
51
39
|
black: {
|
|
52
40
|
box: "uog:focus-visible:ring-black uog:ui-checked:bg-black",
|
|
53
41
|
check: "uog:text-black-contrast"
|
|
@@ -60,37 +48,37 @@ function z({
|
|
|
60
48
|
disabled: {
|
|
61
49
|
true: {
|
|
62
50
|
base: "uog:opacity-60",
|
|
63
|
-
label: "uog:text-dark
|
|
51
|
+
label: "uog:text-grey-dark"
|
|
64
52
|
},
|
|
65
53
|
false: {}
|
|
66
54
|
}
|
|
67
55
|
}
|
|
68
56
|
}), {
|
|
69
57
|
base: h,
|
|
70
|
-
container:
|
|
71
|
-
box:
|
|
72
|
-
check:
|
|
73
|
-
label:
|
|
58
|
+
container: x,
|
|
59
|
+
box: f,
|
|
60
|
+
check: k,
|
|
61
|
+
label: d,
|
|
74
62
|
description: m
|
|
75
|
-
} =
|
|
76
|
-
return /* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
63
|
+
} = b({ color: r, disabled: s });
|
|
64
|
+
return /* @__PURE__ */ i(w, { className: h(), children: [
|
|
65
|
+
/* @__PURE__ */ i("div", { className: x(), children: [
|
|
78
66
|
/* @__PURE__ */ e(
|
|
79
|
-
|
|
67
|
+
v,
|
|
80
68
|
{
|
|
81
69
|
checked: a,
|
|
82
|
-
onChange: (
|
|
83
|
-
|
|
70
|
+
onChange: (u) => {
|
|
71
|
+
n(u), o == null || o(u);
|
|
84
72
|
},
|
|
85
|
-
disabled:
|
|
86
|
-
className:
|
|
73
|
+
disabled: s,
|
|
74
|
+
className: f(),
|
|
87
75
|
...l,
|
|
88
|
-
children: /* @__PURE__ */ e(y, { className:
|
|
76
|
+
children: /* @__PURE__ */ e(y, { className: k(), icon: p })
|
|
89
77
|
}
|
|
90
78
|
),
|
|
91
|
-
c && /* @__PURE__ */ e(N, { className:
|
|
79
|
+
c && /* @__PURE__ */ e(N, { className: d(), children: c })
|
|
92
80
|
] }),
|
|
93
|
-
|
|
81
|
+
t && /* @__PURE__ */ e(C, { className: m(), children: t })
|
|
94
82
|
] });
|
|
95
83
|
}
|
|
96
84
|
z.displayName = "Checkbox";
|
|
@@ -7,7 +7,7 @@ export type AlertTitleProps = PropsWithChildren<{
|
|
|
7
7
|
*
|
|
8
8
|
* @default 'red'
|
|
9
9
|
*/
|
|
10
|
-
color?: 'red' | 'yellow' | 'blue' | 'green' | 'light
|
|
10
|
+
color?: 'red' | 'yellow' | 'blue' | 'green' | 'grey-light' | 'grey-dark' | 'black' | 'white';
|
|
11
11
|
}>;
|
|
12
12
|
/** The AlertTitle component is used to display the title of an alert. */
|
|
13
13
|
export declare function AlertTitle({ color, className, children }: AlertTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type BlockquoteAuthorProps = {
|
|
2
|
+
/** The author of the blockquote. */
|
|
3
|
+
name: string;
|
|
4
|
+
/** The title of the author. */
|
|
5
|
+
title?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function BlockquoteAuthor({ name, title }: BlockquoteAuthorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export type BlockquoteContentProps = PropsWithChildren<{
|
|
3
|
+
/** Additional classes to apply to the blockquote */
|
|
4
|
+
className?: string;
|
|
5
|
+
}>;
|
|
6
|
+
/** The Blockquote component is used to highlight a quote or excerpt from another source. */
|
|
7
|
+
export declare function BlockquoteContent({ className, children }: BlockquoteContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace BlockquoteContent {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -7,10 +7,12 @@ export type BlockquoteProps = PropsWithChildren<{
|
|
|
7
7
|
*
|
|
8
8
|
* @default 'yellow'
|
|
9
9
|
*/
|
|
10
|
-
color?: 'yellow' | '
|
|
10
|
+
color?: 'yellow' | 'blue';
|
|
11
11
|
}>;
|
|
12
12
|
/** The Blockquote component is used to highlight a quote or excerpt from another source. */
|
|
13
13
|
export declare function Blockquote({ className, children, color }: BlockquoteProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare namespace Blockquote {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
17
|
+
export { BlockquoteAuthor } from './blockquote-author';
|
|
18
|
+
export { BlockquoteContent } from './blockquote-content';
|
|
@@ -12,7 +12,7 @@ type ButtonPropsBase = {
|
|
|
12
12
|
*
|
|
13
13
|
* @default 'red'
|
|
14
14
|
*/
|
|
15
|
-
color?: 'red' | 'yellow' | 'blue' | 'green' | '
|
|
15
|
+
color?: 'red' | 'yellow' | 'blue' | 'green' | 'black';
|
|
16
16
|
/**
|
|
17
17
|
* Whether the button should be outlined
|
|
18
18
|
*
|
|
@@ -30,7 +30,7 @@ type ButtonPropsBase = {
|
|
|
30
30
|
};
|
|
31
31
|
export type ButtonProps<T extends ButtonElementType = typeof defaultElement> = PropsWithChildren<ButtonPropsAs<T> & ComponentPropsWithoutRef<T> & ButtonPropsBase>;
|
|
32
32
|
/**
|
|
33
|
-
* The Button component is
|
|
33
|
+
* The Button component is an interactive component designed to capture user actions (such as submitting forms). It can
|
|
34
34
|
* also function as a link to another page or resource.
|
|
35
35
|
*/
|
|
36
36
|
export declare function Button<T extends ButtonElementType = typeof defaultElement>({ as, color, outlined, children, className, disabled, ...rest }: ButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,9 +13,9 @@ export type CheckboxProps = {
|
|
|
13
13
|
/**
|
|
14
14
|
* The color of the checkbox
|
|
15
15
|
*
|
|
16
|
-
* @default '
|
|
16
|
+
* @default 'yellow'
|
|
17
17
|
*/
|
|
18
|
-
color?: '
|
|
18
|
+
color?: 'yellow' | 'blue' | 'green' | 'black' | 'white';
|
|
19
19
|
/**
|
|
20
20
|
* Whether the checkbox is disabled
|
|
21
21
|
*
|