@bccampus/ui-components 0.9.12 → 0.9.14
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/components/ui/horizontal-list.js +1 -1
- package/dist/components/ui/navigation-menu.js +2 -3
- package/dist/components/ui/page-section.d.ts +2 -1
- package/dist/components/ui/page-section.js +9 -4
- package/package.json +14 -14
- package/src/components/ui/horizontal-list.tsx +2 -1
- package/src/components/ui/navigation-menu.tsx +6 -7
- package/src/components/ui/page-section.tsx +10 -3
- package/src/styles/theme.css +3 -0
|
@@ -14,7 +14,7 @@ const horizontalListVariants = cva(
|
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
16
|
contain: "w-full",
|
|
17
|
-
overflow: "w-screen px-
|
|
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: {
|
|
@@ -1053,7 +1053,7 @@ function NavigationMenuViewport({
|
|
|
1053
1053
|
{
|
|
1054
1054
|
className: cn("absolute top-full left-0 isolate z-50 flex justify-center bg-popover", {
|
|
1055
1055
|
"min-w-xs": !mega,
|
|
1056
|
-
"w-full
|
|
1056
|
+
"w-full": mega
|
|
1057
1057
|
}),
|
|
1058
1058
|
children: /* @__PURE__ */ jsx(
|
|
1059
1059
|
Viewport,
|
|
@@ -1063,8 +1063,7 @@ function NavigationMenuViewport({
|
|
|
1063
1063
|
"origin-top-center duration-150 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
|
|
1064
1064
|
"bg-popover text-popover-foreground relative overflow-hidden w-full h-[var(--radix-navigation-menu-viewport-height)] overscroll-contain",
|
|
1065
1065
|
{
|
|
1066
|
-
"mt-1.5 rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]": !mega
|
|
1067
|
-
"border-b-1 border-complement-1-50": mega
|
|
1066
|
+
"mt-1.5 rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]": !mega
|
|
1068
1067
|
},
|
|
1069
1068
|
className
|
|
1070
1069
|
),
|
|
@@ -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
|
|
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.
|
|
3
|
+
"version": "0.9.14",
|
|
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.
|
|
48
|
-
"nanostores": "^1.1.
|
|
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.
|
|
52
|
-
"tailwindcss": "^4.1
|
|
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.
|
|
56
|
+
"@eslint/js": "^9.39.3",
|
|
57
57
|
"@ladle/react": "^5.1.1",
|
|
58
|
-
"@tailwindcss/vite": "^4.1
|
|
59
|
-
"@types/node": "^24.10.
|
|
60
|
-
"@types/react": "^19.2.
|
|
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.
|
|
64
|
-
"eslint": "^9.39.
|
|
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.
|
|
67
|
-
"glob": "^13.0.
|
|
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.
|
|
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:
|
|
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: {
|
|
@@ -22,7 +22,7 @@ function NavigationMenu({
|
|
|
22
22
|
className={cn(
|
|
23
23
|
"group/navigation-menu flex max-w-max flex-1 items-center justify-center",
|
|
24
24
|
{ relative: !mega },
|
|
25
|
-
className
|
|
25
|
+
className,
|
|
26
26
|
)}
|
|
27
27
|
{...props}
|
|
28
28
|
>
|
|
@@ -83,7 +83,7 @@ function NavigationMenuContent({ className, ...props }: React.ComponentProps<typ
|
|
|
83
83
|
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52",
|
|
84
84
|
"group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0",
|
|
85
85
|
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
86
|
-
className
|
|
86
|
+
className,
|
|
87
87
|
)}
|
|
88
88
|
{...props}
|
|
89
89
|
/>
|
|
@@ -101,7 +101,7 @@ function NavigationMenuViewport({
|
|
|
101
101
|
<div
|
|
102
102
|
className={cn("absolute top-full left-0 isolate z-50 flex justify-center bg-popover", {
|
|
103
103
|
"min-w-xs": !mega,
|
|
104
|
-
"w-full
|
|
104
|
+
"w-full": mega,
|
|
105
105
|
})}
|
|
106
106
|
>
|
|
107
107
|
<NavigationMenuPrimitive.Viewport
|
|
@@ -111,9 +111,8 @@ function NavigationMenuViewport({
|
|
|
111
111
|
"bg-popover text-popover-foreground relative overflow-hidden w-full h-[var(--radix-navigation-menu-viewport-height)] overscroll-contain",
|
|
112
112
|
{
|
|
113
113
|
"mt-1.5 rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]": !mega,
|
|
114
|
-
"border-b-1 border-complement-1-50": mega,
|
|
115
114
|
},
|
|
116
|
-
className
|
|
115
|
+
className,
|
|
117
116
|
)}
|
|
118
117
|
{...props}
|
|
119
118
|
/>
|
|
@@ -127,7 +126,7 @@ function NavigationMenuLink({ className, ...props }: React.ComponentProps<typeof
|
|
|
127
126
|
data-slot="navigation-menu-link"
|
|
128
127
|
className={cn(
|
|
129
128
|
"[&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
130
|
-
className
|
|
129
|
+
className,
|
|
131
130
|
)}
|
|
132
131
|
{...props}
|
|
133
132
|
/>
|
|
@@ -143,7 +142,7 @@ function NavigationMenuIndicator({
|
|
|
143
142
|
data-slot="navigation-menu-indicator"
|
|
144
143
|
className={cn(
|
|
145
144
|
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
146
|
-
className
|
|
145
|
+
className,
|
|
147
146
|
)}
|
|
148
147
|
{...props}
|
|
149
148
|
>
|
|
@@ -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
|
|
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
|
|
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
|
}
|
package/src/styles/theme.css
CHANGED
|
@@ -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);
|