@bccampus/ui-components 0.2.0 → 0.3.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/banner.js +14 -14
- package/dist/button.d.ts +1 -1
- package/dist/button.js +17 -17
- package/dist/caption.js +7 -8
- package/dist/card.js +34 -34
- package/dist/horizontal-list.js +32 -32
- package/dist/icon-generator.js +38 -38
- package/dist/index-U7DVCmS_.js +76 -0
- package/dist/input.js +4 -4
- package/dist/masked-image-generator.js +18 -18
- package/dist/navigation-menu.d.ts +27 -0
- package/dist/navigation-menu.js +1139 -0
- package/dist/overlay.js +2 -2
- package/dist/page-header.d.ts +5 -1
- package/dist/page-header.js +10 -9
- package/dist/page-section.js +14 -14
- package/dist/page.js +4 -4
- package/dist/search-input.js +11 -11
- package/dist/tag.js +8 -9
- package/dist/ui-components.d.ts +30 -2
- package/dist/ui-components.js +47 -37
- package/package.json +6 -1
- package/src/components/ui/banner.tsx +2 -2
- package/src/components/ui/button.tsx +8 -7
- package/src/components/ui/card.tsx +5 -5
- package/src/components/ui/horizontal-list.tsx +2 -2
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/navigation-menu.tsx +165 -0
- package/src/components/ui/page-header.tsx +13 -5
- package/src/components/ui/page-section.tsx +8 -8
- package/src/components/ui/page.tsx +3 -1
- package/src/styles/theme.css +7 -7
- package/src/styles/typography.css +334 -341
- package/vite.config.ts +5 -3
- package/vite.ladle.config.ts +17 -0
- package/dist/index-DlfV3JTY.js +0 -70
- package/dist/jsx-runtime-BzflLqGi.js +0 -282
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
3
|
+
function d(e, t) {
|
|
4
|
+
if (typeof e == "function")
|
|
5
|
+
return e(t);
|
|
6
|
+
e != null && (e.current = t);
|
|
7
|
+
}
|
|
8
|
+
function y(...e) {
|
|
9
|
+
return (t) => {
|
|
10
|
+
let r = !1;
|
|
11
|
+
const o = e.map((n) => {
|
|
12
|
+
const l = d(n, t);
|
|
13
|
+
return !r && typeof l == "function" && (r = !0), l;
|
|
14
|
+
});
|
|
15
|
+
if (r)
|
|
16
|
+
return () => {
|
|
17
|
+
for (let n = 0; n < o.length; n++) {
|
|
18
|
+
const l = o[n];
|
|
19
|
+
typeof l == "function" ? l() : d(e[n], null);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function V(...e) {
|
|
25
|
+
return i.useCallback(y(...e), e);
|
|
26
|
+
}
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function C(e) {
|
|
29
|
+
const t = /* @__PURE__ */ S(e), r = i.forwardRef((o, n) => {
|
|
30
|
+
const { children: l, ...c } = o, s = i.Children.toArray(l), a = s.find(E);
|
|
31
|
+
if (a) {
|
|
32
|
+
const u = a.props.children, m = s.map((f) => f === a ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : f);
|
|
33
|
+
return /* @__PURE__ */ p(t, { ...c, ref: n, children: i.isValidElement(u) ? i.cloneElement(u, void 0, m) : null });
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ p(t, { ...c, ref: n, children: l });
|
|
36
|
+
});
|
|
37
|
+
return r.displayName = `${e}.Slot`, r;
|
|
38
|
+
}
|
|
39
|
+
var x = /* @__PURE__ */ C("Slot");
|
|
40
|
+
// @__NO_SIDE_EFFECTS__
|
|
41
|
+
function S(e) {
|
|
42
|
+
const t = i.forwardRef((r, o) => {
|
|
43
|
+
const { children: n, ...l } = r;
|
|
44
|
+
if (i.isValidElement(n)) {
|
|
45
|
+
const c = h(n), s = R(l, n.props);
|
|
46
|
+
return n.type !== i.Fragment && (s.ref = o ? y(o, c) : c), i.cloneElement(n, s);
|
|
47
|
+
}
|
|
48
|
+
return i.Children.count(n) > 1 ? i.Children.only(null) : null;
|
|
49
|
+
});
|
|
50
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
51
|
+
}
|
|
52
|
+
var g = Symbol("radix.slottable");
|
|
53
|
+
function E(e) {
|
|
54
|
+
return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
|
|
55
|
+
}
|
|
56
|
+
function R(e, t) {
|
|
57
|
+
const r = { ...t };
|
|
58
|
+
for (const o in t) {
|
|
59
|
+
const n = e[o], l = t[o];
|
|
60
|
+
/^on[A-Z]/.test(o) ? n && l ? r[o] = (...s) => {
|
|
61
|
+
const a = l(...s);
|
|
62
|
+
return n(...s), a;
|
|
63
|
+
} : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...l } : o === "className" && (r[o] = [n, l].filter(Boolean).join(" "));
|
|
64
|
+
}
|
|
65
|
+
return { ...e, ...r };
|
|
66
|
+
}
|
|
67
|
+
function h(e) {
|
|
68
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
69
|
+
return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
x as S,
|
|
73
|
+
y as a,
|
|
74
|
+
C as c,
|
|
75
|
+
V as u
|
|
76
|
+
};
|
package/dist/input.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "./utils-CRiPKpXj.js";
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */ n
|
|
3
|
+
function s({ className: r, ...e }) {
|
|
4
|
+
return /* @__PURE__ */ n(
|
|
5
5
|
"input",
|
|
6
6
|
{
|
|
7
7
|
className: i(
|
|
@@ -14,5 +14,5 @@ function t({ className: r, ...e }) {
|
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
s as Input
|
|
18
18
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useId as
|
|
3
|
-
import { IconGenerator as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
src:
|
|
7
|
-
imageFit:
|
|
8
|
-
imagePosition:
|
|
9
|
-
maskType:
|
|
1
|
+
import { jsx as o, jsxs as c, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { useId as p, useMemo as l } from "react";
|
|
3
|
+
import { IconGenerator as M } from "./icon-generator.js";
|
|
4
|
+
const h = { cover: "slice", contain: "meet", fill: "none" }, k = { top: "xMidYMin", center: "xMidYMid", bottom: "xMidYMax" };
|
|
5
|
+
function u({
|
|
6
|
+
src: n,
|
|
7
|
+
imageFit: e = "cover",
|
|
8
|
+
imagePosition: r = "top",
|
|
9
|
+
maskType: s = "alpha",
|
|
10
10
|
...a
|
|
11
11
|
}) {
|
|
12
|
-
const t =
|
|
13
|
-
() =>
|
|
14
|
-
[
|
|
12
|
+
const t = p(), i = l(
|
|
13
|
+
() => e !== "fill" ? `${k[r]} ${h[e]}` : "none",
|
|
14
|
+
[e, r]
|
|
15
15
|
);
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
16
|
+
return /* @__PURE__ */ o(
|
|
17
|
+
M,
|
|
18
18
|
{
|
|
19
19
|
...a,
|
|
20
|
-
renderChildren: (m) => /* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
20
|
+
renderChildren: (m) => /* @__PURE__ */ c(d, { children: [
|
|
21
|
+
/* @__PURE__ */ o("mask", { id: `svg-mask${t}`, "mask-type": s, children: m }),
|
|
22
|
+
/* @__PURE__ */ o("image", { href: n, width: "100%", height: "100%", mask: `url(#svg-mask${t})`, preserveAspectRatio: i })
|
|
23
23
|
] })
|
|
24
24
|
}
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
u as MaskedImageGenerator
|
|
29
29
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
3
|
+
|
|
4
|
+
export declare function NavigationMenu({ className, children, noViewport, mega, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
5
|
+
noViewport?: boolean;
|
|
6
|
+
mega?: boolean;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): JSX.Element;
|
|
10
|
+
|
|
11
|
+
export declare function NavigationMenuIndicator({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>): JSX.Element;
|
|
12
|
+
|
|
13
|
+
export declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): JSX.Element;
|
|
14
|
+
|
|
15
|
+
export declare function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): JSX.Element;
|
|
16
|
+
|
|
17
|
+
export declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): JSX.Element;
|
|
18
|
+
|
|
19
|
+
export declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): JSX.Element;
|
|
20
|
+
|
|
21
|
+
export declare const navigationMenuTriggerStyle: string;
|
|
22
|
+
|
|
23
|
+
export declare function NavigationMenuViewport({ className, mega, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport> & {
|
|
24
|
+
mega?: boolean;
|
|
25
|
+
}): JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { }
|