@umituz/web-design-system 1.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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +235 -0
  3. package/package.json +64 -0
  4. package/src/domain/tokens/color.tokens.ts +95 -0
  5. package/src/domain/tokens/index.ts +44 -0
  6. package/src/domain/tokens/radius.tokens.ts +27 -0
  7. package/src/domain/tokens/shadow.tokens.ts +25 -0
  8. package/src/domain/tokens/spacing.tokens.ts +65 -0
  9. package/src/domain/tokens/typography.tokens.ts +74 -0
  10. package/src/domain/types/component.types.ts +23 -0
  11. package/src/domain/types/index.ts +14 -0
  12. package/src/index.ts +28 -0
  13. package/src/infrastructure/constants/component.constants.ts +24 -0
  14. package/src/infrastructure/constants/index.ts +13 -0
  15. package/src/infrastructure/utils/cn.util.ts +13 -0
  16. package/src/infrastructure/utils/index.ts +10 -0
  17. package/src/presentation/atoms/Badge.tsx +46 -0
  18. package/src/presentation/atoms/Button.tsx +54 -0
  19. package/src/presentation/atoms/Icon.tsx +37 -0
  20. package/src/presentation/atoms/Input.tsx +44 -0
  21. package/src/presentation/atoms/Spinner.tsx +39 -0
  22. package/src/presentation/atoms/Text.tsx +64 -0
  23. package/src/presentation/atoms/index.ts +23 -0
  24. package/src/presentation/hooks/index.ts +13 -0
  25. package/src/presentation/hooks/useLocalStorage.ts +44 -0
  26. package/src/presentation/hooks/useMediaQuery.ts +46 -0
  27. package/src/presentation/hooks/useTheme.ts +51 -0
  28. package/src/presentation/molecules/Avatar.tsx +52 -0
  29. package/src/presentation/molecules/Chip.tsx +58 -0
  30. package/src/presentation/molecules/FormField.tsx +61 -0
  31. package/src/presentation/molecules/SearchBox.tsx +45 -0
  32. package/src/presentation/molecules/Toggle.tsx +61 -0
  33. package/src/presentation/molecules/index.ts +20 -0
  34. package/src/presentation/organisms/Alert.tsx +96 -0
  35. package/src/presentation/organisms/Card.tsx +90 -0
  36. package/src/presentation/organisms/Modal.tsx +130 -0
  37. package/src/presentation/organisms/Navbar.tsx +74 -0
  38. package/src/presentation/organisms/index.ts +17 -0
  39. package/src/presentation/templates/Form.tsx +41 -0
  40. package/src/presentation/templates/List.tsx +46 -0
  41. package/src/presentation/templates/Section.tsx +39 -0
  42. package/src/presentation/templates/index.ts +14 -0
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Section Template (Template)
3
+ * @description Content section with header
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 interface SectionProps extends HTMLAttributes<HTMLElement>, BaseProps, ChildrenProps {
11
+ title?: string;
12
+ description?: string;
13
+ }
14
+
15
+ export const Section = forwardRef<HTMLElement, SectionProps>(
16
+ ({ className, title, description, children, ...props }, ref) => {
17
+ return (
18
+ <section
19
+ ref={ref}
20
+ className={cn('space-y-4', className)}
21
+ {...props}
22
+ >
23
+ {(title || description) && (
24
+ <div className="space-y-1">
25
+ {title && (
26
+ <h2 className="text-2xl font-semibold tracking-tight">{title}</h2>
27
+ )}
28
+ {description && (
29
+ <p className="text-muted-foreground">{description}</p>
30
+ )}
31
+ </div>
32
+ )}
33
+ {children}
34
+ </section>
35
+ );
36
+ }
37
+ );
38
+
39
+ Section.displayName = 'Section';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Templates Export
3
+ * @description Template components - page structures
4
+ * Subpath: @umituz/web-design-system/templates
5
+ */
6
+
7
+ export { Form, FormActions } from './Form';
8
+ export type { FormProps } from './Form';
9
+
10
+ export { List, ListItem } from './List';
11
+ export type { ListProps } from './List';
12
+
13
+ export { Section } from './Section';
14
+ export type { SectionProps } from './Section';