feat: integrate Universal Design System with Web, Print, and Presentation examples
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 2s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m16s
Monorepo Pipeline / 🧹 Lint (push) Failing after 1m27s
Monorepo Pipeline / 🏗️ Build (push) Failing after 1m29s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped

This commit is contained in:
2026-06-08 17:55:57 +02:00
parent 9f8eab2ad2
commit 599ca63f06
47 changed files with 10864 additions and 200 deletions

View File

@@ -0,0 +1,24 @@
import React from 'react';
import { View } from '@react-pdf/renderer';
import { motion, HTMLMotionProps } from 'framer-motion';
import { useEnvironment } from '../context/EnvironmentContext';
export interface BoxProps extends HTMLMotionProps<"div"> {
children?: React.ReactNode;
pdfStyle?: any; // Specifically for PDF if Tailwind mapping is not enough
}
export const Box: React.FC<BoxProps> = ({ children, className, style, pdfStyle, ...props }) => {
const env = useEnvironment();
if (env === 'print') {
return <View style={pdfStyle || style}>{children}</View>;
}
// Web and Presentation get Framer Motion by default
return (
<motion.div className={className} style={style} {...props}>
{children}
</motion.div>
);
};

View File

@@ -0,0 +1,23 @@
import React from 'react';
import { Text as PdfText } from '@react-pdf/renderer';
import { motion, HTMLMotionProps } from 'framer-motion';
import { useEnvironment } from '../context/EnvironmentContext';
export interface TextProps extends HTMLMotionProps<"span"> {
children?: React.ReactNode;
pdfStyle?: any;
}
export const Text: React.FC<TextProps> = ({ children, className, style, pdfStyle, ...props }) => {
const env = useEnvironment();
if (env === 'print') {
return <PdfText style={pdfStyle || style}>{children}</PdfText>;
}
return (
<motion.span className={className} style={style} {...props}>
{children}
</motion.span>
);
};