@bccampus/ui-components 0.9.15 → 0.9.16

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.
@@ -3,6 +3,7 @@ import { c as cva } from "../../_chunks/index2.js";
3
3
  import { c as cn } from "../../_chunks/utils.js";
4
4
  import { useState, useCallback } from "react";
5
5
  import { Button } from "./button.js";
6
+ import { PageSection } from "./page-section.js";
6
7
  import { c as createLucideIcon } from "../../_chunks/createLucideIcon.js";
7
8
  const __iconNode$2 = [
8
9
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
@@ -62,8 +63,9 @@ function Banner({
62
63
  }, [id, onDismiss]);
63
64
  if (dismissed) return null;
64
65
  return /* @__PURE__ */ jsxs(
65
- "div",
66
+ PageSection,
66
67
  {
68
+ py: "none",
67
69
  "data-slot": "banner",
68
70
  id: `announcement-${id}`,
69
71
  className: cn(bannerVariants({ variant, size }), className),
@@ -72,15 +74,15 @@ function Banner({
72
74
  /* @__PURE__ */ jsxs(
73
75
  "div",
74
76
  {
75
- className: cn("flex-auto flex flex-col justify-center items-center gap-2", {
77
+ className: cn("flex-auto flex flex-col justify-center items-center", {
76
78
  "items-start": children
77
79
  }),
78
80
  children: [
79
81
  /* @__PURE__ */ jsxs("div", { className: "flex-auto flex justify-center items-center gap-2", children: [
80
82
  variant === "alert" ? /* @__PURE__ */ jsx(TriangleAlert, { className: "size-5" }) : /* @__PURE__ */ jsx(Info, { className: "size-5" }),
81
- /* @__PURE__ */ jsx("div", { className: cn({ "text-md font-semibold": size === "lg" }), children: title })
83
+ /* @__PURE__ */ jsx("div", { className: cn({ "text-md font-semibold": size === "lg" }), dangerouslySetInnerHTML: { __html: title } })
82
84
  ] }),
83
- children && /* @__PURE__ */ jsx("div", { className: "pl-7", children })
85
+ children && /* @__PURE__ */ jsx("div", { className: "pl-7", dangerouslySetInnerHTML: { __html: children } })
84
86
  ]
85
87
  }
86
88
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bccampus/ui-components",
3
- "version": "0.9.15",
3
+ "version": "0.9.16",
4
4
  "description": "BCcampus React components",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -44,7 +44,7 @@
44
44
  "@radix-ui/react-slot": "^1.2.4",
45
45
  "class-variance-authority": "^0.7.1",
46
46
  "clsx": "^2.1.1",
47
- "lucide-react": "^0.575.0",
47
+ "lucide-react": "^0.576.0",
48
48
  "nanostores": "^1.1.1",
49
49
  "react": "^19.2.4",
50
50
  "react-dom": "^19.2.4",
@@ -56,7 +56,7 @@
56
56
  "@eslint/js": "^9.39.3",
57
57
  "@ladle/react": "^5.1.1",
58
58
  "@tailwindcss/vite": "^4.2.1",
59
- "@types/node": "^24.10.14",
59
+ "@types/node": "^24.11.0",
60
60
  "@types/react": "^19.2.14",
61
61
  "@types/react-dom": "^19.2.3",
62
62
  "@vitejs/plugin-react-swc": "^4.2.3",
@@ -65,7 +65,7 @@
65
65
  "eslint-plugin-react-hooks": "^7.0.1",
66
66
  "eslint-plugin-react-refresh": "^0.5.2",
67
67
  "glob": "^13.0.6",
68
- "globals": "^17.3.0",
68
+ "globals": "^17.4.0",
69
69
  "typescript": "~5.9.3",
70
70
  "typescript-eslint": "^8.56.1",
71
71
  "vite": "^7.3.1",
@@ -3,6 +3,7 @@ import { cn } from "@/lib/utils";
3
3
  import { useCallback, useState } from "react";
4
4
  import { Button } from "./button";
5
5
  import { Info, TriangleAlert, X } from "lucide-react";
6
+ import { PageSection } from "./page-section";
6
7
 
7
8
  export type BannerVariantsProps = VariantProps<typeof bannerVariants>;
8
9
  export const bannerVariants = cva("flex flex-row items-start justify-between px-(--spacing-section) text-sm", {
@@ -50,22 +51,23 @@ export function Banner({
50
51
  if (dismissed) return null;
51
52
 
52
53
  return (
53
- <div
54
+ <PageSection
55
+ py="none"
54
56
  data-slot="banner"
55
57
  id={`announcement-${id}`}
56
58
  className={cn(bannerVariants({ variant, size }), className)}
57
59
  {...props}
58
60
  >
59
61
  <div
60
- className={cn("flex-auto flex flex-col justify-center items-center gap-2", {
62
+ className={cn("flex-auto flex flex-col justify-center items-center", {
61
63
  "items-start": children,
62
64
  })}
63
65
  >
64
66
  <div className="flex-auto flex justify-center items-center gap-2">
65
67
  {variant === "alert" ? <TriangleAlert className="size-5" /> : <Info className="size-5" />}
66
- <div className={cn({ "text-md font-semibold": size === "lg" })}>{title}</div>
68
+ <div className={cn({ "text-md font-semibold": size === "lg" })} dangerouslySetInnerHTML={{ __html: title }} />
67
69
  </div>
68
- {children && <div className="pl-7">{children}</div>}
70
+ {children && <div className="pl-7" dangerouslySetInnerHTML={{ __html: children }} />}
69
71
  </div>
70
72
  {dismissible && (
71
73
  <div>
@@ -83,6 +85,6 @@ export function Banner({
83
85
  </Button>
84
86
  </div>
85
87
  )}
86
- </div>
88
+ </PageSection>
87
89
  );
88
90
  }