@shohojdhara/atomix 0.3.5 → 0.3.6

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 (173) hide show
  1. package/README.md +101 -199
  2. package/atomix.config.ts +241 -0
  3. package/dist/atomix.css +260 -179
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +250 -179
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/charts.js +61 -66
  8. package/dist/charts.js.map +1 -1
  9. package/dist/core.js +47 -31
  10. package/dist/core.js.map +1 -1
  11. package/dist/forms.js +47 -31
  12. package/dist/forms.js.map +1 -1
  13. package/dist/heavy.js +47 -31
  14. package/dist/heavy.js.map +1 -1
  15. package/dist/index.d.ts +1841 -1633
  16. package/dist/index.esm.js +4975 -4113
  17. package/dist/index.esm.js.map +1 -1
  18. package/dist/index.js +5151 -4290
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.min.js +1 -1
  21. package/dist/index.min.js.map +1 -1
  22. package/dist/theme.d.ts +1572 -1442
  23. package/dist/theme.js +4816 -4080
  24. package/dist/theme.js.map +1 -1
  25. package/package.json +6 -20
  26. package/src/components/Accordion/Accordion.stories.tsx +50 -17
  27. package/src/components/AtomixGlass/AtomixGlass.tsx +65 -31
  28. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +11 -4
  29. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -32
  30. package/src/components/AtomixGlass/stories/Examples.stories.tsx +2 -2
  31. package/src/components/AtomixGlass/stories/shared-components.tsx +0 -31
  32. package/src/components/Avatar/Avatar.stories.tsx +7 -0
  33. package/src/components/Badge/Badge.stories.tsx +91 -13
  34. package/src/components/Block/Block.stories.tsx +7 -23
  35. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +7 -0
  36. package/src/components/Button/Button.stories.tsx +141 -22
  37. package/src/components/Button/ButtonGroup.stories.tsx +315 -0
  38. package/src/components/Button/ButtonGroup.tsx +67 -0
  39. package/src/components/Button/index.ts +2 -0
  40. package/src/components/Callout/Callout.stories.tsx +8 -6
  41. package/src/components/Card/Card.stories.tsx +82 -28
  42. package/src/components/Chart/AnimatedChart.tsx +0 -1
  43. package/src/components/Chart/AreaChart.tsx +0 -1
  44. package/src/components/Chart/BarChart.tsx +0 -1
  45. package/src/components/Chart/BubbleChart.tsx +0 -1
  46. package/src/components/Chart/CandlestickChart.tsx +0 -1
  47. package/src/components/Chart/Chart.stories.tsx +5 -7
  48. package/src/components/Chart/Chart.tsx +0 -16
  49. package/src/components/Chart/ChartRenderer.tsx +1 -1
  50. package/src/components/Chart/DonutChart.tsx +0 -1
  51. package/src/components/Chart/FunnelChart.tsx +0 -1
  52. package/src/components/Chart/GaugeChart.tsx +0 -1
  53. package/src/components/Chart/HeatmapChart.tsx +0 -1
  54. package/src/components/Chart/LineChart.tsx +0 -1
  55. package/src/components/Chart/MultiAxisChart.tsx +0 -1
  56. package/src/components/Chart/PieChart.tsx +0 -1
  57. package/src/components/Chart/RadarChart.tsx +0 -1
  58. package/src/components/Chart/ScatterChart.tsx +0 -1
  59. package/src/components/Chart/WaterfallChart.tsx +0 -1
  60. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +7 -0
  61. package/src/components/DataTable/DataTable.stories.tsx +23 -16
  62. package/src/components/DatePicker/DatePicker.stories.tsx +27 -19
  63. package/src/components/Dropdown/Dropdown.stories.tsx +11 -19
  64. package/src/components/EdgePanel/EdgePanel.stories.tsx +1 -0
  65. package/src/components/Footer/Footer.stories.tsx +8 -6
  66. package/src/components/Footer/FooterLink.tsx +9 -2
  67. package/src/components/Form/Checkbox.stories.tsx +7 -0
  68. package/src/components/Form/Form.stories.tsx +7 -0
  69. package/src/components/Form/FormGroup.stories.tsx +9 -1
  70. package/src/components/Form/Input.stories.tsx +69 -16
  71. package/src/components/Form/Radio.stories.tsx +9 -1
  72. package/src/components/Form/Select.stories.tsx +9 -1
  73. package/src/components/Form/Textarea.stories.tsx +10 -2
  74. package/src/components/Hero/Hero.stories.tsx +7 -0
  75. package/src/components/List/List.stories.tsx +7 -0
  76. package/src/components/Messages/Messages.stories.tsx +8 -7
  77. package/src/components/Modal/Modal.stories.tsx +17 -6
  78. package/src/components/Navigation/Menu/Menu.stories.tsx +7 -0
  79. package/src/components/Navigation/Nav/Nav.stories.tsx +7 -0
  80. package/src/components/Navigation/Navbar/Navbar.stories.tsx +1 -0
  81. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +1 -1
  82. package/src/components/Pagination/Pagination.stories.tsx +188 -111
  83. package/src/components/Pagination/Pagination.tsx +83 -3
  84. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -5
  85. package/src/components/Popover/Popover.stories.tsx +191 -115
  86. package/src/components/ProductReview/ProductReview.stories.tsx +80 -58
  87. package/src/components/Progress/Progress.stories.tsx +79 -49
  88. package/src/components/Rating/Rating.stories.tsx +109 -84
  89. package/src/components/River/River.stories.tsx +194 -114
  90. package/src/components/SectionIntro/SectionIntro.stories.tsx +19 -9
  91. package/src/components/Slider/Slider.stories.tsx +7 -0
  92. package/src/components/Spinner/Spinner.stories.tsx +15 -11
  93. package/src/components/Steps/Steps.stories.tsx +132 -98
  94. package/src/components/Tabs/Tabs.stories.tsx +163 -112
  95. package/src/components/Testimonial/Testimonial.stories.tsx +114 -68
  96. package/src/components/Todo/Todo.stories.tsx +38 -12
  97. package/src/components/Toggle/Toggle.stories.tsx +61 -28
  98. package/src/components/Tooltip/Tooltip.stories.tsx +318 -200
  99. package/src/components/Upload/Upload.stories.tsx +122 -84
  100. package/src/components/VideoPlayer/VideoPlayer.stories.tsx +7 -24
  101. package/src/components/index.ts +1 -0
  102. package/src/lib/composables/useAtomixGlass.ts +2 -3
  103. package/src/lib/composables/useNavbar.ts +0 -10
  104. package/src/lib/config/loader.ts +2 -1
  105. package/src/lib/constants/components.ts +10 -0
  106. package/src/lib/hooks/useComponentCustomization.ts +1 -1
  107. package/src/lib/theme/README.md +174 -0
  108. package/src/lib/theme/adapters/index.ts +31 -0
  109. package/src/lib/theme/adapters/themeAdapter.ts +287 -0
  110. package/src/lib/theme/config/__tests__/configLoader.test.ts +207 -0
  111. package/src/lib/theme/config/configLoader.ts +254 -0
  112. package/src/lib/theme/config/loader.ts +37 -48
  113. package/src/lib/theme/config/types.ts +2 -2
  114. package/src/lib/theme/config/validator.ts +15 -91
  115. package/src/lib/theme/{constants.ts → constants/constants.ts} +0 -18
  116. package/src/lib/theme/constants/index.ts +8 -0
  117. package/src/lib/theme/core/ThemeRegistry.ts +19 -6
  118. package/src/lib/theme/core/__tests__/createTheme.test.ts +132 -0
  119. package/src/lib/theme/core/composeTheme.ts +155 -0
  120. package/src/lib/theme/core/createTheme.ts +94 -0
  121. package/src/lib/theme/{createTheme.ts → core/createThemeObject.ts} +10 -6
  122. package/src/lib/theme/core/index.ts +5 -19
  123. package/src/lib/theme/devtools/Comparator.tsx +346 -22
  124. package/src/lib/theme/devtools/IMPROVEMENTS.md +139 -38
  125. package/src/lib/theme/devtools/Inspector.tsx +335 -51
  126. package/src/lib/theme/devtools/LiveEditor.tsx +478 -107
  127. package/src/lib/theme/devtools/Preview.tsx +471 -221
  128. package/src/lib/theme/{core → devtools}/ThemeValidator.ts +1 -1
  129. package/src/lib/theme/devtools/index.ts +14 -4
  130. package/src/lib/theme/devtools/useHistory.ts +130 -0
  131. package/src/lib/theme/errors/index.ts +12 -0
  132. package/src/lib/theme/generators/cssFile.ts +79 -0
  133. package/src/lib/theme/generators/generateCSS.ts +89 -0
  134. package/src/lib/theme/{generateCSSVariables.ts → generators/generateCSSVariables.ts} +3 -13
  135. package/src/lib/theme/generators/index.ts +19 -0
  136. package/src/lib/theme/i18n/rtl.ts +5 -6
  137. package/src/lib/theme/index.ts +120 -15
  138. package/src/lib/theme/runtime/ThemeApplicator.ts +52 -111
  139. package/src/lib/theme/{ThemeContext.tsx → runtime/ThemeContext.tsx} +1 -1
  140. package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +1 -1
  141. package/src/lib/theme/runtime/ThemeProvider.tsx +456 -179
  142. package/src/lib/theme/runtime/index.ts +1 -2
  143. package/src/lib/theme/runtime/useTheme.ts +1 -2
  144. package/src/lib/theme/test/testTheme.ts +385 -0
  145. package/src/lib/theme/tokens/index.ts +12 -0
  146. package/src/lib/theme/tokens/tokens.ts +721 -0
  147. package/src/lib/theme/types.ts +6 -42
  148. package/src/lib/theme/{utils.ts → utils/domUtils.ts} +2 -2
  149. package/src/lib/theme/utils/index.ts +11 -0
  150. package/src/lib/theme/utils/injectCSS.ts +90 -0
  151. package/src/lib/theme/utils/themeHelpers.ts +78 -0
  152. package/src/lib/theme/{themeUtils.ts → utils/themeUtils.ts} +1 -1
  153. package/src/lib/theme-tools.ts +7 -8
  154. package/src/lib/types/components.ts +40 -130
  155. package/src/lib/utils/componentUtils.ts +1 -1
  156. package/src/styles/01-settings/_settings.design-tokens.scss +4 -1
  157. package/src/styles/02-tools/_tools.button.scss +66 -79
  158. package/src/styles/06-components/_components.atomix-glass.scss +13 -3
  159. package/src/styles/06-components/_components.pagination.scss +88 -0
  160. package/scripts/sync-theme-config.js +0 -309
  161. package/src/lib/theme/composeTheme.ts +0 -370
  162. package/src/lib/theme/core/ThemeCache.ts +0 -283
  163. package/src/lib/theme/core/ThemeEngine.test.ts +0 -146
  164. package/src/lib/theme/core/ThemeEngine.ts +0 -665
  165. package/src/lib/theme/createThemeFromConfig.ts +0 -132
  166. package/src/lib/theme/devtools/CLI.ts +0 -364
  167. package/src/lib/theme/runtime/ThemeManager.test.ts +0 -192
  168. package/src/lib/theme/runtime/ThemeManager.ts +0 -446
  169. package/src/styles/03-generic/_generated-root.css +0 -26
  170. package/src/themes/README.md +0 -442
  171. package/src/themes/themes.config.js +0 -68
  172. /package/src/lib/theme/{cssVariableMapper.ts → adapters/cssVariableMapper.ts} +0 -0
  173. /package/src/lib/theme/{errors.ts → errors/errors.ts} +0 -0
