@umituz/web-design-system 3.1.21 → 4.0.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/README.md +137 -469
- package/dist/styles.css +2 -0
- package/package.json +30 -31
- package/src/__tests__/cn.test.ts +24 -0
- package/src/__tests__/components.smoke.test.tsx +78 -0
- package/src/__tests__/styles.contract.test.ts +60 -0
- package/src/domain/tokens/index.ts +8 -49
- package/src/index.ts +8 -10
- package/src/infrastructure/constants/component.constants.ts +3 -17
- package/src/infrastructure/constants/index.ts +4 -2
- package/src/infrastructure/constants/timing.constants.ts +46 -0
- package/src/infrastructure/utils/calculation.utils.ts +74 -0
- package/src/infrastructure/utils/index.ts +12 -0
- package/src/presentation/atoms/IconButton.tsx +55 -0
- package/src/presentation/atoms/Progress.tsx +2 -1
- package/src/presentation/atoms/Spinner.tsx +1 -1
- package/src/presentation/atoms/Switch.tsx +2 -2
- package/src/presentation/atoms/Text.tsx +15 -13
- package/src/presentation/atoms/Tooltip.tsx +2 -1
- package/src/presentation/atoms/index.ts +3 -0
- package/src/presentation/hooks/index.ts +0 -3
- package/src/presentation/hooks/useClickOutside.ts +14 -10
- package/src/presentation/hooks/useClipboard.ts +30 -12
- package/src/presentation/hooks/useDebounce.ts +8 -10
- package/src/presentation/hooks/useLocalStorage.ts +28 -18
- package/src/presentation/hooks/useMediaQuery.ts +2 -1
- package/src/presentation/hooks/useScrollLock.ts +40 -12
- package/src/presentation/hooks/useToggle.ts +8 -6
- package/src/presentation/molecules/ActiveFilterTags.tsx +19 -18
- package/src/presentation/molecules/Avatar.tsx +1 -1
- package/src/presentation/molecules/CodeBlock.tsx +51 -48
- package/src/presentation/molecules/ListItem.tsx +40 -29
- package/src/presentation/molecules/Select.tsx +1 -1
- package/src/presentation/molecules/Toggle.tsx +4 -4
- package/src/presentation/molecules/index.ts +0 -3
- package/src/presentation/organisms/Alert.tsx +1 -1
- package/src/presentation/organisms/DataTable.tsx +24 -11
- package/src/presentation/organisms/Dialog.tsx +1 -1
- package/src/presentation/organisms/DropdownMenu.tsx +2 -2
- package/src/presentation/organisms/HoverCard.tsx +1 -1
- package/src/presentation/organisms/LoadingState.tsx +1 -5
- package/src/presentation/organisms/Popover.tsx +1 -1
- package/src/presentation/organisms/StatCard.tsx +2 -2
- package/src/presentation/organisms/Table.tsx +2 -2
- package/src/presentation/organisms/index.ts +0 -60
- package/src/styles/compile.css +18 -0
- package/src/styles/theme.css +131 -0
- package/src/domain/tokens/animation.tokens.ts +0 -87
- package/src/domain/tokens/color.tokens.ts +0 -95
- package/src/domain/tokens/radius.tokens.ts +0 -27
- package/src/domain/tokens/shadow.tokens.ts +0 -25
- package/src/domain/tokens/spacing.tokens.ts +0 -65
- package/src/domain/tokens/typography.tokens.ts +0 -74
- package/src/infrastructure/error/ErrorBoundary.tsx +0 -258
- package/src/infrastructure/error/ErrorDisplay.tsx +0 -346
- package/src/infrastructure/error/SuspenseWrapper.tsx +0 -133
- package/src/infrastructure/error/index.ts +0 -5
- package/src/infrastructure/performance/index.ts +0 -92
- package/src/infrastructure/performance/useLazyLoading.ts +0 -342
- package/src/infrastructure/performance/useMemoryOptimization.ts +0 -293
- package/src/infrastructure/performance/usePerformanceMonitor.ts +0 -158
- package/src/infrastructure/security/index.ts +0 -10
- package/src/infrastructure/security/security-config.ts +0 -171
- package/src/infrastructure/security/useFormValidation.ts +0 -216
- package/src/infrastructure/security/validation.ts +0 -246
- package/src/presentation/hooks/useLanguage.ts +0 -109
- package/src/presentation/molecules/Breadcrumb.tsx +0 -54
- package/src/presentation/organisms/AlertDialog.tsx +0 -181
- package/src/presentation/organisms/Calendar.tsx +0 -79
- package/src/presentation/organisms/Comments.tsx +0 -103
- package/src/presentation/organisms/ConfirmDialog.tsx +0 -97
- package/src/presentation/organisms/FilterBar.tsx +0 -244
- package/src/presentation/organisms/FilterSidebar.tsx +0 -172
- package/src/presentation/organisms/Footer.tsx +0 -86
- package/src/presentation/organisms/FormModal.tsx +0 -126
- package/src/presentation/organisms/Grid.tsx +0 -128
- package/src/presentation/organisms/ImageLightbox.tsx +0 -252
- package/src/presentation/organisms/MainNavbar.tsx +0 -320
- package/src/presentation/organisms/Modal.tsx +0 -173
- package/src/presentation/organisms/Navbar.tsx +0 -75
- package/src/presentation/organisms/NewsletterSignup.tsx +0 -165
- package/src/presentation/organisms/QuickActionCard.tsx +0 -93
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* StatCard Component (Organism)
|
|
3
3
|
* @description Enhanced metric card with progress bar and target tracking (Responsive)
|
|
4
|
-
* Combines functionality of KPICard and StatsCard from main app
|
|
5
4
|
*/
|
|
6
5
|
|
|
7
6
|
import { forwardRef, type ComponentType } from 'react';
|
|
@@ -9,6 +8,7 @@ import { cn, getSpacing, getIconSize, getContainerSize, getTextSize, getSpaceY,
|
|
|
9
8
|
import { Card, CardContent } from './Card';
|
|
10
9
|
import { Progress } from '../atoms';
|
|
11
10
|
import { ArrowUpRight, ArrowDownRight } from 'lucide-react';
|
|
11
|
+
import { formatTrendMagnitude } from '../../infrastructure/utils/calculation.utils';
|
|
12
12
|
import type { BaseProps, SizeVariant } from '../../domain/types';
|
|
13
13
|
|
|
14
14
|
export interface StatCardProps extends BaseProps {
|
|
@@ -44,7 +44,7 @@ export const StatCard = forwardRef<HTMLDivElement, StatCardProps>(
|
|
|
44
44
|
target,
|
|
45
45
|
size = 'md',
|
|
46
46
|
variant = 'default',
|
|
47
|
-
trendValueFormatter = (v) =>
|
|
47
|
+
trendValueFormatter = (v) => formatTrendMagnitude(v),
|
|
48
48
|
onClick,
|
|
49
49
|
changeLabel,
|
|
50
50
|
responsiveLayout = true,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description Data table component
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { forwardRef, type HTMLAttributes } from 'react';
|
|
6
|
+
import { forwardRef, type HTMLAttributes, type TdHTMLAttributes } from 'react';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { cn } from '../../infrastructure/utils';
|
|
9
9
|
import type { BaseProps } from '../../domain/types';
|
|
@@ -93,7 +93,7 @@ export const TableHead = React.memo(forwardRef<HTMLTableCellElement, HTMLAttribu
|
|
|
93
93
|
|
|
94
94
|
TableHead.displayName = 'TableHead';
|
|
95
95
|
|
|
96
|
-
export const TableCell = React.memo(forwardRef<HTMLTableCellElement,
|
|
96
|
+
export const TableCell = React.memo(forwardRef<HTMLTableCellElement, TdHTMLAttributes<HTMLTableCellElement>>(
|
|
97
97
|
({ className, ...props }, ref) => (
|
|
98
98
|
<td
|
|
99
99
|
ref={ref}
|
|
@@ -10,12 +10,6 @@ export type { CardProps } from './Card';
|
|
|
10
10
|
export { Alert, AlertTitle, AlertDescription } from './Alert';
|
|
11
11
|
export type { AlertProps } from './Alert';
|
|
12
12
|
|
|
13
|
-
export { Modal, ModalHeader, ModalTitle, ModalDescription, ModalContent, ModalFooter } from './Modal';
|
|
14
|
-
export type { ModalProps } from './Modal';
|
|
15
|
-
|
|
16
|
-
export { Navbar, NavbarBrand, NavbarLinks, NavbarActions } from './Navbar';
|
|
17
|
-
export type { NavbarProps } from './Navbar';
|
|
18
|
-
|
|
19
13
|
export {
|
|
20
14
|
Table,
|
|
21
15
|
TableHeader,
|
|
@@ -68,15 +62,9 @@ export {
|
|
|
68
62
|
SheetTrigger,
|
|
69
63
|
} from './Sheet';
|
|
70
64
|
|
|
71
|
-
export { Footer } from './Footer';
|
|
72
|
-
export type { FooterProps } from './Footer';
|
|
73
|
-
|
|
74
65
|
export { MetricCard } from './MetricCard';
|
|
75
66
|
export type { MetricCardProps } from './MetricCard';
|
|
76
67
|
|
|
77
|
-
export { QuickActionCard } from './QuickActionCard';
|
|
78
|
-
export type { QuickActionCardProps } from './QuickActionCard';
|
|
79
|
-
|
|
80
68
|
export { EmptyState } from './EmptyState';
|
|
81
69
|
export type { EmptyStateProps } from './EmptyState';
|
|
82
70
|
|
|
@@ -89,32 +77,6 @@ export type { DataTableProps, Column } from './DataTable';
|
|
|
89
77
|
export { StatCard } from './StatCard';
|
|
90
78
|
export type { StatCardProps } from './StatCard';
|
|
91
79
|
|
|
92
|
-
export { FormModal } from './FormModal';
|
|
93
|
-
export type { FormModalProps } from './FormModal';
|
|
94
|
-
|
|
95
|
-
export { Grid, GridItem } from './Grid';
|
|
96
|
-
export type { GridProps, GridItemProps } from './Grid';
|
|
97
|
-
|
|
98
|
-
export { ConfirmDialog } from './ConfirmDialog';
|
|
99
|
-
export type { ConfirmDialogProps } from './ConfirmDialog';
|
|
100
|
-
|
|
101
|
-
export { Calendar } from './Calendar';
|
|
102
|
-
export type { CalendarProps } from './Calendar';
|
|
103
|
-
|
|
104
|
-
export {
|
|
105
|
-
AlertDialog,
|
|
106
|
-
AlertDialogPortal,
|
|
107
|
-
AlertDialogOverlay,
|
|
108
|
-
AlertDialogTrigger,
|
|
109
|
-
AlertDialogContent,
|
|
110
|
-
AlertDialogHeader,
|
|
111
|
-
AlertDialogFooter,
|
|
112
|
-
AlertDialogTitle,
|
|
113
|
-
AlertDialogDescription,
|
|
114
|
-
AlertDialogAction,
|
|
115
|
-
AlertDialogCancel,
|
|
116
|
-
} from './AlertDialog';
|
|
117
|
-
|
|
118
80
|
export {
|
|
119
81
|
DropdownMenu,
|
|
120
82
|
DropdownMenuTrigger,
|
|
@@ -134,25 +96,3 @@ export {
|
|
|
134
96
|
} from './DropdownMenu';
|
|
135
97
|
|
|
136
98
|
export { ToggleGroup, ToggleGroupItem } from './ToggleGroup';
|
|
137
|
-
|
|
138
|
-
// NEW: Media & Content Components
|
|
139
|
-
export { ImageLightbox } from './ImageLightbox';
|
|
140
|
-
export type { ImageLightboxProps, ImageLightboxImage } from './ImageLightbox';
|
|
141
|
-
|
|
142
|
-
// NEW: Content & Engagement Components
|
|
143
|
-
export { NewsletterSignup } from './NewsletterSignup';
|
|
144
|
-
export type { NewsletterSignupProps } from './NewsletterSignup';
|
|
145
|
-
|
|
146
|
-
export { Comments } from './Comments';
|
|
147
|
-
export type { CommentsProps, GiscusConfig } from './Comments';
|
|
148
|
-
|
|
149
|
-
// NEW: Filter Components
|
|
150
|
-
export { FilterBar } from './FilterBar';
|
|
151
|
-
export type { FilterBarProps, Category, SortOption } from './FilterBar';
|
|
152
|
-
|
|
153
|
-
export { FilterSidebar } from './FilterSidebar';
|
|
154
|
-
export type { FilterSidebarProps } from './FilterSidebar';
|
|
155
|
-
|
|
156
|
-
// NEW: Navigation Components
|
|
157
|
-
export { MainNavbar } from './MainNavbar';
|
|
158
|
-
export type { MainNavbarProps, NavItem, MainNavbarLanguage } from './MainNavbar';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @umituz/web-design-system — Tailwind v4 compile entry
|
|
3
|
+
*
|
|
4
|
+
* Input for the build step (`npm run build`) that produces
|
|
5
|
+
* `dist/styles.css`: Tailwind + animations + the theme layer, with the
|
|
6
|
+
* component source scanned for utility classes.
|
|
7
|
+
*
|
|
8
|
+
* Vanilla hosts import the precompiled output:
|
|
9
|
+
* @import "@umituz/web-design-system/styles.css";
|
|
10
|
+
*
|
|
11
|
+
* Tailwind v4 hosts compile this package's source themselves instead
|
|
12
|
+
* (see README) and must NOT also import the precompiled stylesheet.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
@import "tailwindcss";
|
|
16
|
+
@import "tw-animate-css";
|
|
17
|
+
@import "./theme.css";
|
|
18
|
+
@source "../src";
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @umituz/web-design-system — theme layer (Tailwind v4 `@theme`)
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for colors, radii, fonts and shadows. Component
|
|
5
|
+
* classes are semantic (`bg-primary`, `text-muted-foreground`, …) and bind
|
|
6
|
+
* to the `--color-*` variables defined here, so hosts restyle the whole
|
|
7
|
+
* package by overriding variables — no Tailwind rebuild required.
|
|
8
|
+
*
|
|
9
|
+
* The default palette mirrors @umituz/web-dashboard's tokens.css, so
|
|
10
|
+
* dashboard adoption is visually regression-free.
|
|
11
|
+
*
|
|
12
|
+
* Dark mode: add `data-theme="dark"` or `class="dark"` on any ancestor
|
|
13
|
+
* (typically <html>). The package never switches themes on its own.
|
|
14
|
+
*
|
|
15
|
+
* Tailwind v4 hosts that compile the package source themselves
|
|
16
|
+
* (`@source "../node_modules/@umituz/web-design-system/src"`) import this
|
|
17
|
+
* file; vanilla hosts import the precompiled `dist/styles.css`.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
@theme {
|
|
21
|
+
/* Surfaces & text */
|
|
22
|
+
--color-background: #f8fafc;
|
|
23
|
+
--color-foreground: #0f172a;
|
|
24
|
+
--color-card: #ffffff;
|
|
25
|
+
--color-card-foreground: #0f172a;
|
|
26
|
+
--color-popover: #ffffff;
|
|
27
|
+
--color-popover-foreground: #0f172a;
|
|
28
|
+
|
|
29
|
+
/* Brand */
|
|
30
|
+
--color-primary: #2563eb;
|
|
31
|
+
--color-primary-foreground: #ffffff;
|
|
32
|
+
--color-secondary: #8b5cf6;
|
|
33
|
+
--color-secondary-foreground: #ffffff;
|
|
34
|
+
|
|
35
|
+
/* Neutral */
|
|
36
|
+
--color-muted: #f1f5f9;
|
|
37
|
+
--color-muted-foreground: #64748b;
|
|
38
|
+
--color-accent: #f1f5f9;
|
|
39
|
+
--color-accent-foreground: #0f172a;
|
|
40
|
+
--color-border: #e2e8f0;
|
|
41
|
+
--color-input: #e2e8f0;
|
|
42
|
+
|
|
43
|
+
/* Semantic */
|
|
44
|
+
--color-destructive: #dc2626;
|
|
45
|
+
--color-destructive-foreground: #ffffff;
|
|
46
|
+
--color-success: #16a34a;
|
|
47
|
+
--color-success-foreground: #ffffff;
|
|
48
|
+
--color-warning: #d97706;
|
|
49
|
+
--color-warning-foreground: #ffffff;
|
|
50
|
+
--color-info: #2563eb;
|
|
51
|
+
--color-info-foreground: #ffffff;
|
|
52
|
+
|
|
53
|
+
/* Focus */
|
|
54
|
+
--color-ring: rgba(37, 99, 235, 0.45);
|
|
55
|
+
|
|
56
|
+
/* Radii (dashboard scale) */
|
|
57
|
+
--radius-sm: 6px;
|
|
58
|
+
--radius-md: 8px;
|
|
59
|
+
--radius-lg: 12px;
|
|
60
|
+
--radius-xl: 16px;
|
|
61
|
+
|
|
62
|
+
/* Typography */
|
|
63
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
|
|
64
|
+
"Helvetica Neue", Arial, "Noto Sans", sans-serif;
|
|
65
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
66
|
+
"Liberation Mono", "Courier New", monospace;
|
|
67
|
+
|
|
68
|
+
/* Elevation (dashboard scale) */
|
|
69
|
+
--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
|
|
70
|
+
--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
|
|
71
|
+
--shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
|
|
72
|
+
|
|
73
|
+
/* Accordion (Radix --radix-accordion-content-height driven) */
|
|
74
|
+
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
75
|
+
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
76
|
+
|
|
77
|
+
@keyframes accordion-down {
|
|
78
|
+
from {
|
|
79
|
+
height: 0;
|
|
80
|
+
}
|
|
81
|
+
to {
|
|
82
|
+
height: var(--radix-accordion-content-height);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes accordion-up {
|
|
87
|
+
from {
|
|
88
|
+
height: var(--radix-accordion-content-height);
|
|
89
|
+
}
|
|
90
|
+
to {
|
|
91
|
+
height: 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-theme="dark"],
|
|
97
|
+
.dark {
|
|
98
|
+
--color-background: #0b1120;
|
|
99
|
+
--color-foreground: #f1f5f9;
|
|
100
|
+
--color-card: #111827;
|
|
101
|
+
--color-card-foreground: #f1f5f9;
|
|
102
|
+
--color-popover: #111827;
|
|
103
|
+
--color-popover-foreground: #f1f5f9;
|
|
104
|
+
|
|
105
|
+
--color-primary: #3b82f6;
|
|
106
|
+
--color-primary-foreground: #ffffff;
|
|
107
|
+
--color-secondary: #a78bfa;
|
|
108
|
+
--color-secondary-foreground: #ffffff;
|
|
109
|
+
|
|
110
|
+
--color-muted: #1e293b;
|
|
111
|
+
--color-muted-foreground: #94a3b8;
|
|
112
|
+
--color-accent: #1e293b;
|
|
113
|
+
--color-accent-foreground: #f1f5f9;
|
|
114
|
+
--color-border: #1f2a3c;
|
|
115
|
+
--color-input: #1f2a3c;
|
|
116
|
+
|
|
117
|
+
--color-destructive: #ef4444;
|
|
118
|
+
--color-destructive-foreground: #ffffff;
|
|
119
|
+
--color-success: #22c55e;
|
|
120
|
+
--color-success-foreground: #ffffff;
|
|
121
|
+
--color-warning: #f59e0b;
|
|
122
|
+
--color-warning-foreground: #ffffff;
|
|
123
|
+
--color-info: #3b82f6;
|
|
124
|
+
--color-info-foreground: #ffffff;
|
|
125
|
+
|
|
126
|
+
--color-ring: rgba(96, 165, 250, 0.5);
|
|
127
|
+
|
|
128
|
+
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
129
|
+
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
|
|
130
|
+
--shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
|
|
131
|
+
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Animation Tokens
|
|
3
|
-
* @description Animation durations, easings, and keyframes
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type DurationToken =
|
|
7
|
-
| 'instant'
|
|
8
|
-
| 'fast'
|
|
9
|
-
| 'normal'
|
|
10
|
-
| 'slow'
|
|
11
|
-
| 'slower';
|
|
12
|
-
|
|
13
|
-
export type EasingToken =
|
|
14
|
-
| 'linear'
|
|
15
|
-
| 'ease'
|
|
16
|
-
| 'easeIn'
|
|
17
|
-
| 'easeOut'
|
|
18
|
-
| 'easeInOut'
|
|
19
|
-
| 'bounce'
|
|
20
|
-
| 'elastic';
|
|
21
|
-
|
|
22
|
-
export const durations: Record<DurationToken, string> = {
|
|
23
|
-
instant: '150ms',
|
|
24
|
-
fast: '200ms',
|
|
25
|
-
normal: '300ms',
|
|
26
|
-
slow: '500ms',
|
|
27
|
-
slower: '700ms',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const easings: Record<EasingToken, string> = {
|
|
31
|
-
linear: 'linear',
|
|
32
|
-
ease: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
33
|
-
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
34
|
-
easeOut: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
35
|
-
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
36
|
-
bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',
|
|
37
|
-
elastic: 'cubic-bezier(0.87, 0, 0.13, 1)',
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const animations = {
|
|
41
|
-
fade: 'fade 300ms ease-out',
|
|
42
|
-
slide: 'slide 300ms ease-out',
|
|
43
|
-
scale: 'scale 200ms ease-out',
|
|
44
|
-
spin: 'spin 1s linear infinite',
|
|
45
|
-
ping: 'ping 1s cubic-bezier(0, 0, 0.2, 1) infinite',
|
|
46
|
-
pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
|
47
|
-
bounce: 'bounce 1s infinite',
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const keyframes = {
|
|
51
|
-
fade: {
|
|
52
|
-
from: { opacity: '0' },
|
|
53
|
-
to: { opacity: '1' },
|
|
54
|
-
},
|
|
55
|
-
slide: {
|
|
56
|
-
from: { transform: 'translateY(-10px)', opacity: '0' },
|
|
57
|
-
to: { transform: 'translateY(0)', opacity: '1' },
|
|
58
|
-
},
|
|
59
|
-
scale: {
|
|
60
|
-
from: { transform: 'scale(0.95)', opacity: '0' },
|
|
61
|
-
to: { transform: 'scale(1)', opacity: '1' },
|
|
62
|
-
},
|
|
63
|
-
spin: {
|
|
64
|
-
from: { transform: 'rotate(0deg)' },
|
|
65
|
-
to: { transform: 'rotate(360deg)' },
|
|
66
|
-
},
|
|
67
|
-
ping: {
|
|
68
|
-
'75%, 100%': {
|
|
69
|
-
transform: 'scale(2)',
|
|
70
|
-
opacity: '0',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
pulse: {
|
|
74
|
-
'0%, 100%': { opacity: '1' },
|
|
75
|
-
'50%': { opacity: '0.5' },
|
|
76
|
-
},
|
|
77
|
-
bounce: {
|
|
78
|
-
'0%, 100%': {
|
|
79
|
-
transform: 'translateY(-25%)',
|
|
80
|
-
animationTimingFunction: 'cubic-bezier(0.8, 0, 1, 1)',
|
|
81
|
-
},
|
|
82
|
-
'50%': {
|
|
83
|
-
transform: 'translateY(0)',
|
|
84
|
-
animationTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Color Tokens
|
|
3
|
-
* @description Design system color tokens
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export interface ColorTokens {
|
|
7
|
-
// Primary
|
|
8
|
-
primary: string;
|
|
9
|
-
primaryForeground: string;
|
|
10
|
-
|
|
11
|
-
// Secondary
|
|
12
|
-
secondary: string;
|
|
13
|
-
secondaryForeground: string;
|
|
14
|
-
|
|
15
|
-
// Background
|
|
16
|
-
background: string;
|
|
17
|
-
foreground: string;
|
|
18
|
-
|
|
19
|
-
// Surfaces
|
|
20
|
-
card: string;
|
|
21
|
-
cardForeground: string;
|
|
22
|
-
popover: string;
|
|
23
|
-
popoverForeground: string;
|
|
24
|
-
|
|
25
|
-
// Interactive
|
|
26
|
-
muted: string;
|
|
27
|
-
mutedForeground: string;
|
|
28
|
-
accent: string;
|
|
29
|
-
accentForeground: string;
|
|
30
|
-
|
|
31
|
-
// Status
|
|
32
|
-
destructive: string;
|
|
33
|
-
destructiveForeground: string;
|
|
34
|
-
success: string;
|
|
35
|
-
successForeground: string;
|
|
36
|
-
warning: string;
|
|
37
|
-
warningForeground: string;
|
|
38
|
-
|
|
39
|
-
// Borders
|
|
40
|
-
border: string;
|
|
41
|
-
input: string;
|
|
42
|
-
ring: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const lightColorTokens: ColorTokens = {
|
|
46
|
-
primary: 'hsl(187 75% 38%)',
|
|
47
|
-
primaryForeground: 'hsl(0 0% 100%)',
|
|
48
|
-
secondary: 'hsl(215 20% 92%)',
|
|
49
|
-
secondaryForeground: 'hsl(220 20% 12%)',
|
|
50
|
-
background: 'hsl(210 20% 98%)',
|
|
51
|
-
foreground: 'hsl(220 20% 12%)',
|
|
52
|
-
card: 'hsl(0 0% 100%)',
|
|
53
|
-
cardForeground: 'hsl(220 20% 12%)',
|
|
54
|
-
popover: 'hsl(0 0% 100%)',
|
|
55
|
-
popoverForeground: 'hsl(220 20% 12%)',
|
|
56
|
-
muted: 'hsl(220 15% 94%)',
|
|
57
|
-
mutedForeground: 'hsl(215 15% 45%)',
|
|
58
|
-
accent: 'hsl(187 75% 38%)',
|
|
59
|
-
accentForeground: 'hsl(0 0% 100%)',
|
|
60
|
-
destructive: 'hsl(0 72% 51%)',
|
|
61
|
-
destructiveForeground: 'hsl(0 0% 100%)',
|
|
62
|
-
success: 'hsl(152 55% 40%)',
|
|
63
|
-
successForeground: 'hsl(0 0% 100%)',
|
|
64
|
-
warning: 'hsl(38 90% 48%)',
|
|
65
|
-
warningForeground: 'hsl(0 0% 100%)',
|
|
66
|
-
border: 'hsl(220 15% 88%)',
|
|
67
|
-
input: 'hsl(220 15% 88%)',
|
|
68
|
-
ring: 'hsl(187 75% 38%)',
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const darkColorTokens: ColorTokens = {
|
|
72
|
-
primary: 'hsl(187 85% 53%)',
|
|
73
|
-
primaryForeground: 'hsl(220 20% 7%)',
|
|
74
|
-
secondary: 'hsl(215 20% 20%)',
|
|
75
|
-
secondaryForeground: 'hsl(210 20% 98%)',
|
|
76
|
-
background: 'hsl(220 20% 7%)',
|
|
77
|
-
foreground: 'hsl(210 20% 92%)',
|
|
78
|
-
card: 'hsl(220 18% 11%)',
|
|
79
|
-
cardForeground: 'hsl(210 20% 92%)',
|
|
80
|
-
popover: 'hsl(220 18% 13%)',
|
|
81
|
-
popoverForeground: 'hsl(210 20% 92%)',
|
|
82
|
-
muted: 'hsl(220 15% 16%)',
|
|
83
|
-
mutedForeground: 'hsl(215 15% 55%)',
|
|
84
|
-
accent: 'hsl(187 85% 53%)',
|
|
85
|
-
accentForeground: 'hsl(220 20% 7%)',
|
|
86
|
-
destructive: 'hsl(0 72% 55%)',
|
|
87
|
-
destructiveForeground: 'hsl(0 0% 100%)',
|
|
88
|
-
success: 'hsl(152 60% 48%)',
|
|
89
|
-
successForeground: 'hsl(0 0% 100%)',
|
|
90
|
-
warning: 'hsl(38 92% 55%)',
|
|
91
|
-
warningForeground: 'hsl(220 20% 7%)',
|
|
92
|
-
border: 'hsl(220 15% 18%)',
|
|
93
|
-
input: 'hsl(220 15% 18%)',
|
|
94
|
-
ring: 'hsl(187 85% 53%)',
|
|
95
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Radius Tokens
|
|
3
|
-
* @description Border radius scale
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type RadiusToken =
|
|
7
|
-
| 'none'
|
|
8
|
-
| 'sm'
|
|
9
|
-
| 'default'
|
|
10
|
-
| 'md'
|
|
11
|
-
| 'lg'
|
|
12
|
-
| 'xl'
|
|
13
|
-
| '2xl'
|
|
14
|
-
| '3xl'
|
|
15
|
-
| 'full';
|
|
16
|
-
|
|
17
|
-
export const radii: Record<RadiusToken, string> = {
|
|
18
|
-
'none': '0',
|
|
19
|
-
'sm': '0.125rem',
|
|
20
|
-
'default': '0.25rem',
|
|
21
|
-
'md': '0.375rem',
|
|
22
|
-
'lg': '0.5rem',
|
|
23
|
-
'xl': '0.75rem',
|
|
24
|
-
'2xl': '1rem',
|
|
25
|
-
'3xl': '1.5rem',
|
|
26
|
-
'full': '9999px',
|
|
27
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shadow Tokens
|
|
3
|
-
* @description Box shadow scale
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type ShadowToken =
|
|
7
|
-
| 'sm'
|
|
8
|
-
| 'default'
|
|
9
|
-
| 'md'
|
|
10
|
-
| 'lg'
|
|
11
|
-
| 'xl'
|
|
12
|
-
| '2xl'
|
|
13
|
-
| 'inner'
|
|
14
|
-
| 'none';
|
|
15
|
-
|
|
16
|
-
export const shadows: Record<ShadowToken, string> = {
|
|
17
|
-
'sm': '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
18
|
-
'default': '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
|
19
|
-
'md': '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
|
|
20
|
-
'lg': '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
21
|
-
'xl': '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
22
|
-
'2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
|
|
23
|
-
'inner': 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
|
|
24
|
-
'none': '0 0 #0000',
|
|
25
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Spacing Tokens
|
|
3
|
-
* @description Consistent spacing scale
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type SpacingToken =
|
|
7
|
-
| '0'
|
|
8
|
-
| 'px'
|
|
9
|
-
| '0.5'
|
|
10
|
-
| '1'
|
|
11
|
-
| '1.5'
|
|
12
|
-
| '2'
|
|
13
|
-
| '2.5'
|
|
14
|
-
| '3'
|
|
15
|
-
| '3.5'
|
|
16
|
-
| '4'
|
|
17
|
-
| '5'
|
|
18
|
-
| '6'
|
|
19
|
-
| '7'
|
|
20
|
-
| '8'
|
|
21
|
-
| '9'
|
|
22
|
-
| '10'
|
|
23
|
-
| '12'
|
|
24
|
-
| '16'
|
|
25
|
-
| '20'
|
|
26
|
-
| '24'
|
|
27
|
-
| '32'
|
|
28
|
-
| '40'
|
|
29
|
-
| '48'
|
|
30
|
-
| '56'
|
|
31
|
-
| '64'
|
|
32
|
-
| '72'
|
|
33
|
-
| '80'
|
|
34
|
-
| '96';
|
|
35
|
-
|
|
36
|
-
export const spacing: Record<SpacingToken, string> = {
|
|
37
|
-
'0': '0',
|
|
38
|
-
'px': '1px',
|
|
39
|
-
'0.5': '0.125rem',
|
|
40
|
-
'1': '0.25rem',
|
|
41
|
-
'1.5': '0.375rem',
|
|
42
|
-
'2': '0.5rem',
|
|
43
|
-
'2.5': '0.625rem',
|
|
44
|
-
'3': '0.75rem',
|
|
45
|
-
'3.5': '0.875rem',
|
|
46
|
-
'4': '1rem',
|
|
47
|
-
'5': '1.25rem',
|
|
48
|
-
'6': '1.5rem',
|
|
49
|
-
'7': '1.75rem',
|
|
50
|
-
'8': '2rem',
|
|
51
|
-
'9': '2.25rem',
|
|
52
|
-
'10': '2.5rem',
|
|
53
|
-
'12': '3rem',
|
|
54
|
-
'16': '4rem',
|
|
55
|
-
'20': '5rem',
|
|
56
|
-
'24': '6rem',
|
|
57
|
-
'32': '8rem',
|
|
58
|
-
'40': '10rem',
|
|
59
|
-
'48': '12rem',
|
|
60
|
-
'56': '14rem',
|
|
61
|
-
'64': '16rem',
|
|
62
|
-
'72': '18rem',
|
|
63
|
-
'80': '20rem',
|
|
64
|
-
'96': '24rem',
|
|
65
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typography Tokens
|
|
3
|
-
* @description Font sizes, weights, and line heights
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export type FontSizeToken =
|
|
7
|
-
| 'xs'
|
|
8
|
-
| 'sm'
|
|
9
|
-
| 'base'
|
|
10
|
-
| 'lg'
|
|
11
|
-
| 'xl'
|
|
12
|
-
| '2xl'
|
|
13
|
-
| '3xl'
|
|
14
|
-
| '4xl'
|
|
15
|
-
| '5xl'
|
|
16
|
-
| '6xl'
|
|
17
|
-
| '7xl'
|
|
18
|
-
| '8xl'
|
|
19
|
-
| '9xl';
|
|
20
|
-
|
|
21
|
-
export type FontWeightToken =
|
|
22
|
-
| 'thin'
|
|
23
|
-
| 'extralight'
|
|
24
|
-
| 'light'
|
|
25
|
-
| 'normal'
|
|
26
|
-
| 'medium'
|
|
27
|
-
| 'semibold'
|
|
28
|
-
| 'bold'
|
|
29
|
-
| 'extrabold'
|
|
30
|
-
| 'black';
|
|
31
|
-
|
|
32
|
-
export const fontSizes: Record<FontSizeToken, string> = {
|
|
33
|
-
'xs': '0.75rem',
|
|
34
|
-
'sm': '0.875rem',
|
|
35
|
-
'base': '1rem',
|
|
36
|
-
'lg': '1.125rem',
|
|
37
|
-
'xl': '1.25rem',
|
|
38
|
-
'2xl': '1.5rem',
|
|
39
|
-
'3xl': '1.875rem',
|
|
40
|
-
'4xl': '2.25rem',
|
|
41
|
-
'5xl': '3rem',
|
|
42
|
-
'6xl': '3.75rem',
|
|
43
|
-
'7xl': '4.5rem',
|
|
44
|
-
'8xl': '6rem',
|
|
45
|
-
'9xl': '8rem',
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const fontWeights: Record<FontWeightToken, string> = {
|
|
49
|
-
'thin': '100',
|
|
50
|
-
'extralight': '200',
|
|
51
|
-
'light': '300',
|
|
52
|
-
'normal': '400',
|
|
53
|
-
'medium': '500',
|
|
54
|
-
'semibold': '600',
|
|
55
|
-
'bold': '700',
|
|
56
|
-
'extrabold': '800',
|
|
57
|
-
'black': '900',
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const lineHeights: Record<FontSizeToken, string> = {
|
|
61
|
-
'xs': '1rem',
|
|
62
|
-
'sm': '1.25rem',
|
|
63
|
-
'base': '1.5rem',
|
|
64
|
-
'lg': '1.75rem',
|
|
65
|
-
'xl': '1.75rem',
|
|
66
|
-
'2xl': '2rem',
|
|
67
|
-
'3xl': '2.25rem',
|
|
68
|
-
'4xl': '2.5rem',
|
|
69
|
-
'5xl': '1',
|
|
70
|
-
'6xl': '1',
|
|
71
|
-
'7xl': '1',
|
|
72
|
-
'8xl': '1',
|
|
73
|
-
'9xl': '1',
|
|
74
|
-
};
|