@bccampus/ui-components 0.1.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.
Files changed (71) hide show
  1. package/dist/banner.d.ts +16 -0
  2. package/dist/banner.js +42 -0
  3. package/dist/button.d.ts +5 -4
  4. package/dist/button.js +24 -18
  5. package/dist/caption.js +7 -7
  6. package/dist/card.d.ts +15 -9
  7. package/dist/card.js +64 -86
  8. package/dist/createLucideIcon-CzehbSja.js +94 -0
  9. package/dist/horizontal-list.d.ts +9 -2
  10. package/dist/horizontal-list.js +46 -114
  11. package/dist/icon-generator.d.ts +2 -1
  12. package/dist/icon-generator.js +183 -150
  13. package/dist/index-CQhYMnjT.js +34 -0
  14. package/dist/index-U7DVCmS_.js +76 -0
  15. package/dist/input.d.ts +7 -0
  16. package/dist/input.js +18 -0
  17. package/dist/masked-image-generator.d.ts +1 -0
  18. package/dist/masked-image-generator.js +18 -18
  19. package/dist/navigation-menu.d.ts +27 -0
  20. package/dist/navigation-menu.js +1139 -0
  21. package/dist/overlay.d.ts +13 -0
  22. package/dist/overlay.js +27 -0
  23. package/dist/page-header.d.ts +9 -0
  24. package/dist/page-header.js +944 -0
  25. package/dist/page-section.d.ts +14 -0
  26. package/dist/page-section.js +31 -0
  27. package/dist/page.d.ts +7 -0
  28. package/dist/page.js +8 -0
  29. package/dist/search-input.d.ts +7 -0
  30. package/dist/search-input.js +23 -0
  31. package/dist/tag.d.ts +2 -2
  32. package/dist/tag.js +7 -7
  33. package/dist/ui-components.d.ts +112 -29
  34. package/dist/ui-components.js +51 -26
  35. package/package.json +49 -15
  36. package/src/assets/images/image_06.jpg +0 -0
  37. package/src/components/ui/banner.tsx +48 -0
  38. package/src/components/ui/button.tsx +53 -47
  39. package/src/components/ui/card.tsx +131 -147
  40. package/src/components/ui/horizontal-list.tsx +75 -50
  41. package/src/components/ui/icon-generator/generate-tiles.tsx +243 -243
  42. package/src/components/ui/icon-generator/icon-generator.tsx +84 -51
  43. package/src/components/ui/icon-generator/masked-image-generator.tsx +38 -38
  44. package/src/components/ui/icon-generator/types.ts +53 -52
  45. package/src/components/ui/index.ts +12 -4
  46. package/src/components/ui/input.tsx +17 -0
  47. package/src/components/ui/navigation-menu.tsx +165 -0
  48. package/src/components/ui/overlay.tsx +29 -0
  49. package/src/components/ui/page-header.tsx +24 -0
  50. package/src/components/ui/page-section.tsx +33 -0
  51. package/src/components/ui/page.tsx +11 -0
  52. package/src/components/ui/search-input.tsx +16 -0
  53. package/src/components/ui/tag.tsx +39 -39
  54. package/src/components/ui/typography/caption.tsx +32 -32
  55. package/src/styles/all.css +4 -4
  56. package/src/styles/colors.css +9 -10
  57. package/src/styles/index.css +7 -7
  58. package/src/styles/theme.css +57 -3
  59. package/src/styles/typography.css +473 -479
  60. package/tsconfig.app.json +37 -37
  61. package/vite.config.ts +53 -44
  62. package/vite.ladle.config.ts +17 -0
  63. package/dist/@bccampus-ui-components-0.1.0.tgz +0 -0
  64. package/dist/index-DcqAdr0d.js +0 -102
  65. package/dist/jsx-runtime-BzflLqGi.js +0 -282
  66. package/dist/mockServiceWorker.js +0 -348
  67. package/public/mockServiceWorker.js +0 -348
  68. package/src/assets/images/bg_pattern_01.png +0 -0
  69. package/src/assets/images/bg_pattern_02.png +0 -0
  70. package/src/assets/images/bg_pattern_03.png +0 -0
  71. package/src/assets/images/bg_pattern_04.png +0 -0
