@umituz/web-design-system 1.0.4 → 1.3.1
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/README.md +181 -0
- package/package.json +18 -5
- package/src/global.d.ts +20 -0
- package/src/index.ts +3 -0
- package/src/infrastructure/error/ErrorBoundary.tsx +258 -0
- package/src/infrastructure/error/ErrorDisplay.tsx +346 -0
- package/src/infrastructure/error/SuspenseWrapper.tsx +134 -0
- package/src/infrastructure/error/index.ts +5 -0
- package/src/infrastructure/performance/index.ts +6 -0
- package/src/infrastructure/performance/useLazyLoading.ts +342 -0
- package/src/infrastructure/performance/useMemoryOptimization.ts +293 -0
- package/src/infrastructure/performance/usePerformanceMonitor.ts +158 -0
- package/src/infrastructure/security/index.ts +10 -0
- package/src/infrastructure/security/security-config.ts +171 -0
- package/src/infrastructure/security/useFormValidation.ts +216 -0
- package/src/infrastructure/security/validation.ts +242 -0
- package/src/infrastructure/utils/cn.util.ts +7 -7
- package/src/infrastructure/utils/index.ts +1 -1
- package/src/presentation/atoms/Input.tsx +1 -1
- package/src/presentation/atoms/Slider.tsx +1 -1
- package/src/presentation/atoms/Text.tsx +1 -1
- package/src/presentation/atoms/Tooltip.tsx +2 -2
- package/src/presentation/hooks/index.ts +2 -1
- package/src/presentation/hooks/useClickOutside.ts +1 -1
- package/src/presentation/molecules/CheckboxGroup.tsx +1 -1
- package/src/presentation/molecules/FormField.tsx +2 -2
- package/src/presentation/molecules/InputGroup.tsx +1 -1
- package/src/presentation/molecules/RadioGroup.tsx +1 -1
- package/src/presentation/organisms/Alert.tsx +1 -1
- package/src/presentation/organisms/Card.tsx +1 -1
- package/src/presentation/organisms/Footer.tsx +99 -0
- package/src/presentation/organisms/Navbar.tsx +1 -1
- package/src/presentation/organisms/Table.tsx +1 -1
- package/src/presentation/organisms/index.ts +3 -0
- package/src/presentation/templates/Form.tsx +2 -2
- package/src/presentation/templates/List.tsx +1 -1
- package/src/presentation/templates/PageHeader.tsx +78 -0
- package/src/presentation/templates/PageLayout.tsx +38 -0
- package/src/presentation/templates/ProjectSkeleton.tsx +35 -0
- package/src/presentation/templates/Section.tsx +1 -1
- package/src/presentation/templates/index.ts +9 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PageLayout Template Component
|
|
3
|
+
* @description Centralized page layout with consistent padding, max-width, and theme integration
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
7
|
+
import { cn } from '../../infrastructure/utils';
|
|
8
|
+
import type { BaseProps, ChildrenProps } from '../../domain/types';
|
|
9
|
+
|
|
10
|
+
export type MaxWidth = '4xl' | '7xl' | 'full';
|
|
11
|
+
|
|
12
|
+
export interface PageLayoutProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
|
|
13
|
+
maxWidth?: MaxWidth;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const maxWidthClasses: Record<MaxWidth, string> = {
|
|
17
|
+
'4xl': 'max-w-4xl',
|
|
18
|
+
'7xl': 'max-w-7xl',
|
|
19
|
+
'full': 'max-w-full',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const PageLayout = forwardRef<HTMLDivElement, PageLayoutProps>(
|
|
23
|
+
({ children, maxWidth = '7xl', className, ...props }, ref) => {
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
ref={ref}
|
|
27
|
+
className="min-h-screen bg-surface-gradient py-8 md:py-12 px-4 transition-theme"
|
|
28
|
+
{...props}
|
|
29
|
+
>
|
|
30
|
+
<div className={cn(maxWidthClasses[maxWidth], 'mx-auto', className)}>
|
|
31
|
+
{children}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
PageLayout.displayName = 'PageLayout';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProjectSkeleton Template Component
|
|
3
|
+
* @description Loading skeleton for project cards
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { forwardRef, type HTMLAttributes } from 'react';
|
|
7
|
+
import { cn } from '../../infrastructure/utils';
|
|
8
|
+
import type { BaseProps } from '../../domain/types';
|
|
9
|
+
|
|
10
|
+
export interface ProjectSkeletonProps extends HTMLAttributes<HTMLDivElement>, BaseProps {}
|
|
11
|
+
|
|
12
|
+
export const ProjectSkeleton = forwardRef<HTMLDivElement, ProjectSkeletonProps>(
|
|
13
|
+
({ className, ...props }, ref) => {
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
ref={ref}
|
|
17
|
+
className={cn('bg-bg-card rounded-xl overflow-hidden border border-border transition-theme', className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
<div className="h-28 bg-bg-tertiary animate-pulse" />
|
|
21
|
+
<div className="p-5">
|
|
22
|
+
<div className="flex gap-2 mb-3">
|
|
23
|
+
<div className="w-16 h-6 bg-bg-tertiary rounded-full animate-pulse" />
|
|
24
|
+
<div className="w-20 h-6 bg-bg-tertiary rounded-full animate-pulse" />
|
|
25
|
+
</div>
|
|
26
|
+
<div className="w-3/4 h-5 bg-bg-tertiary rounded mb-2 animate-pulse" />
|
|
27
|
+
<div className="w-full h-4 bg-bg-tertiary rounded mb-4 animate-pulse" />
|
|
28
|
+
<div className="w-1/2 h-4 bg-bg-tertiary rounded animate-pulse" />
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
ProjectSkeleton.displayName = 'ProjectSkeleton';
|
|
@@ -7,7 +7,7 @@ import { forwardRef, type HTMLAttributes } from 'react';
|
|
|
7
7
|
import { cn } from '../../infrastructure/utils';
|
|
8
8
|
import type { BaseProps, ChildrenProps } from '../../domain/types';
|
|
9
9
|
|
|
10
|
-
export interface SectionProps extends HTMLAttributes<HTMLElement>, BaseProps
|
|
10
|
+
export interface SectionProps extends HTMLAttributes<HTMLElement>, BaseProps {
|
|
11
11
|
title?: string;
|
|
12
12
|
description?: string;
|
|
13
13
|
}
|
|
@@ -12,3 +12,12 @@ export type { ListProps } from './List';
|
|
|
12
12
|
|
|
13
13
|
export { Section } from './Section';
|
|
14
14
|
export type { SectionProps } from './Section';
|
|
15
|
+
|
|
16
|
+
export { PageLayout } from './PageLayout';
|
|
17
|
+
export type { PageLayoutProps, MaxWidth } from './PageLayout';
|
|
18
|
+
|
|
19
|
+
export { PageHeader } from './PageHeader';
|
|
20
|
+
export type { PageHeaderProps, TextAlign, HeaderSize } from './PageHeader';
|
|
21
|
+
|
|
22
|
+
export { ProjectSkeleton } from './ProjectSkeleton';
|
|
23
|
+
export type { ProjectSkeletonProps } from './ProjectSkeleton';
|