@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.
Files changed (82) hide show
  1. package/dist/accordion-button.js +1 -1
  2. package/dist/alert-footer.js +1 -1
  3. package/dist/alert-message.js +1 -1
  4. package/dist/alert-title.js +4 -4
  5. package/dist/blockquote-author.d.ts +2 -0
  6. package/dist/blockquote-author.js +30 -0
  7. package/dist/blockquote-content.d.ts +2 -0
  8. package/dist/blockquote-content.js +54 -0
  9. package/dist/blockquote-context.d.ts +2 -0
  10. package/dist/blockquote-context.js +5 -0
  11. package/dist/blockquote.js +11 -40
  12. package/dist/button.js +8 -77
  13. package/dist/card-content.js +1 -1
  14. package/dist/card-footer.js +1 -1
  15. package/dist/carousel.js +18 -18
  16. package/dist/checkbox.js +24 -36
  17. package/dist/components/alert/alert-title.d.ts +1 -1
  18. package/dist/components/blockquote/blockquote-author.d.ts +7 -0
  19. package/dist/components/blockquote/blockquote-content.d.ts +10 -0
  20. package/dist/components/blockquote/blockquote-context.d.ts +5 -0
  21. package/dist/components/blockquote/blockquote.d.ts +3 -1
  22. package/dist/components/button/button.d.ts +2 -2
  23. package/dist/components/checkbox/checkbox.d.ts +2 -2
  24. package/dist/components/container/container.d.ts +6 -10
  25. package/dist/components/info/info.d.ts +1 -1
  26. package/dist/components/media-caption/media-caption.d.ts +1 -1
  27. package/dist/components/statistics/statistics-context.d.ts +6 -0
  28. package/dist/components/statistics/statistics-item-image.d.ts +31 -0
  29. package/dist/components/statistics/statistics-item-represents.d.ts +9 -0
  30. package/dist/components/statistics/statistics-item-value.d.ts +9 -0
  31. package/dist/components/statistics/statistics-item.d.ts +9 -0
  32. package/dist/components/statistics/statistics.d.ts +13 -0
  33. package/dist/components/story/story-background-image.d.ts +28 -0
  34. package/dist/components/story/story-background.d.ts +6 -0
  35. package/dist/components/story/story-body.d.ts +6 -0
  36. package/dist/components/story/story-footer.d.ts +6 -0
  37. package/dist/components/story/story-foreground-content.d.ts +6 -0
  38. package/dist/components/story/story-foreground-image.d.ts +28 -0
  39. package/dist/components/story/story-foreground.d.ts +6 -0
  40. package/dist/components/story/story.d.ts +13 -0
  41. package/dist/contact.js +1 -1
  42. package/dist/container.js +14 -20
  43. package/dist/divider.js +2 -2
  44. package/dist/embedded-video-modal-button.js +6 -6
  45. package/dist/embedded-video.js +13 -13
  46. package/dist/index.css +1 -1
  47. package/dist/info.js +2 -2
  48. package/dist/media-caption.js +4 -4
  49. package/dist/modal.js +1 -1
  50. package/dist/navigation-link.js +1 -1
  51. package/dist/statistics-context.d.ts +2 -0
  52. package/dist/statistics-context.js +5 -0
  53. package/dist/statistics-item-image.d.ts +2 -0
  54. package/dist/statistics-item-image.js +19 -0
  55. package/dist/statistics-item-represents.d.ts +2 -0
  56. package/dist/statistics-item-represents.js +13 -0
  57. package/dist/statistics-item-value.d.ts +2 -0
  58. package/dist/statistics-item-value.js +13 -0
  59. package/dist/statistics-item.d.ts +2 -0
  60. package/dist/statistics-item.js +61 -0
  61. package/dist/statistics.d.ts +2 -0
  62. package/dist/statistics.js +93 -0
  63. package/dist/story-background-image.d.ts +2 -0
  64. package/dist/story-background-image.js +18 -0
  65. package/dist/story-background.d.ts +2 -0
  66. package/dist/story-background.js +9 -0
  67. package/dist/story-body.d.ts +2 -0
  68. package/dist/story-body.js +12 -0
  69. package/dist/story-footer.d.ts +2 -0
  70. package/dist/story-footer.js +16 -0
  71. package/dist/story-foreground-content.d.ts +2 -0
  72. package/dist/story-foreground-content.js +12 -0
  73. package/dist/story-foreground-image.d.ts +2 -0
  74. package/dist/story-foreground-image.js +24 -0
  75. package/dist/story-foreground.d.ts +2 -0
  76. package/dist/story-foreground.js +12 -0
  77. package/dist/story.d.ts +2 -0
  78. package/dist/story.js +23 -0
  79. package/dist/text-input.js +1 -1
  80. package/dist/utils/use-resize-observer.d.ts +1 -0
  81. package/dist/utils/use-window-size.d.ts +4 -0
  82. package/package.json +3 -3
