@bccampus/ui-components 0.9.12 → 0.9.13

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.
@@ -14,7 +14,7 @@ const horizontalListVariants = cva(
14
14
  variants: {
15
15
  variant: {
16
16
  contain: "w-full",
17
- overflow: "w-screen px-(--spacing-section) -ms-(--spacing-section) scroll-px-(--spacing-section)"
17
+ overflow: "w-screen px-section -ms-section scroll-px-section @clamp/page:px-clamp @clamp/page:-ms-clamp @clamp/page:scroll-px-clamp"
18
18
  }
19
19
  },
20
20
  defaultVariants: {
@@ -3,6 +3,7 @@ export type PageSectionVariantsProps = VariantProps<typeof pageSectionVariants>;
3
3
  export declare const pageSectionVariants: (props?: ({
4
4
  px?: "none" | "default" | "sm" | "lg" | "xl" | null | undefined;
5
5
  py?: "none" | "default" | "sm" | "lg" | "xl" | null | undefined;
6
+ noClamp?: boolean | null | undefined;
6
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
8
  export type PageSectionProps = React.ComponentProps<"div"> & VariantProps<typeof pageSectionVariants>;
8
- export declare function PageSection({ className, px, py, ...props }: PageSectionProps): import("react").JSX.Element;
9
+ export declare function PageSection({ className, px, py, noClamp, ...props }: PageSectionProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c as cn } from "../../_chunks/utils.js";
3
3
  import { c as cva } from "../../_chunks/index2.js";
4
- const pageSectionVariants = cva("group @container/page-section relative w-full text-foreground", {
4
+ const pageSectionVariants = cva("group @container/page-section relative text-foreground", {
5
5
  variants: {
6
6
  px: {
7
7
  none: "px-0",
@@ -16,15 +16,20 @@ const pageSectionVariants = cva("group @container/page-section relative w-full t
16
16
  sm: "py-(--spacing-section-sm)",
17
17
  lg: "py-(--spacing-section-lg)",
18
18
  xl: "py-(--spacing-section-xl)"
19
+ },
20
+ noClamp: {
21
+ true: "w-full",
22
+ false: "w-full @clamp/page:px-clamp"
19
23
  }
20
24
  },
21
25
  defaultVariants: {
22
26
  px: "default",
23
- py: "default"
27
+ py: "default",
28
+ noClamp: false
24
29
  }
25
30
  });
26
- function PageSection({ className, px, py, ...props }) {
27
- return /* @__PURE__ */ jsx("div", { "data-slot": "page-section", className: cn(pageSectionVariants({ px, py }), className), ...props });
31
+ function PageSection({ className, px, py, noClamp, ...props }) {
32
+ return /* @__PURE__ */ jsx("div", { "data-slot": "page-section", className: cn(pageSectionVariants({ px, py, noClamp }), className), ...props });
28
33
  }
29
34
  export {
30
35
  PageSection,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bccampus/ui-components",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "BCcampus React components",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -44,30 +44,30 @@
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.563.0",
48
- "nanostores": "^1.1.0",
47
+ "lucide-react": "^0.575.0",
48
+ "nanostores": "^1.1.1",
49
49
  "react": "^19.2.4",
50
50
  "react-dom": "^19.2.4",
51
- "tailwind-merge": "^3.4.0",
52
- "tailwindcss": "^4.1.18",
51
+ "tailwind-merge": "^3.5.0",
52
+ "tailwindcss": "^4.2.1",
53
53
  "tw-animate-css": "^1.4.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@eslint/js": "^9.39.2",
56
+ "@eslint/js": "^9.39.3",
57
57
  "@ladle/react": "^5.1.1",
58
- "@tailwindcss/vite": "^4.1.18",
59
- "@types/node": "^24.10.11",
60
- "@types/react": "^19.2.13",
58
+ "@tailwindcss/vite": "^4.2.1",
59
+ "@types/node": "^24.10.14",
60
+ "@types/react": "^19.2.14",
61
61
  "@types/react-dom": "^19.2.3",
62
62
  "@vitejs/plugin-react-swc": "^4.2.3",
63
- "baseline-browser-mapping": "^2.9.19",
64
- "eslint": "^9.39.2",
63
+ "baseline-browser-mapping": "^2.10.0",
64
+ "eslint": "^9.39.3",
65
65
  "eslint-plugin-react-hooks": "^7.0.1",
66
- "eslint-plugin-react-refresh": "^0.5.0",
67
- "glob": "^13.0.1",
66
+ "eslint-plugin-react-refresh": "^0.5.2",
67
+ "glob": "^13.0.6",
68
68
  "globals": "^17.3.0",
69
69
  "typescript": "~5.9.3",
70
- "typescript-eslint": "^8.54.0",
70
+ "typescript-eslint": "^8.56.1",
71
71
  "vite": "^7.3.1",
72
72
  "vite-plugin-dts": "^4.5.4"
73
73
  }
@@ -11,7 +11,8 @@ export const horizontalListVariants = cva(
11
11
  variants: {
12
12
  variant: {
13
13
  contain: "w-full",
14
- overflow: "w-screen px-(--spacing-section) -ms-(--spacing-section) scroll-px-(--spacing-section)",
14
+ overflow:
15
+ "w-screen px-section -ms-section scroll-px-section @clamp/page:px-clamp @clamp/page:-ms-clamp @clamp/page:scroll-px-clamp",
15
16
  },
16
17
  },
17
18
  defaultVariants: {
@@ -2,7 +2,7 @@ import { cn } from "@/lib/utils";
2
2
  import { cva, type VariantProps } from "class-variance-authority";
3
3
 
4
4
  export type PageSectionVariantsProps = VariantProps<typeof pageSectionVariants>;
5
- export const pageSectionVariants = cva("group @container/page-section relative w-full text-foreground", {
5
+ export const pageSectionVariants = cva("group @container/page-section relative text-foreground", {
6
6
  variants: {
7
7
  px: {
8
8
  none: "px-0",
@@ -18,15 +18,22 @@ export const pageSectionVariants = cva("group @container/page-section relative w
18
18
  lg: "py-(--spacing-section-lg)",
19
19
  xl: "py-(--spacing-section-xl)",
20
20
  },
21
+ noClamp: {
22
+ true: "w-full",
23
+ false: "w-full @clamp/page:px-clamp",
24
+ },
21
25
  },
22
26
  defaultVariants: {
23
27
  px: "default",
24
28
  py: "default",
29
+ noClamp: false,
25
30
  },
26
31
  });
27
32
 
28
33
  export type PageSectionProps = React.ComponentProps<"div"> & VariantProps<typeof pageSectionVariants>;
29
34
 
30
- export function PageSection({ className, px, py, ...props }: PageSectionProps) {
31
- return <div data-slot="page-section" className={cn(pageSectionVariants({ px, py }), className)} {...props} />;
35
+ export function PageSection({ className, px, py, noClamp, ...props }: PageSectionProps) {
36
+ return (
37
+ <div data-slot="page-section" className={cn(pageSectionVariants({ px, py, noClamp }), className)} {...props} />
38
+ );
32
39
  }
@@ -38,6 +38,9 @@
38
38
  --color-sidebar-border: var(--sidebar-border);
39
39
  --color-sidebar-ring: var(--sidebar-ring);
40
40
 
41
+ --container-clamp: 96rem;
42
+ --spacing-clamp: calc((100dvw - var(--container-clamp)) / 2);
43
+
41
44
  --spacing-page-nav: --spacing(18);
42
45
 
43
46
  --spacing-section: var(--section-p);