@@ -0,0 +1,34 @@
1
+ import { a as O } from "./utils-CRiPKpXj.js";
2
+ const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
+ var u;
4
+ if (l?.variants == null) return y(e, n?.class, n?.className);
5
+ const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
+ const a = n?.[t], s = d?.[t];
7
+ if (a === null) return null;
8
+ const i = m(a) || m(s);
9
+ return r[t][i];
10
+ }), v = n && Object.entries(n).reduce((t, a) => {
11
+ let [s, i] = a;
12
+ return i === void 0 || (t[s] = i), t;
13
+ }, {}), N = l == null || (u = l.compoundVariants) === null || u === void 0 ? void 0 : u.reduce((t, a) => {
14
+ let { class: s, className: i, ...f } = a;
15
+ return Object.entries(f).every((C) => {
16
+ let [c, o] = C;
17
+ return Array.isArray(o) ? o.includes({
18
+ ...d,
19
+ ...v
20
+ }[c]) : {
21
+ ...d,
22
+ ...v
23
+ }[c] === o;
24
+ }) ? [
25
+ ...t,
26
+ s,
27
+ i
28
+ ] : t;
29
+ }, []);
30
+ return y(e, V, N, n?.class, n?.className);
31
+ };
32
+ export {
33
+ j as c
34
+ };
@@ -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
+ };
@@ -0,0 +1,7 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare function Input({ className, ...props }: InputProps): JSX.Element;
4
+
5
+ export declare type InputProps = React.ComponentProps<"input">;
6
+
7
+ export { }
package/dist/input.js ADDED
@@ -0,0 +1,18 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c as i } from "./utils-CRiPKpXj.js";
3
+ function s({ className: r, ...e }) {
4
+ return /* @__PURE__ */ n(
5
+ "input",
6
+ {
7
+ className: i(
8
+ "w-full p-2 pr-8 text-brand-1 placeholder:text-brand-1 rounded-sm bg-complement-1-50 outline-none focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-2",
9
+ r
10
+ ),
11
+ name: "search",
12
+ ...e
13
+ }
14
+ );
15
+ }
16
+ export {
17
+ s as Input
18
+ };
@@ -6,6 +6,7 @@ declare interface IconGeneratorProps extends Omit<React.ComponentProps<"svg">, "
6
6
  tileSize?: number;
7
7
  tileClassName?: string;
8
8
  tileBgClassName?: string;
9
+ fit?: "none" | "fill" | "width" | "height";
9
10
  renderChildren?: (paths: (JSX.Element | null)[], width: number, height: number) => React.ReactNode;
10
11
  }
11
12
 
@@ -1,29 +1,29 @@
1
- import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
- import { useId as c, useMemo as d } from "react";
3
- import { IconGenerator as p } from "./icon-generator.js";
4
- const x = { cover: "slice", contain: "meet", fill: "none" }, l = { top: "xMidYMin", center: "xMidYMid", bottom: "xMidYMax" };
5
- function f({
6
- src: r,
7
- imageFit: o = "cover",
8
- imagePosition: s = "top",
9
- maskType: n = "alpha",
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 = c(), i = d(
13
- () => o !== "fill" ? `${l[s]} ${x[o]}` : "none",
14
- [o, s]
12
+ const t = p(), i = l(
13
+ () => e !== "fill" ? `${k[r]} ${h[e]}` : "none",
14
+ [e, r]
15
15
  );
16
- return /* @__PURE__ */ e.jsx(
17
- p,
16
+ return /* @__PURE__ */ o(
17
+ M,
18
18
  {
19
19
  ...a,
20
- renderChildren: (m) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
21
- /* @__PURE__ */ e.jsx("mask", { id: `svg-mask${t}`, "mask-type": n, children: m }),
22
- /* @__PURE__ */ e.jsx("image", { href: r, width: "100%", height: "100%", mask: `url(#svg-mask${t})`, preserveAspectRatio: i })
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
- f as MaskedImageGenerator
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 { }