@@ -20,7 +20,7 @@ function x({ children: u, className: n }) {
20
20
  },
21
21
  false: {
22
22
  icon: "uog:rotate-90",
23
- button: "uog:bg-light-grey-bg uog:text-blue-on-light"
23
+ button: "uog:bg-grey-light-bg uog:text-blue-on-light"
24
24
  }
25
25
  }
26
26
  }
@@ -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-grey uog:px-4 uog:py-2", r);
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";
@@ -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-grey uog:bg-white uog:px-4 uog:py-3",
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 });
@@ -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-grey": {
28
- container: "uog:bg-light-grey uog:text-light-grey-contrast"
27
+ "grey-light": {
28
+ container: "uog:bg-grey-light uog:text-grey-light-contrast"
29
29
  },
30
- "dark-grey": {
31
- container: "uog:bg-dark-grey uog:text-dark-grey-contrast"
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,2 @@
1
+ export * from './components/blockquote/blockquote-author'
2
+ export {}
@@ -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,2 @@
1
+ export * from './components/blockquote/blockquote-content'
2
+ export {}
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ export * from './components/blockquote/blockquote-context'
2
+ export {}
@@ -0,0 +1,5 @@
1
+ import { createContext as t } from "react";
2
+ const e = t(null);
3
+ export {
4
+ e as BlockquoteContext
5
+ };
@@ -1,43 +1,14 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import { f as r, a as g } from "./solid-DM6GVhkF.js";
3
- import { FontAwesomeIcon as e } from "@fortawesome/react-fontawesome";
4
- import { twMerge as a } from "tailwind-merge";
5
- import { tv as m } from "tailwind-variants";
6
- function f({ className: l, children: c, color: u = "yellow" }) {
7
- const i = m({
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
- f.displayName = "Blockquote";
9
+ c.displayName = "Blockquote";
41
10
  export {
42
- f as Blockquote
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 d } from "tailwind-variants";
4
- const n = "button";
3
+ import { tv as n } from "tailwind-variants";
4
+ const d = "button";
5
5
  function f({
6
- as: o,
6
+ as: e,
7
7
  color: l = "red",
8
8
  outlined: s = !1,
9
9
  children: u,
10
10
  className: t,
11
- disabled: e = !1,
11
+ disabled: o = !1,
12
12
  ...r
13
13
  }) {
14
- const i = o ?? n, g = d({
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
- "light-grey": "uog:focus-visible:ring-light-grey",
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
- }), c = b(g({ color: l, outlined: s, disabled: e }), t);
213
- return /* @__PURE__ */ a(i, { className: `uofg-button ${c}`, disabled: e, ...r, children: u });
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 {
@@ -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-grey-bg uog:p-5 uog:text-light-grey-contrast",
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"
@@ -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-grey uog:px-5 uog:py-2 uog:text-light-grey-contrast uog:transition-colors",
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 j, c as I } from "./solid-DM6GVhkF.js";
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 = (l, m, e) => {
8
- const n = l.scrollLeft, s = performance.now();
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
- l.scrollLeft = q(n, m, i), f < e ? requestAnimationFrame(a) : r();
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: l, display: m = 1, loop: e = "none" }) {
18
- const n = A.count(l), s = Math.max(m, 1), r = d(null), a = d(0), [o, f] = F(0), i = n - s, h = d(!1);
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 c = ((t = r.current) == null ? void 0 : t.offsetWidth) / s;
24
- (e === "jump" || e === "none") && (h.current = !0, z(r.current, c * o, 250).then(() => {
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 = (c) => {
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 + c, 0, i);
33
+ t = R(o + l, 0, i);
34
34
  break;
35
35
  case "jump":
36
- t = w(o + c, i + 1);
36
+ t = w(o + l, i + 1);
37
37
  break;
38
38
  case "continuous":
39
- t = w(o + c, n);
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-yellow 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-black uog:focus-visible:text-black"
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: k, controlContainer: N, control: v } = C({ showControls: b });
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: N(), children: [
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: j })
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: k(),
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: l
106
+ children: c
107
107
  }
108
108
  )
109
109
  ] });
package/dist/checkbox.js CHANGED
@@ -1,33 +1,29 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
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 v, Checkbox as w, Label as N, Description as C } from "@headlessui/react";
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: r = !1,
8
+ checked: g = !1,
9
9
  label: c,