package/README.md CHANGED
@@ -1,250 +1,152 @@
1
1
  # Atomix Design System
2
2
 
3
- > A modern, accessible design system and component library for building beautiful user interfaces.
4
-
5
- [![npm version](https://img.shields.io/npm/v/@shohojdhara/atomix)](https://www.npmjs.com/package/@shohojdhara/atomix)
6
- [![License](https://img.shields.io/npm/l/@shohojdhara/atomix)](https://github.com/Shohojdhara/atomix/blob/main/LICENSE)
7
- [![Downloads](https://img.shields.io/npm/dm/@shohojdhara/atomix)](https://www.npmjs.com/package/@shohojdhara/atomix)
8
-
9
- ## Overview
10
-
11
- Atomix is a modern, accessible design system and component library for building beautiful user interfaces. It provides a comprehensive set of 40+ production-ready components with consistent design language, accessibility compliance, and performance optimization.
12
-
13
- ### Key Features
14
-
15
- - **40+ Production-Ready Components**: Buttons, cards, forms, navigation, and more
16
- - **Design System Compliance**: Consistent design language with design tokens
17
- - **Accessibility First**: WCAG 2.1 AA compliant components
18
- - **TypeScript Support**: Full TypeScript definitions for all components
19
- - **Responsive Design**: Mobile-first responsive components
20
- - **Dark Mode Support**: Built-in dark mode support for all components
21
- - **Tree-Shaking Support**: Optimized for modern bundlers
22
- - **Multiple Themes**: Multiple built-in themes with easy customization
23
- - **React & Vanilla JavaScript**: Support for both React and vanilla JavaScript
3
+ > A modern, extensible design system for building scalable web applications
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@shohojdhara/atomix.svg)](https://www.npmjs.com/package/@shohojdhara/atomix)
6
+ [![License](https://img.shields.io/npm/l/@shohojdhara/atomix.svg)](LICENSE)
7
+ [![Downloads](https://img.shields.io/npm/dm/@shohojdhara/atomix.svg)](https://www.npmjs.com/package/@shohojdhara/atomix)
8
+
9
+ ## Table of Contents
10
+
11
+ - [Features](#features)
12
+ - [Installation](#installation)
13
+ - [Usage](#usage)
14
+ - [Basic Usage](#basic-usage)
15
+ - [Theming](#theming)
16
+ - [React Integration](#react-integration)
17
+ - [Components](#components)
18
+ - [API](#api)
19
+ - [Contributing](#contributing)
20
+ - [License](#license)
21
+
22
+ ## Features
23
+
24
+ - 🚀 **Fast & Lightweight** - Tree-shaking ready with minimal bundle impact
25
+ - 🎨 **Themeable** - Advanced theme system with CSS variable support
26
+ - ♿ **Accessible** - Built with WCAG accessibility standards in mind
27
+ - 📱 **Responsive** - Mobile-first responsive design
28
+ - 🔧 **Customizable** - Easy to customize and extend
29
+ - 🧩 **Modular** - Pick only the components you need
30
+ - 🔒 **TypeScript** - Full TypeScript support with definitions
31
+ - 🛠 **Framework Agnostic** - Works with React, Vue, vanilla JS, etc.
24
32
 
25
33
  ## Installation
26
34
 
27
35
  ```bash
28
36
  npm install @shohojdhara/atomix
37
+ # or
38
+ yarn add @shohojdhara/atomix
39
+ # or
40
+ pnpm add @shohojdhara/atomix
29
41
  ```
30
42
 
31
43
  ## Usage
32
44
 
33
- ### React
45
+ ### Basic Usage
34
46
 
35
- import { Button } from '@shohojdhara/atomix';
36
- import '@shohojdhara/atomix/css';
47
+ ```tsx
48
+ import { Button } from '@shohojdhara/atomix/components';
49
+ import '@shohojdhara/atomix/styles/index.css';
37
50
 
38
51
  function App() {
39
- return <Button variant="primary">Hello World</Button>;
52
+ return (
53
+ <Button variant="primary" onClick={() => console.log('Hello Atomix!')}>
54
+ Click me
55
+ </Button>
56
+ );
40
57
  }
41
58
  ```
42
59
 
43
- ### 🎨 Theme Management
44
-
45
- Atomix provides a powerful, developer-friendly theming system with **Tailwind-like configuration**:
46
-
47
- #### Tailwind-like Configuration (Recommended)
60
+ ### Theming
48
61
 
49
- Create `atomix.config.ts` in your project root:
62
+ Atomix provides a flexible theme system that supports both CSS and JavaScript themes:
50
63
 
51
- ```typescript
52
- import { defineConfig } from '@shohojdhara/atomix/config';
64
+ ```tsx
65
+ import { ThemeProvider, createTheme } from '@shohojdhara/atomix/theme';
53
66
 
54
- export default defineConfig({
55
- theme: {
56
- extend: {
57
- colors: {
58
- primary: { main: '#7AFFD7' },
59
- secondary: { main: '#FF5733' },
60
- },
67
+ // Create a custom theme
68
+ const customTheme = createTheme({
69
+ palette: {
70
+ primary: { main: '#7AFFD7' },
71
+ secondary: { main: '#FF5733' },
72
+ },
73
+ spacing: 8,
74
+ breakpoints: {
75
+ values: {
76
+ xs: 0,
77
+ sm: 600,
78
+ md: 960,
79
+ lg: 1280,
80
+ xl: 1920,
61
81
  },
62
82
  },
63
83
  });
64
- ```
65
-
66
- Use it in your app:
67
-
68
- ```tsx
69
- import { loadAtomixConfig } from '@shohojdhara/atomix/config';
70
- import { createThemeFromConfig, ThemeProvider } from '@shohojdhara/atomix/theme';
71
-
72
- const config = loadAtomixConfig();
73
- const theme = createThemeFromConfig(config);
74
84
 
75
85
  function App() {
76
86
  return (
77
- <ThemeProvider defaultTheme={theme}>
87
+ <ThemeProvider
88
+ themes={{
89
+ 'custom-theme': { name: 'Custom Theme', class: 'custom-theme' }
90
+ }}
91
+ defaultTheme="custom-theme"
92
+ >
78
93
  <YourApp />
79
94
  </ThemeProvider>
80
95
  );
81
96
  }
82
97
  ```
83
98
 
84
- #### Quick Start with Themes
99
+ ### React Integration
85
100
 
86
- ```jsx
87
- import { ThemeProvider, useTheme } from '@shohojdhara/atomix/theme';
101
+ For React applications, we provide a complete set of hooks and context providers:
88
102
 
89
- function App() {
103
+ ```tsx
104
+ import { useTheme } from '@shohojdhara/atomix/theme';
105
+
106
+ function MyComponent() {
107
+ const { theme, setTheme, availableThemes } = useTheme();
108
+
90
109
  return (
91
- <ThemeProvider>
92
- <YourApp />
93
- </ThemeProvider>
110
+ <div>
111
+ <p>Current theme: {theme}</p>
112
+ <select
113
+ value={theme}
114
+ onChange={(e) => setTheme(e.target.value)}
115
+ >
116
+ {availableThemes.map(t => (
117
+ <option key={t.class} value={t.class}>
118
+ {t.name}
119
+ </option>
120
+ ))}
121
+ </select>
122
+ </div>
94
123
  );
95
124
  }
96
125
  ```
97
126
 
98
- #### Programmatic Theme Creation
99
-
100
- ```jsx
101
- import { createTheme, ThemeProvider } from '@shohojdhara/atomix/theme';
102
-
103
- const myTheme = createTheme({
104
- palette: {
105
- primary: { main: '#7AFFD7' },
106
- },
107
- });
108
-
109
- <ThemeProvider defaultTheme={myTheme}>
110
- <App />
111
- </ThemeProvider>
112
- ```
113
-
114
- For complete documentation, see:
115
- - [Getting Started - Theme System](docs/getting-started/theme-system.md) - Quick start guide
116
- - [Theme System Guide](docs/THEME_SYSTEM.md) - Complete reference (includes guides for both external developers and library developers)
117
-
118
-
119
- ## Styles
120
-
121
- Atomix provides comprehensive styling through CSS or SCSS:
122
-
123
- ### CSS
124
-
125
- ```js
126
- // Import the main CSS file
127
- import '@shohojdhara/atomix/css';
128
-
129
- // Or import the minified version
130
- import '@shohojdhara/atomix/css/min';
131
- ```
132
-
133
- ### SCSS
134
-
135
- ```scss
136
- // Import the main SCSS file
137
- @use '~@shohojdhara/atomix/scss' as atomix;
138
-
139
- // Or import individual modules
140
- @use '~@shohojdhara/atomix/scss/settings' as settings;
141
- @use '~@shohojdhara/atomix/scss/tools' as tools;
142
- @use '~@shohojdhara/atomix/scss/components' as components;
143
- ```
144
-
145
- ## Build Process
146
-
147
- The Atomix Design System uses a comprehensive build process to generate optimized assets:
148
-
149
- ### Main Build
150
-
151
- ```bash
152
- npm run build
153
- ```
154
-
155
- This command will:
156
- 1. Build the main JavaScript library (ESM and CJS formats)
157
- 2. Generate TypeScript definitions
158
- 3. Build the main CSS styles (`dist/atomix.css` and `dist/atomix.min.css`)
159
-
160
- ### Individual Builds
161
-
162
- ```bash
163
- # Build only the main styles
164
- npm run build:styles
165
-
166
- # Build only the themes
167
- npm run build:themes
168
-
169
- # Build only the main library
170
- npm run rollup -c
171
- ```
172
-
173
- ### Development
174
-
175
- ```bash
176
- # Start Storybook for component development
177
- npm run dev
178
-
179
- # Run tests
180
- npm test
181
-
182
- # Run tests in watch mode
183
- npm run test:watch
184
-
185
- # Generate test coverage
186
- npm run test:coverage
187
- ```
188
-
189
- ### Storybook styles convention
190
-
191
- To keep visual docs and any snapshots stable, choose one of the following and stick to it:
192
-
193
- - Preferred: load the built CSS from dist.
194
- - In your Storybook preview (e.g., .storybook/preview.ts/preview.js), import the bundled CSS once:
195
- import '@shohojdhara/atomix/css'
196
- - Before taking snapshots or publishing Storybook, ensure styles are compiled:
197
- yarn build:styles
198
-
199
- - Alternative (for live theming/dev): load the source SCSS.
200
- - Import from the SCSS entry point:
201
- import '@shohojdhara/atomix/scss'
202
- - This relies on your builder's SCSS pipeline; avoid mixing SCSS and built CSS in the same Storybook to prevent drift.
203
-
204
- Notes:
205
- - CSS bundles produced by the styles build are deterministic: dist/atomix.css and dist/atomix.min.css.
206
- - CI should run yarn attw to validate package exports and types after changes.
207
-
208
127
  ## Components
209
128
 
210
- Atomix provides 40+ production-ready components organized into categories:
211
-
212
- - **Actions**: [Button](src/components/Button), [Dropdown](src/components/Dropdown), [Pagination](src/components/Pagination)
213
- - **Data Display**: [Badge](src/components/Badge), [Card](src/components/Card), [DataTable](src/components/DataTable)
214
- - **Feedback**: [Callout](src/components/Callout), [Spinner](src/components/Spinner), [Progress](src/components/Progress)
215
- - **Forms**: [Checkbox](src/components/Checkbox), [Input](src/components/Input), [Select](src/components/Select)
216
- - **Navigation**: [Breadcrumb](src/components/Breadcrumb), [Navbar](src/components/Navbar), [Tabs](src/components/Tabs)
217
- - **Surfaces**: [Accordion](src/components/Accordion), [Callout](src/components/Callout), [Modal](src/components/Modal)
218
- - **Utilities**: [ColorModeToggle](src/components/ColorModeToggle), [Icon](src/components/Icon), [AtomixGlass](src/components/AtomixGlass), [AtomixLogo](src/components/AtomixLogo)
219
-
220
- ## Design Tokens
221
-
222
- Atomix uses design tokens for consistent design language:
223
-
224
- - **Colors**: Consistent color palette with light and dark mode variants
225
- - **Spacing**: Consistent spacing scale based on 4px grid
226
- - **Typography**: Consistent typography scale with responsive adjustments
227
- - **Borders**: Consistent border radius and width system
228
- - **Shadows**: Consistent shadow system for depth and elevation
229
-
230
- ## Accessibility
129
+ The library includes over 50+ components including:
231
130
 
232
- All Atomix components are built with accessibility in mind:
131
+ - **Layout**: Grid, Container, Section
132
+ - **Navigation**: Navbar, Breadcrumb, Pagination
133
+ - **Forms**: Input, Button, Select, Checkbox, Radio
134
+ - **Feedback**: Alert, Modal, Tooltip, Toast
135
+ - **Data Display**: Table, Card, Badge, Avatar
136
+ - **Surfaces**: Accordion, Tabs, Expansion Panel
233
137
 
234
- - **WCAG 2.1 AA Compliant**: All components meet WCAG 2.1 AA standards
235
- - **Keyboard Navigation**: Full keyboard navigation support
236
- - **Screen Reader Support**: Proper ARIA attributes and semantic HTML
237
- - **Focus Management**: Consistent focus indicators and management
238
- - **Color Contrast**: Proper color contrast ratios for readability
138
+ For a complete list, see [components documentation](./src/components/).
239
139
 
240
- ## Browser Support
140
+ ## API
241
141
 
242
- Atomix supports all modern browsers:
142
+ - [Components API](./docs/COMPONENTS_API.md)
143
+ - [Theme API](./docs/THEME_API.md)
144
+ - [Configuration](./docs/CONFIGURATION.md)
243
145
 
244
146
  ## Contributing
245
147
 
246
- Contributions are welcome! Please read our [contributing guidelines](CONTRIBUTING.md) for details on our code of conduct and development process.
148
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.
247
149
 
248
150
  ## License
249
151
 
250
- Apache 2.0 © [Shohojdhara](https://github.com/Shohojdhara)
152
+ MIT © [Shohojdhara](https://github.com/shohojdhara)
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Atomix Configuration
3
+ *
4
+ * This file is for external developers to customize the Atomix Design System.
5
+ *
6
+ * External developers can create this file in their project root to customize
7
+ * design tokens, colors, spacing, typography, and more. The theme system will
8
+ * automatically load this configuration when using `createTheme()`.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * // atomix.config.ts (in your project)
13
+ * import { defineConfig } from '@shohojdhara/atomix/config';
14
+ *
15
+ * export default defineConfig({
16
+ * prefix: 'myapp',
17
+ * theme: {
18
+ * extend: {
19
+ * colors: {
20
+ * primary: { main: '#7AFFD7' },
21
+ * },
22
+ * },
23
+ * },
24
+ * });
25
+ * ```
26
+ *
27
+ * @example
28
+ * ```typescript
29
+ * // In your application code
30
+ * import { createTheme, injectTheme } from '@shohojdhara/atomix/theme';
31
+ *
32
+ * // Automatically loads from atomix.config.ts
33
+ * const css = createTheme();
34
+ * injectTheme(css);
35
+ * ```
36
+ *
37
+ * @see https://atomix.design/docs/configuration for full documentation
38
+ */
39
+
40
+ // For library development, use local import
41
+ // For external developers, use: import { defineConfig } from '@shohojdhara/atomix/config';
42
+ import { defineConfig } from './src/lib/config';
43
+
44
+ export default defineConfig({
45
+ /**
46
+ * CSS Variable Prefix
47
+ *
48
+ * Change this to customize all CSS variable names.
49
+ * Example: prefix: 'myapp' → --myapp-primary instead of --atomix-primary
50
+ *
51
+ * This prefix is automatically used by createTheme() when loading from config.
52
+ */
53
+ prefix: 'atomix',
54
+
55
+ /**
56
+ * Theme Customization
57
+ *
58
+ * Tailwind-like configuration for customizing design tokens.
59
+ * Use `extend` to override or extend base tokens (recommended).
60
+ * Use `tokens` to completely replace the token system (advanced).
61
+ */
62
+ theme: {
63
+ /**
64
+ * Extend Default Design Tokens
65
+ *
66
+ * These values will override or extend the base Atomix tokens.
67
+ * This is the recommended approach for customization.
68
+ */
69
+ extend: {
70
+ /**
71
+ * Color Customization
72
+ *
73
+ * You can customize colors in multiple ways:
74
+ *
75
+ * 1. Simple main color:
76
+ * primary: { main: '#7AFFD7' }
77
+ *
78
+ * 2. With light/dark variants:
79
+ * primary: { main: '#7AFFD7', light: '#B3FFE8', dark: '#4DFFC4' }
80
+ *
81
+ * 3. Full color scale (1-10):
82
+ * primary: { 1: '#f0f9ff', 2: '#dbeafe', ..., 10: '#1e3a8a' }
83
+ *
84
+ * 4. Main color (maps to step 6):
85
+ * primary: { main: '#3b82f6', 6: '#3b82f6' }
86
+ */
87
+ colors: {
88
+ primary: {
89
+ main: '#3b82f6', // Your brand primary color
90
+ // Optional: provide full color scale (1-10)
91
+ // 1: '#f0f9ff', // lightest
92
+ // 2: '#dbeafe',
93
+ // 3: '#bfdbfe',
94
+ // 4: '#93c5fd',
95
+ // 5: '#60a5fa',
96
+ // 6: '#3b82f6', // main (default)
97
+ // 7: '#2563eb',
98
+ // 8: '#1d4ed8',
99
+ // 9: '#1e40af',
100
+ // 10: '#1e3a8a', // darkest
101
+ },
102
+ // Customize other semantic colors
103
+ // secondary: { main: '#10b981' },
104
+ // success: { main: '#22c55e' },
105
+ // error: { main: '#ef4444' },
106
+ // warning: { main: '#eab308' },
107
+ // info: { main: '#3b82f6' },
108
+ },
109
+
110
+ /**
111
+ * Spacing Scale
112
+ *
113
+ * Customize spacing values used throughout the design system.
114
+ * These map to tokens like 'spacing-4', 'spacing-8', etc.
115
+ */
116
+ // spacing: {
117
+ // '1': '0.25rem', // 4px
118
+ // '2': '0.5rem', // 8px
119
+ // '3': '0.75rem', // 12px
120
+ // '4': '1rem', // 16px
121
+ // '5': '1.25rem', // 20px
122
+ // '6': '1.5rem', // 24px
123
+ // '8': '2rem', // 32px
124
+ // '10': '2.5rem', // 40px
125
+ // '12': '3rem', // 48px
126
+ // '16': '4rem', // 64px
127
+ // '20': '5rem', // 80px
128
+ // },
129
+
130
+ /**
131
+ * Typography Customization
132
+ *
133
+ * Customize fonts, sizes, weights, and line heights.
134
+ */
135
+ // typography: {
136
+ // // Font families
137
+ // fontFamilies: {
138
+ // sans: ['Inter', 'system-ui', 'sans-serif'],
139
+ // serif: ['Georgia', 'serif'],
140
+ // mono: ['Fira Code', 'monospace'],
141
+ // },
142
+ // // Font sizes
143
+ // fontSizes: {
144
+ // 'xs': '0.75rem', // 12px
145
+ // 'sm': '0.875rem', // 14px
146
+ // 'base': '1rem', // 16px
147
+ // 'lg': '1.125rem', // 18px
148
+ // 'xl': '1.25rem', // 20px
149
+ // '2xl': '1.5rem', // 24px
150
+ // '3xl': '1.875rem', // 30px
151
+ // '4xl': '2.25rem', // 36px
152
+ // },
153
+ // // Font weights
154
+ // fontWeights: {
155
+ // 'light': 300,
156
+ // 'normal': 400,
157
+ // 'medium': 500,
158
+ // 'semibold': 600,
159
+ // 'bold': 700,
160
+ // },
161
+ // // Line heights
162
+ // lineHeights: {
163
+ // 'tight': 1.2,
164
+ // 'normal': 1.5,
165
+ // 'relaxed': 1.75,
166
+ // },
167
+ // },
168
+
169
+ /**
170
+ * Border Radius
171
+ *
172
+ * Customize border radius values.
173
+ */
174
+ // borderRadius: {
175
+ // 'sm': '0.25rem', // 4px
176
+ // 'md': '0.5rem', // 8px (default)
177
+ // 'lg': '0.75rem', // 12px
178
+ // 'xl': '1rem', // 16px
179
+ // 'full': '9999px', // Fully rounded
180
+ // },
181
+
182
+ /**
183
+ * Shadows
184
+ *
185
+ * Customize box shadow values.
186
+ */
187
+ // shadows: {
188
+ // 'sm': '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
189
+ // 'md': '0 4px 6px -1px rgba(0, 0, 0, 0.1)',
190
+ // 'lg': '0 10px 15px -3px rgba(0, 0, 0, 0.1)',
191
+ // 'xl': '0 20px 25px -5px rgba(0, 0, 0, 0.1)',
192
+ // },
193
+
194
+ /**
195
+ * Z-Index Scale
196
+ *
197
+ * Customize z-index values for layering.
198
+ */
199
+ // zIndex: {
200
+ // 'base': 0,
201
+ // 'dropdown': 1000,
202
+ // 'sticky': 1020,
203
+ // 'fixed': 1030,
204
+ // 'modal-backdrop': 1040,
205
+ // 'modal': 1050,
206
+ // 'popover': 1060,
207
+ // 'tooltip': 1070,
208
+ // },
209
+
210
+ /**
211
+ * Transitions
212
+ *
213
+ * Customize transition durations and easings.
214
+ */
215
+ // transitions: {
216
+ // durations: {
217
+ // 'fast': '150ms',
218
+ // 'base': '200ms',
219
+ // 'slow': '300ms',
220
+ // },
221
+ // easings: {
222
+ // 'ease-in': 'cubic-bezier(0.4, 0, 1, 1)',
223
+ // 'ease-out': 'cubic-bezier(0, 0, 0.2, 1)',
224
+ // 'ease-in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',
225
+ // },
226
+ // },
227
+ },
228
+
229
+ /**
230
+ * Complete Token Override (Advanced)
231
+ *
232
+ * Use with caution - this replaces the entire token system.
233
+ * Most users should use `extend` instead.
234
+ */
235
+ // tokens: {
236
+ // colors: { /* your full color system */ },
237
+ // spacing: { /* your full spacing scale */ },
238
+ // // ... other token categories
239
+ // },
240
+ },
241
+ });