@bccampus/ui-components 0.1.0 → 0.2.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.d.ts +16 -0
- package/dist/banner.js +42 -0
- package/dist/button.d.ts +5 -4
- package/dist/button.js +20 -14
- package/dist/caption.js +9 -8
- package/dist/card.d.ts +15 -9
- package/dist/card.js +62 -84
- package/dist/createLucideIcon-CzehbSja.js +94 -0
- package/dist/horizontal-list.d.ts +9 -2
- package/dist/horizontal-list.js +47 -115
- package/dist/icon-generator.d.ts +2 -1
- package/dist/icon-generator.js +180 -147
- package/dist/index-CQhYMnjT.js +34 -0
- package/dist/index-DlfV3JTY.js +70 -0
- package/dist/input.d.ts +7 -0
- package/dist/input.js +18 -0
- package/dist/masked-image-generator.d.ts +1 -0
- package/dist/overlay.d.ts +13 -0
- package/dist/overlay.js +27 -0
- package/dist/page-header.d.ts +5 -0
- package/dist/page-header.js +943 -0
- package/dist/page-section.d.ts +14 -0
- package/dist/page-section.js +31 -0
- package/dist/page.d.ts +7 -0
- package/dist/page.js +8 -0
- package/dist/search-input.d.ts +7 -0
- package/dist/search-input.js +23 -0
- package/dist/tag.d.ts +2 -2
- package/dist/tag.js +10 -9
- package/dist/ui-components.d.ts +84 -29
- package/dist/ui-components.js +42 -27
- package/package.json +44 -15
- package/src/assets/images/image_06.jpg +0 -0
- package/src/components/ui/banner.tsx +48 -0
- package/src/components/ui/button.tsx +52 -47
- package/src/components/ui/card.tsx +131 -147
- package/src/components/ui/horizontal-list.tsx +75 -50
- package/src/components/ui/icon-generator/generate-tiles.tsx +243 -243
- package/src/components/ui/icon-generator/icon-generator.tsx +84 -51
- package/src/components/ui/icon-generator/masked-image-generator.tsx +38 -38
- package/src/components/ui/icon-generator/types.ts +53 -52
- package/src/components/ui/index.ts +11 -4
- package/src/components/ui/input.tsx +17 -0
- package/src/components/ui/overlay.tsx +29 -0
- package/src/components/ui/page-header.tsx +16 -0
- package/src/components/ui/page-section.tsx +33 -0
- package/src/components/ui/page.tsx +9 -0
- package/src/components/ui/search-input.tsx +16 -0
- package/src/components/ui/tag.tsx +39 -39
- package/src/components/ui/typography/caption.tsx +32 -32
- package/src/styles/all.css +4 -4
- package/src/styles/colors.css +9 -10
- package/src/styles/index.css +7 -7
- package/src/styles/theme.css +56 -2
- package/src/styles/typography.css +480 -479
- package/tsconfig.app.json +37 -37
- package/vite.config.ts +51 -44
- package/dist/@bccampus-ui-components-0.1.0.tgz +0 -0
- package/dist/index-DcqAdr0d.js +0 -102
- package/dist/mockServiceWorker.js +0 -348
- package/public/mockServiceWorker.js +0 -348
- package/src/assets/images/bg_pattern_01.png +0 -0
- package/src/assets/images/bg_pattern_02.png +0 -0
- package/src/assets/images/bg_pattern_03.png +0 -0
- package/src/assets/images/bg_pattern_04.png +0 -0
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { useId, useMemo } from "react";
|
|
2
|
-
import type { MaskedImageGeneratorProps } from "./types";
|
|
3
|
-
|
|
4
|
-
import { IconGenerator } from "./icon-generator";
|
|
5
|
-
|
|
6
|
-
const MaskedImageFit = { cover: "slice", contain: "meet", fill: "none" };
|
|
7
|
-
const MaskedImagePosition = { top: "xMidYMin", center: "xMidYMid", bottom: "xMidYMax" };
|
|
8
|
-
|
|
9
|
-
function MaskedImageGenerator({
|
|
10
|
-
src,
|
|
11
|
-
imageFit = "cover",
|
|
12
|
-
imagePosition = "top",
|
|
13
|
-
maskType = "alpha",
|
|
14
|
-
...props
|
|
15
|
-
}: MaskedImageGeneratorProps) {
|
|
16
|
-
const id = useId();
|
|
17
|
-
|
|
18
|
-
const aspectRatio = useMemo(
|
|
19
|
-
() => (imageFit !== "fill" ? `${MaskedImagePosition[imagePosition]} ${MaskedImageFit[imageFit]}` : "none"),
|
|
20
|
-
[imageFit, imagePosition]
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<IconGenerator
|
|
25
|
-
{...props}
|
|
26
|
-
renderChildren={(paths) => (
|
|
27
|
-
<>
|
|
28
|
-
<mask id={`svg-mask${id}`} mask-type={maskType}>
|
|
29
|
-
{paths}
|
|
30
|
-
</mask>
|
|
31
|
-
<image href={src} width="100%" height="100%" mask={`url(#svg-mask${id})`} preserveAspectRatio={aspectRatio} />
|
|
32
|
-
</>
|
|
33
|
-
)}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { MaskedImageGenerator };
|
|
1
|
+
import { useId, useMemo } from "react";
|
|
2
|
+
import type { MaskedImageGeneratorProps } from "./types";
|
|
3
|
+
|
|
4
|
+
import { IconGenerator } from "./icon-generator";
|
|
5
|
+
|
|
6
|
+
const MaskedImageFit = { cover: "slice", contain: "meet", fill: "none" };
|
|
7
|
+
const MaskedImagePosition = { top: "xMidYMin", center: "xMidYMid", bottom: "xMidYMax" };
|
|
8
|
+
|
|
9
|
+
function MaskedImageGenerator({
|
|
10
|
+
src,
|
|
11
|
+
imageFit = "cover",
|
|
12
|
+
imagePosition = "top",
|
|
13
|
+
maskType = "alpha",
|
|
14
|
+
...props
|
|
15
|
+
}: MaskedImageGeneratorProps) {
|
|
16
|
+
const id = useId();
|
|
17
|
+
|
|
18
|
+
const aspectRatio = useMemo(
|
|
19
|
+
() => (imageFit !== "fill" ? `${MaskedImagePosition[imagePosition]} ${MaskedImageFit[imageFit]}` : "none"),
|
|
20
|
+
[imageFit, imagePosition]
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<IconGenerator
|
|
25
|
+
{...props}
|
|
26
|
+
renderChildren={(paths) => (
|
|
27
|
+
<>
|
|
28
|
+
<mask id={`svg-mask${id}`} mask-type={maskType}>
|
|
29
|
+
{paths}
|
|
30
|
+
</mask>
|
|
31
|
+
<image href={src} width="100%" height="100%" mask={`url(#svg-mask${id})`} preserveAspectRatio={aspectRatio} />
|
|
32
|
+
</>
|
|
33
|
+
)}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { MaskedImageGenerator };
|
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
import type { JSX } from "react";
|
|
2
|
-
|
|
3
|
-
export const TileShape = {
|
|
4
|
-
Blank: 0,
|
|
5
|
-
Rand: 1,
|
|
6
|
-
Mosaic: 2,
|
|
7
|
-
MosaicCircle: 3,
|
|
8
|
-
MosaicDiamond: 4,
|
|
9
|
-
Square: 6,
|
|
10
|
-
Circle: 7,
|
|
11
|
-
Diamond: 8,
|
|
12
|
-
Hexagon: 9,
|
|
13
|
-
RandBasic: 10,
|
|
14
|
-
TriangleSE: 11,
|
|
15
|
-
TriangleSW: 12,
|
|
16
|
-
TriangleNW: 13,
|
|
17
|
-
TriangleNE: 14,
|
|
18
|
-
TriangleRand: 15,
|
|
19
|
-
CaretN: 16,
|
|
20
|
-
CaretE: 17,
|
|
21
|
-
CaretS: 18,
|
|
22
|
-
CaretW: 19,
|
|
23
|
-
CaretRand: 20,
|
|
24
|
-
PieSE: 21,
|
|
25
|
-
PieSW: 22,
|
|
26
|
-
PieNW: 23,
|
|
27
|
-
PieNE: 24,
|
|
28
|
-
PieRand: 25,
|
|
29
|
-
} as const;
|
|
30
|
-
|
|
31
|
-
export type TileShape = (typeof TileShape)[keyof typeof TileShape];
|
|
32
|
-
|
|
33
|
-
export interface TileConfig {
|
|
34
|
-
shape: TileShape;
|
|
35
|
-
scale?: number;
|
|
36
|
-
className?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface IconGeneratorProps extends Omit<React.ComponentProps<"svg">, "children" | "width" | "height" | "overflow"> {
|
|
40
|
-
pattern?: (TileShape | TileConfig)[][];
|
|
41
|
-
tileSize?: number;
|
|
42
|
-
tileClassName?: string;
|
|
43
|
-
tileBgClassName?: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
|
|
3
|
+
export const TileShape = {
|
|
4
|
+
Blank: 0,
|
|
5
|
+
Rand: 1,
|
|
6
|
+
Mosaic: 2,
|
|
7
|
+
MosaicCircle: 3,
|
|
8
|
+
MosaicDiamond: 4,
|
|
9
|
+
Square: 6,
|
|
10
|
+
Circle: 7,
|
|
11
|
+
Diamond: 8,
|
|
12
|
+
Hexagon: 9,
|
|
13
|
+
RandBasic: 10,
|
|
14
|
+
TriangleSE: 11,
|
|
15
|
+
TriangleSW: 12,
|
|
16
|
+
TriangleNW: 13,
|
|
17
|
+
TriangleNE: 14,
|
|
18
|
+
TriangleRand: 15,
|
|
19
|
+
CaretN: 16,
|
|
20
|
+
CaretE: 17,
|
|
21
|
+
CaretS: 18,
|
|
22
|
+
CaretW: 19,
|
|
23
|
+
CaretRand: 20,
|
|
24
|
+
PieSE: 21,
|
|
25
|
+
PieSW: 22,
|
|
26
|
+
PieNW: 23,
|
|
27
|
+
PieNE: 24,
|
|
28
|
+
PieRand: 25,
|
|
29
|
+
} as const;
|
|
30
|
+
|
|
31
|
+
export type TileShape = (typeof TileShape)[keyof typeof TileShape];
|
|
32
|
+
|
|
33
|
+
export interface TileConfig {
|
|
34
|
+
shape: TileShape;
|
|
35
|
+
scale?: number;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface IconGeneratorProps extends Omit<React.ComponentProps<"svg">, "children" | "width" | "height" | "overflow"> {
|
|
40
|
+
pattern?: (TileShape | TileConfig)[][];
|
|
41
|
+
tileSize?: number;
|
|
42
|
+
tileClassName?: string;
|
|
43
|
+
tileBgClassName?: string;
|
|
44
|
+
fit?: "none" | "fill" | "width" | "height"
|
|
45
|
+
|
|
46
|
+
renderChildren?: (paths: (JSX.Element | null)[], width: number, height: number) => React.ReactNode;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface MaskedImageGeneratorProps extends IconGeneratorProps {
|
|
50
|
+
src: string;
|
|
51
|
+
imageFit?: "cover" | "contain" | "fill";
|
|
52
|
+
imagePosition?: "top" | "center" | "bottom";
|
|
53
|
+
maskType?: "alpha" | "luminance";
|
|
53
54
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './icon-generator/icon-generator.tsx'
|
|
2
|
+
export * from './icon-generator/masked-image-generator.tsx'
|
|
2
3
|
export * from './typography/caption.tsx'
|
|
4
|
+
export * from './banner.tsx'
|
|
5
|
+
export * from './button.tsx'
|
|
3
6
|
export * from './card.tsx'
|
|
4
|
-
export * from './tag.tsx'
|
|
5
7
|
export * from './horizontal-list.tsx'
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
+
export * from './input.tsx'
|
|
9
|
+
export * from './overlay.tsx'
|
|
10
|
+
export * from './page-header.tsx'
|
|
11
|
+
export * from './page-section.tsx'
|
|
12
|
+
export * from './page.tsx'
|
|
13
|
+
export * from './search-input.tsx'
|
|
14
|
+
export * from './tag.tsx'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
export type InputProps = React.ComponentProps<"input">;
|
|
3
|
+
|
|
4
|
+
function Input({ className, ...props }: InputProps) {
|
|
5
|
+
return (
|
|
6
|
+
<input
|
|
7
|
+
className={cn(
|
|
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
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
name="search"
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Input };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
const overlayVariants = cva("absolute w-fit h-fit z-1 overflow-hidden p-0.25", {
|
|
5
|
+
variants: {
|
|
6
|
+
position: {
|
|
7
|
+
t: "top-0 left-1/2 -translate-x-1/2",
|
|
8
|
+
b: "bottom-0 left-1/2 -translate-x-1/2",
|
|
9
|
+
l: "top-1/2 left-0 -translate-y-1/2",
|
|
10
|
+
r: "top-1/2 right-0 -translate-y-1/2",
|
|
11
|
+
tl: "top-0 left-0 rounded-tl-container",
|
|
12
|
+
tr: "top-0 right-0 rounded-tr-container",
|
|
13
|
+
bl: "bottom-0 left-0 rounded-bl-container",
|
|
14
|
+
br: "bottom-0 right-0 rounded-br-container",
|
|
15
|
+
c: "top-1/2 left-1/2 -translate-1/2",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
position: "br",
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export type OverlayProps = React.ComponentProps<"div"> & VariantProps<typeof overlayVariants>;
|
|
24
|
+
|
|
25
|
+
function Overlay({ className, position, ...props }: OverlayProps) {
|
|
26
|
+
return <div className={cn(overlayVariants({ position }), className)} {...props} />;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { Overlay };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PageSection } from "./page-section";
|
|
2
|
+
import { LogoBCcampusWithTagline } from "@bccampus/media-kit";
|
|
3
|
+
|
|
4
|
+
function PageHeader({ children, ...props }: React.ComponentProps<"div">) {
|
|
5
|
+
return (
|
|
6
|
+
<PageSection py="none" className="sticky top-0 right-0 left-0 z-10 bg-background" {...props}>
|
|
7
|
+
<div className="h-page-nav flex flex-row flex-nowrap place-items-center border-b-1 border-b-complement-1-50 py-4 gap-12">
|
|
8
|
+
<LogoBCcampusWithTagline height="100%" variant="color" />
|
|
9
|
+
|
|
10
|
+
{children}
|
|
11
|
+
</div>
|
|
12
|
+
</PageSection>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { PageHeader };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
const pageSectionVariants = cva("group @container/page-section relative w-full", {
|
|
5
|
+
variants: {
|
|
6
|
+
px: {
|
|
7
|
+
none: "px-0",
|
|
8
|
+
default: "px-section",
|
|
9
|
+
sm: "px-sextion-sm",
|
|
10
|
+
lg: "px-section-lg",
|
|
11
|
+
xl: "px-section-xl",
|
|
12
|
+
},
|
|
13
|
+
py: {
|
|
14
|
+
none: "py-0",
|
|
15
|
+
default: "py-section",
|
|
16
|
+
sm: "py-sextion-sm",
|
|
17
|
+
lg: "py-section-lg",
|
|
18
|
+
xl: "py-section-xl",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
px: "default",
|
|
23
|
+
py: "default",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type PageSectionProps = React.ComponentProps<"div"> & VariantProps<typeof pageSectionVariants>;
|
|
28
|
+
|
|
29
|
+
function PageSection({ className, px, py, ...props }: PageSectionProps) {
|
|
30
|
+
return <div data-slot="page-section" className={cn(pageSectionVariants({ px, py }), className)} {...props} />;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { PageSection };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
|
|
3
|
+
export type PageProps = React.ComponentProps<"div">;
|
|
4
|
+
|
|
5
|
+
function Page({ className, ...props }: PageProps) {
|
|
6
|
+
return <div data-slot="page" className={cn("group @container/page relative w-full", className)} {...props} />;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { Page };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
import { Search } from "lucide-react";
|
|
3
|
+
import { Input } from "./input";
|
|
4
|
+
|
|
5
|
+
export type SearchInputProps = React.ComponentProps<"input">;
|
|
6
|
+
|
|
7
|
+
function SearchInput({ className, ...props }: SearchInputProps) {
|
|
8
|
+
return (
|
|
9
|
+
<div className={cn("relative", className)}>
|
|
10
|
+
<Input {...props} />
|
|
11
|
+
<Search className="absolute size-4 top-1/2 right-3 -translate-y-1/2 pointer-events-none text-primary" />
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { SearchInput };
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
const tagVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm bg-complement-3 text-white [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "",
|
|
12
|
-
button:
|
|
13
|
-
"hover:bg-primary transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
default: "h-8 px-4 py-1.5 has-[>svg]:px-3",
|
|
17
|
-
sm: "h-6 gap-1 px-3 has-[>svg]:px-2.5",
|
|
18
|
-
lg: "scroll-mr-6 text-xl/5 font-medium h-16 px-8 has-[>svg]:px-4",
|
|
19
|
-
icon: "size-8",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: "default",
|
|
24
|
-
size: "default",
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
interface TagProps extends VariantProps<typeof tagVariants>, React.ComponentProps<"div"> {
|
|
30
|
-
asChild?: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function Tag({ className, size, variant, asChild = false, ...props }: TagProps) {
|
|
34
|
-
const Comp = asChild ? Slot : "div";
|
|
35
|
-
|
|
36
|
-
return <Comp data-slot="tag" className={cn(tagVariants({ variant, size, className
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { Tag, tagVariants };
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
const tagVariants = cva(
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-sm text-sm bg-complement-3 text-white [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "",
|
|
12
|
+
button:
|
|
13
|
+
"hover:bg-primary transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
default: "h-8 px-4 py-1.5 has-[>svg]:px-3",
|
|
17
|
+
sm: "h-6 gap-1 px-3 has-[>svg]:px-2.5",
|
|
18
|
+
lg: "scroll-mr-6 text-xl/5 font-medium h-16 px-8 has-[>svg]:px-4",
|
|
19
|
+
icon: "size-8",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "default",
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export interface TagProps extends VariantProps<typeof tagVariants>, React.ComponentProps<"div"> {
|
|
30
|
+
asChild?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function Tag({ className, size, variant, asChild = false, ...props }: TagProps) {
|
|
34
|
+
const Comp = asChild ? Slot : "div";
|
|
35
|
+
|
|
36
|
+
return <Comp data-slot="tag" className={cn(tagVariants({ variant, size }), className)} {...props} />;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { Tag, tagVariants };
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
const captionVariants = cva("tracking-tight text-balance", {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "scroll-mr-5 text-lg/5 font-bold text-secondary dark:text-foreground",
|
|
10
|
-
light: "scroll-mr-4 text-sm/4 font-normal text-primary",
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
variant: "default",
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
function Caption({
|
|
19
|
-
className,
|
|
20
|
-
variant,
|
|
21
|
-
asChild = false,
|
|
22
|
-
...props
|
|
23
|
-
}: React.ComponentProps<"div"> &
|
|
24
|
-
VariantProps<typeof captionVariants> & {
|
|
25
|
-
asChild?: boolean;
|
|
26
|
-
}) {
|
|
27
|
-
const Comp = asChild ? Slot : "div";
|
|
28
|
-
|
|
29
|
-
return <Comp
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { Caption, captionVariants };
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
const captionVariants = cva("tracking-tight text-balance", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "scroll-mr-5 text-lg/5 font-bold text-secondary dark:text-foreground",
|
|
10
|
+
light: "scroll-mr-4 text-sm/4 font-normal text-primary",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
function Caption({
|
|
19
|
+
className,
|
|
20
|
+
variant,
|
|
21
|
+
asChild = false,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<"div"> &
|
|
24
|
+
VariantProps<typeof captionVariants> & {
|
|
25
|
+
asChild?: boolean;
|
|
26
|
+
}) {
|
|
27
|
+
const Comp = asChild ? Slot : "div";
|
|
28
|
+
|
|
29
|
+
return <Comp className={cn(captionVariants({ variant, className }))} {...props} />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { Caption, captionVariants };
|
package/src/styles/all.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import "./colors.css";
|
|
2
|
-
@import "./fonts.css";
|
|
3
|
-
@import "./theme.css";
|
|
4
|
-
@import "./typography.css";
|
|
1
|
+
@import "./colors.css";
|
|
2
|
+
@import "./fonts.css";
|
|
3
|
+
@import "./theme.css";
|
|
4
|
+
@import "./typography.css";
|
package/src/styles/colors.css
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
@theme inline {
|
|
3
2
|
--color-brand-1-50: #e3f2ff;
|
|
4
3
|
--color-brand-1-100: #c6e4fe;
|
|
@@ -26,10 +25,10 @@
|
|
|
26
25
|
--color-brand-1-900: oklch(0.29 0.09 245);
|
|
27
26
|
--color-brand-1-950: oklch(0.25 0.08 245);
|
|
28
27
|
|
|
29
|
-
--color-complement-1-50: #
|
|
30
|
-
--color-complement-1-100: #
|
|
31
|
-
--color-complement-1-200: #
|
|
32
|
-
--color-complement-1-300: #
|
|
28
|
+
--color-complement-1-50: #e6f4f5;
|
|
29
|
+
--color-complement-1-100: #cceaeb;
|
|
30
|
+
--color-complement-1-200: #80cacd;
|
|
31
|
+
--color-complement-1-300: #7edde2;
|
|
33
32
|
--color-complement-1: #00949a;
|
|
34
33
|
--color-complement-1-400: #00949a;
|
|
35
34
|
--color-complement-1-500: #047e83;
|
|
@@ -39,10 +38,10 @@
|
|
|
39
38
|
--color-complement-1-900: #003134;
|
|
40
39
|
--color-complement-1-950: #012628;
|
|
41
40
|
|
|
42
|
-
--color-complement-1-50: oklch(0.
|
|
43
|
-
--color-complement-1-100: oklch(0.
|
|
44
|
-
--color-complement-1-200: oklch(0.
|
|
45
|
-
--color-complement-1-300: oklch(0.
|
|
41
|
+
--color-complement-1-50: oklch(0.957 0.0149 200);
|
|
42
|
+
--color-complement-1-100: oklch(0.9156 0.0315 200);
|
|
43
|
+
--color-complement-1-200: oklch(0.7918 0.0738 200);
|
|
44
|
+
--color-complement-1-300: oklch(0.84 0.09 200);
|
|
46
45
|
--color-complement-1-400: oklch(0.6058 0.103 200);
|
|
47
46
|
--color-complement-1: oklch(0.6058 0.103 200);
|
|
48
47
|
--color-complement-1-500: oklch(0.5393 0.0909 200);
|
|
@@ -103,4 +102,4 @@
|
|
|
103
102
|
--color-complement-3-800: oklch(0.35 0.18 260);
|
|
104
103
|
--color-complement-3-900: oklch(0.3 0.15 260);
|
|
105
104
|
--color-complement-3-950: oklch(0.26 0.13 260);
|
|
106
|
-
}
|
|
105
|
+
}
|
package/src/styles/index.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
@import "tw-animate-css";
|
|
3
|
-
|
|
4
|
-
@import "@/styles/colors.css";
|
|
5
|
-
@import "@/styles/fonts.css";
|
|
6
|
-
@import "@/styles/theme.css";
|
|
7
|
-
@import "@/styles/typography.css";
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
|
|
4
|
+
@import "@/styles/colors.css";
|
|
5
|
+
@import "@/styles/fonts.css";
|
|
6
|
+
@import "@/styles/theme.css";
|
|
7
|
+
@import "@/styles/typography.css";
|
package/src/styles/theme.css
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--radius-md: calc(var(--radius) - 2px);
|
|
6
6
|
--radius-lg: var(--radius);
|
|
7
7
|
--radius-xl: calc(var(--radius) + 4px);
|
|
8
|
-
--container
|
|
8
|
+
--radius-container: var(--radius);
|
|
9
9
|
--color-background: var(--background);
|
|
10
10
|
--color-foreground: var(--foreground);
|
|
11
11
|
--color-card: var(--card);
|
|
@@ -37,6 +37,23 @@
|
|
|
37
37
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
38
38
|
--color-sidebar-border: var(--sidebar-border);
|
|
39
39
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
40
|
+
|
|
41
|
+
--spacing-page-nav: --spacing(18);
|
|
42
|
+
|
|
43
|
+
--spacing-section: var(--section-p);
|
|
44
|
+
--spacing-section-sm: calc(var(--spacing-section) / 2);
|
|
45
|
+
--spacing-section-lg: calc(var(--spacing-section) * 2);
|
|
46
|
+
--spacing-section-xl: calc(var(--spacing-section) * 5);
|
|
47
|
+
|
|
48
|
+
--spacing-card: var(--card-p);
|
|
49
|
+
--spacing-card-sm: calc(var(--spacing-card) / 2);
|
|
50
|
+
--spacing-card-lg: calc(var(--spacing-card) * 2);
|
|
51
|
+
--spacing-card-xl: calc(var(--spacing-card) * 5);
|
|
52
|
+
|
|
53
|
+
--gap-page: var(--page-gap);
|
|
54
|
+
--gap-card: var(--card-gap);
|
|
55
|
+
--gap-card-area: var(--card-area-gap);
|
|
56
|
+
--gap-card-item-group: var(--card-item-group-gap);
|
|
40
57
|
}
|
|
41
58
|
|
|
42
59
|
:root {
|
|
@@ -72,12 +89,38 @@
|
|
|
72
89
|
--sidebar-accent-foreground: oklch(0.3741 0.0774 245.65);
|
|
73
90
|
--sidebar-border: oklch(0.92 0.004 286.32);
|
|
74
91
|
--sidebar-ring: oklch(0.5393 0.0909 199.73);
|
|
92
|
+
|
|
93
|
+
/* Responsive Layout Spacing */
|
|
94
|
+
--section-p: --spacing(6);
|
|
95
|
+
--card-p: --spacing(6);
|
|
96
|
+
--page-gap: --spacing(0);
|
|
97
|
+
--card-gap: --spacing(6);
|
|
98
|
+
--card-area-gap: --spacing(6);
|
|
99
|
+
--card-item-group-gap: --spacing(2);
|
|
100
|
+
|
|
101
|
+
@media (width >= 40rem) {
|
|
102
|
+
--section-p: --spacing(8);
|
|
103
|
+
--card-p: --spacing(6);
|
|
104
|
+
--page-gap: --spacing(4);
|
|
105
|
+
--card-gap: --spacing(6);
|
|
106
|
+
--card-area-gap: --spacing(6);
|
|
107
|
+
--card-item-group-gap: --spacing(2);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (width >= 80rem) {
|
|
111
|
+
--section-p: --spacing(12);
|
|
112
|
+
--card-p: --spacing(6);
|
|
113
|
+
--page-gap: --spacing(0);
|
|
114
|
+
--card-gap: --spacing(6);
|
|
115
|
+
--card-area-gap: --spacing(6);
|
|
116
|
+
--card-item-group-gap: --spacing(2);
|
|
117
|
+
}
|
|
75
118
|
}
|
|
76
119
|
|
|
77
120
|
.dark {
|
|
78
121
|
--background: oklch(0.141 0.005 285.823);
|
|
79
122
|
--foreground: oklch(0.985 0 0);
|
|
80
|
-
--card: oklch(0.
|
|
123
|
+
--card: oklch(0.141 0.005 285.823);
|
|
81
124
|
--card-foreground: oklch(0.985 0 0);
|
|
82
125
|
--popover: oklch(0.3741 0.0774 245.65);
|
|
83
126
|
--popover-foreground: oklch(0.985 0 0);
|
|
@@ -124,3 +167,14 @@
|
|
|
124
167
|
display: none;
|
|
125
168
|
}
|
|
126
169
|
}
|
|
170
|
+
|
|
171
|
+
@utility areas-* {
|
|
172
|
+
grid-template-areas: --value(*, [*]);
|
|
173
|
+
grid-template-columns: --modifier(*, [*]);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@utility stick-to-page {
|
|
177
|
+
position: sticky;
|
|
178
|
+
top: calc(var(--spacing-section) + var(--spacing-page-nav));
|
|
179
|
+
height: fit-content;
|
|
180
|
+
}
|