You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@creativecodeco/ui` is the official Design System for **CreativeCode.com.co**. It provides a set of reusable, accessible, and highly customizable UI components built with modern web technologies.
The project follows an organized, modular structure designed for scalability and ease of maintenance:
18
+
19
+
### Directory Overview
20
+
-**`src/ui/components/`**: Atomic UI components like `Button`, `Avatar`, `Badge`, and `Accordion`. These are designed to be "dumb" components focused on presentation.
21
+
-**`src/ui/forms/`**: specialized components for form handling, such as `Textbox`, `Checkbox`, `Radio`, and `Dropdown`.
22
+
-**`src/ui/provider/`**: Contains the `CreativeCodeUIProvider`, which manages the application's theme (via `data-theme`) and provides necessary context for components.
23
+
-**`src/theme/`**: The heart of the design system's styling. It uses Tailwind CSS v4's CSS-first approach. `main.css` is the entry point that imports component-specific styles and Tailwind/DaisyUI plugins.
24
+
-**`src/hooks/`**: Custom React hooks shared across the library and available to consumers.
25
+
-**`src/helpers/` & `src/utils/`**: Utility functions for internal logic (e.g., class merging, URL validation).
26
+
-**`src/types/`**: Global TypeScript definitions.
27
+
28
+
### Component Pattern
29
+
Each component typically resides in its own directory with:
30
+
-`[Component].tsx`: The implementation.
31
+
-`[Component].stories.tsx`: Storybook definitions for documentation and testing.
32
+
-`[Component].spec.tsx`: Unit tests (if applicable).
33
+
-`index.ts`: Public export for that component.
34
+
35
+
## Styling System
36
+
The project has migrated to **Tailwind CSS v4**.
37
+
-**CSS-first**: Configuration is handled in `.css` files using `@theme` and `@plugin`.
38
+
-**DaisyUI Integration**: Base styles and themes are derived from DaisyUI and extended with CreativeCode's brand identity.
39
+
-**Theme Switching**: Controlled via the `CreativeCodeUIProvider` which applies `data-theme="creativecode"` to the `html` element.
40
+
41
+
## Development Workflow
42
+
1.**Component Creation**: Develop one component at a time using Storybook (`npm run dev`).
43
+
2.**Visual Verification**: Every PR triggers a Chromatic build to ensure no visual regressions occur.
44
+
3.**Building**: The library is built into the `lib/` directory using TypeScript (`npm run build`), producing ESM-compatible code.
45
+
4.**Publishing**: Managed via `npm version` and `npm publish`.
46
+
47
+
## Design Principles
48
+
-**Accessibility (A11y)**: Components should use semantic HTML and support ARIA attributes.
49
+
-**Responsiveness**: Use Tailwind's utility classes for a mobile-first approach.
50
+
-**Consistency**: All components must adhere to the defined theme tokens (colors, spacing, typography).
0 commit comments