10
- description: g,
11
- color: s = "red",
12
- disabled: t = !1,
10
+ description: t,
11
+ color: r = "yellow",
12
+ disabled: s = !1,
13
13
  onChange: o,
14
14
  ...l
15
15
  }) {
16
- const [a, b] = j(r), n = F({
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-grey"
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-grey"
51
+ label: "uog:text-grey-dark"
64
52
  },
65
53
  false: {}
66
54
  }
67
55
  }
68
56
  }), {
69
57
  base: h,
70
- container: d,
71
- box: k,
72
- check: x,
73
- label: f,
58
+ container: x,
59
+ box: f,
60
+ check: k,
61
+ label: d,
74
62
  description: m
75
- } = n({ color: s, disabled: t });
76
- return /* @__PURE__ */ u(v, { className: h(), children: [
77
- /* @__PURE__ */ u("div", { className: d(), children: [
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
- w,
67
+ v,
80
68
  {
81
69
  checked: a,
82
- onChange: (i) => {
83
- b(i), o == null || o(i);
70
+ onChange: (u) => {
71
+ n(u), o == null || o(u);
84
72
  },
85
- disabled: t,
86
- className: k(),
73
+ disabled: s,
74
+ className: f(),
87
75
  ...l,
88
- children: /* @__PURE__ */ e(y, { className: x(), icon: p })
76
+ children: /* @__PURE__ */ e(y, { className: k(), icon: p })
89
77
  }
90
78
  ),
91
- c && /* @__PURE__ */ e(N, { className: f(), children: c })
79
+ c && /* @__PURE__ */ e(N, { className: d(), children: c })
92
80
  ] }),
93
- g && /* @__PURE__ */ e(C, { className: m(), children: g })
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-grey' | 'dark-grey' | 'black' | 'white';
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
+ }
@@ -0,0 +1,5 @@
1
+ import { BlockquoteProps } from './blockquote';
2
+ export type BlockquoteContextValue = {
3
+ color: BlockquoteProps['color'];
4
+ };
5
+ export declare const BlockquoteContext: import('react').Context<BlockquoteContextValue | null>;
@@ -7,10 +7,12 @@ export type BlockquoteProps = PropsWithChildren<{
7
7
  *
8
8
  * @default 'yellow'
9
9
  */
10
- color?: 'yellow' | 'red' | 'blue';
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' | 'light-grey' | 'dark-grey' | 'black' | 'white';
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 a interactive component designed to capture user actions (such as submitting forms). It can
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 'red'
16
+ * @default 'yellow'
17
17
  */
18
- color?: 'red' | 'yellow' | 'blue' | 'green' | 'light-grey' | 'dark-grey' | 'black' | 'white';
18
+ color?: 'yellow' | 'blue' | 'green' | 'black' | 'white';
19
19
  /**
20
20
  * Whether the checkbox is disabled
21
21
  *