@shohojdhara/atomix 0.1.23-rc.0 → 0.1.24

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 (86) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/NPM_PUBLISHING.md +221 -0
  3. package/README.md +46 -156
  4. package/dist/css/atomix.css +1 -1
  5. package/dist/types/components/Breadcrumb/index.d.ts +2 -3
  6. package/dist/types/components/River/index.d.ts +1 -1
  7. package/dist/types/components/Tab/index.d.ts +2 -2
  8. package/dist/types/components/Toggle/index.d.ts +2 -2
  9. package/dist/types/components/Tooltip/index.d.ts +2 -3
  10. package/dist/types/index.d.ts +9 -9
  11. package/index.d.ts +3 -0
  12. package/package.json +38 -173
  13. package/src/styles/01-settings/_settings.animations.scss +7 -2
  14. package/src/styles/01-settings/_settings.box-shadow.scss +9 -5
  15. package/src/styles/01-settings/_settings.button.scss +5 -0
  16. package/src/styles/01-settings/_settings.card.scss +2 -1
  17. package/src/styles/01-settings/_settings.form.scss +3 -0
  18. package/src/styles/01-settings/_settings.navbar.scss +1 -0
  19. package/src/styles/01-settings/_settings.typography.scss +2 -2
  20. package/src/styles/01-settings/_settings.z-layers.scss +19 -1
  21. package/CONTRIBUTING.md +0 -151
  22. package/NEXTJS_INTEGRATION.md +0 -389
  23. package/babel.config.js +0 -58
  24. package/dist/types/layouts/Grid/Container.d.ts +0 -38
  25. package/dist/types/layouts/Grid/Grid.d.ts +0 -37
  26. package/dist/types/layouts/Grid/GridCol.d.ts +0 -64
  27. package/dist/types/layouts/Grid/Row.d.ts +0 -38
  28. package/dist/types/layouts/Grid/index.d.ts +0 -8
  29. package/dist/types/layouts/MasonryGrid/MasonryGrid.d.ts +0 -71
  30. package/dist/types/layouts/MasonryGrid/MasonryGridItem.d.ts +0 -24
  31. package/dist/types/layouts/MasonryGrid/index.d.ts +0 -4
  32. package/dist/types/layouts/index.d.ts +0 -2
  33. package/dist/types/lib/composables/index.d.ts +0 -30
  34. package/dist/types/lib/composables/useAccordion.d.ts +0 -30
  35. package/dist/types/lib/composables/useBadge.d.ts +0 -10
  36. package/dist/types/lib/composables/useBreadcrumb.d.ts +0 -13
  37. package/dist/types/lib/composables/useButton.d.ts +0 -11
  38. package/dist/types/lib/composables/useCallout.d.ts +0 -11
  39. package/dist/types/lib/composables/useCard.d.ts +0 -8
  40. package/dist/types/lib/composables/useCheckbox.d.ts +0 -11
  41. package/dist/types/lib/composables/useDataTable.d.ts +0 -66
  42. package/dist/types/lib/composables/useDatePicker.d.ts +0 -91
  43. package/dist/types/lib/composables/useDropdown.d.ts +0 -26
  44. package/dist/types/lib/composables/useEdgePanel.d.ts +0 -15
  45. package/dist/types/lib/composables/useForm.d.ts +0 -12
  46. package/dist/types/lib/composables/useFormGroup.d.ts +0 -10
  47. package/dist/types/lib/composables/useHero.d.ts +0 -53
  48. package/dist/types/lib/composables/useInput.d.ts +0 -12
  49. package/dist/types/lib/composables/useMessages.d.ts +0 -38
  50. package/dist/types/lib/composables/useModal.d.ts +0 -40
  51. package/dist/types/lib/composables/useNavbar.d.ts +0 -59
  52. package/dist/types/lib/composables/usePagination.d.ts +0 -13
  53. package/dist/types/lib/composables/usePhotoViewer.d.ts +0 -57
  54. package/dist/types/lib/composables/usePopover.d.ts +0 -30
  55. package/dist/types/lib/composables/useProgress.d.ts +0 -38
  56. package/dist/types/lib/composables/useRadio.d.ts +0 -10
  57. package/dist/types/lib/composables/useRating.d.ts +0 -52
  58. package/dist/types/lib/composables/useRiver.d.ts +0 -107
  59. package/dist/types/lib/composables/useSelect.d.ts +0 -10
  60. package/dist/types/lib/composables/useSideMenu.d.ts +0 -28
  61. package/dist/types/lib/composables/useSpinner.d.ts +0 -10
  62. package/dist/types/lib/composables/useTextarea.d.ts +0 -10
  63. package/dist/types/lib/composables/useTodo.d.ts +0 -18
  64. package/dist/types/lib/constants/components.d.ts +0 -993
  65. package/dist/types/lib/constants/index.d.ts +0 -1
  66. package/dist/types/lib/index.d.ts +0 -13
  67. package/dist/types/lib/types/components.d.ts +0 -2050
  68. package/dist/types/lib/types/index.d.ts +0 -1
  69. package/dist/types/lib/utils/dom.d.ts +0 -26
  70. package/dist/types/lib/utils/icons.d.ts +0 -20
  71. package/dist/types/lib/utils/index.d.ts +0 -3
  72. package/dist/types/lib/utils/useForkRef.d.ts +0 -10
  73. package/examples/css-integration/README.md +0 -177
  74. package/examples/css-integration/basic-css-import.tsx +0 -34
  75. package/examples/css-integration/css-modules-example.module.css +0 -170
  76. package/examples/css-integration/css-modules-example.tsx +0 -95
  77. package/examples/nextjs/next.config.js +0 -131
  78. package/examples/nextjs-example.tsx +0 -271
  79. package/examples/usage/import-examples.js +0 -111
  80. package/examples/vite/vite.config.js +0 -106
  81. package/examples/webpack/webpack.config.js +0 -157
  82. package/implementation-guide.md +0 -505
  83. package/next.config.js +0 -90
  84. package/postcss.config.js +0 -28
  85. package/tsconfig.json +0 -74
  86. package/webpack.config.js +0 -513
package/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.18] - 2025-07-03
11
+
12
+ ## [0.1.16] - 2025-07-02
13
+
10
14
  ### Added
11
15
  - Initial release of Atomix Design System
12
16
  - Core components library with React and vanilla JavaScript support
@@ -0,0 +1,221 @@
1
+ # Atomix NPM Package
2
+
3
+ This document provides information about the Atomix NPM package structure and how to use the source files and configuration files included in the package.
4
+
5
+ ## Package Structure
6
+
7
+ The Atomix package includes the following directories and files:
8
+
9
+ - `dist/` - Compiled and minified distribution files
10
+ - `css/` - CSS stylesheets
11
+ - `js/` - JavaScript bundles (UMD, CommonJS, ESM)
12
+ - `types/` - TypeScript declaration files
13
+ - `src/` - Source code files
14
+ - `components/` - React component source files
15
+ - `lib/` - Utility functions and helpers
16
+ - `styles/` - SCSS source files
17
+ - Configuration files
18
+ - `tsconfig.json` - TypeScript configuration
19
+ - `webpack.config.js` - Webpack configuration
20
+ - `babel.config.js` - Babel configuration
21
+ - `postcss.config.js` - PostCSS configuration
22
+ - Documentation files
23
+ - `README.md` - Main documentation
24
+ - `CHANGELOG.md` - Version history
25
+ - `LICENSE` - License information
26
+
27
+ ## Using the Distribution Files
28
+
29
+ For most use cases, you should use the pre-built distribution files in the `dist/` directory:
30
+
31
+ ```js
32
+ // Using ES modules
33
+ import { Button } from '@shohojdhara/atomix';
34
+
35
+ // Using CommonJS modules
36
+ const { Button } = require('@shohojdhara/atomix');
37
+
38
+ // Import styles
39
+ import '@shohojdhara/atomix/css';
40
+
41
+ // Using React-specific components
42
+ import AtomixReact from '@shohojdhara/atomix/react';
43
+ ```
44
+
45
+ ### TypeScript Support
46
+
47
+ The package includes TypeScript declarations for all components and utilities:
48
+
49
+ ```typescript
50
+ // Import with full TypeScript support
51
+ import { Button, Card, useColorMode } from '@shohojdhara/atomix';
52
+
53
+ // Component props are fully typed
54
+ const MyButton: React.FC = () => (
55
+ <Button
56
+ variant="primary"
57
+ size="md"
58
+ onClick={() => console.log('Clicked!')}
59
+ >
60
+ Click Me
61
+ </Button>
62
+ );
63
+ ```
64
+
65
+ ## Using Source Files
66
+
67
+ If you need to customize the components or build process, you can use the source files directly:
68
+
69
+ ### Components
70
+
71
+ ```js
72
+ // Import a component directly from source
73
+ import Button from '@shohojdhara/atomix/src/components/Button';
74
+ ```
75
+
76
+ ### Styles
77
+
78
+ ```scss
79
+ // Import all styles
80
+ @import '@shohojdhara/atomix/src/styles/index.scss';
81
+
82
+ // Or import specific component styles
83
+ @import '@shohojdhara/atomix/src/components/Button/Button.scss';
84
+ ```
85
+
86
+ ## Using Configuration Files
87
+
88
+ You can extend or reference the included configuration files in your own project:
89
+
90
+ ### TypeScript Configuration
91
+
92
+ ```json
93
+ // In your tsconfig.json
94
+ {
95
+ "extends": "@shohojdhara/atomix/tsconfig.json",
96
+ "compilerOptions": {
97
+ // Your custom options
98
+ }
99
+ }
100
+ ```
101
+
102
+ ### Webpack Configuration
103
+
104
+ ```js
105
+ // In your webpack.config.js
106
+ const atomixWebpackConfig = require('@shohojdhara/atomix/webpack.config.js');
107
+ const { merge } = require('webpack-merge');
108
+
109
+ module.exports = merge(atomixWebpackConfig, {
110
+ // Your custom webpack configuration
111
+ });
112
+ ```
113
+
114
+ ### Babel Configuration
115
+
116
+ ```js
117
+ // In your babel.config.js
118
+ module.exports = {
119
+ presets: [
120
+ ['@shohojdhara/atomix/babel.config.js'],
121
+ // Your custom presets
122
+ ],
123
+ // Your custom plugins
124
+ };
125
+ ```
126
+
127
+ ## Building from Source
128
+
129
+ If you want to build the package from source:
130
+
131
+ ```bash
132
+ # Clone the repository
133
+ git clone https://github.com/liimonx/atomix.git
134
+ cd atomix
135
+
136
+ # Install dependencies
137
+ npm install
138
+
139
+ # Build all components
140
+ npm run build
141
+ ```
142
+
143
+ ## Developer Experience Improvements
144
+
145
+ ### Dynamic Version Handling
146
+
147
+ The package now supports dynamic version handling through environment variables:
148
+
149
+ ```bash
150
+ # Build with a specific version
151
+ VERSION=0.1.1 npm run build
152
+ ```
153
+
154
+ This allows for easier version management during development and CI/CD pipelines.
155
+
156
+ ### Version Management Scripts
157
+
158
+ The package includes convenient scripts for version management:
159
+
160
+ ```bash
161
+ # Bump patch version (0.1.0 -> 0.1.1)
162
+ npm run version:patch
163
+
164
+ # Bump minor version (0.1.0 -> 0.2.0)
165
+ npm run version:minor
166
+
167
+ # Bump major version (0.1.0 -> 1.0.0)
168
+ npm run version:major
169
+ ```
170
+
171
+ ### Component-Level Imports
172
+
173
+ For better tree-shaking, you can now import individual components directly:
174
+
175
+ ```js
176
+ // Import specific components
177
+ import Button from '@shohojdhara/atomix/Button';
178
+ import Card from '@shohojdhara/atomix/Card';
179
+ ```
180
+
181
+ ### Local Testing
182
+
183
+ To test the package locally in another project:
184
+
185
+ ```bash
186
+ # In the Atomix project directory
187
+ npm run link:local
188
+
189
+ # In your test project directory
190
+ npm link @shohojdhara/atomix
191
+ ```
192
+
193
+ See the [example-project.md](./example-project.md) file for a complete example project that demonstrates how to use the package.
194
+
195
+ ### Release Candidate Workflow
196
+
197
+ For testing before final releases, you can publish release candidates:
198
+
199
+ ```bash
200
+ # Publish as a release candidate
201
+ npm run publish:rc
202
+
203
+ # Later, publish as the latest version
204
+ npm run publish:latest
205
+ ```
206
+
207
+ ## Bundle Analysis
208
+
209
+ To analyze the bundle size and composition:
210
+
211
+ ```bash
212
+ # Run bundle analyzer
213
+ npm run analyze:bundle
214
+
215
+ # Check package size limits
216
+ npm run analyze:size
217
+ ```
218
+
219
+ ## Contributing
220
+
221
+ Contributions are welcome! Please see the [README.md](./README.md) file for more information on how to contribute to the project.
package/README.md CHANGED
@@ -1,182 +1,72 @@
1
- # Atomix Design System
2
-
3
- Atomix is a modern component library for Web, React and Next.js applications with full SSR support. It provides a comprehensive set of UI components built with accessibility, performance, and developer experience in mind.
4
-
5
- ## Features
6
-
7
- - 🚀 **Next.js Compatible** - Full SSR support with App Router
8
- - 🎨 **Modern Design** - Clean and contemporary design aesthetic
9
- - 📱 **Responsive** - Mobile-first responsive components
10
- - 🌓 **Theme Support** - Built-in dark/light theme support
11
- - ♿ **Accessible** - WCAG compliant components
12
- - 🛠️ **Customizable** - Extensive customization options
13
- - 📦 **Tree Shakeable** - Import only what you need
14
- - 🔧 **TypeScript** - Full TypeScript support
15
-
16
- ## Webpack 5 & Next.js Compatibility
17
-
18
- Atomix is fully compatible with Webpack 5 and Next.js (including Turbopack). For projects using Webpack 5 or Next.js, you may need to add the following configuration to handle Node.js core modules:
19
-
20
- ```js
21
- // For Next.js (in next.config.js)
22
- const nextConfig = {
23
- webpack: (config, { isServer }) => {
24
- // Handle TypeScript declaration files
25
- config.module.rules.push({
26
- test: /\.d\.ts$/,
27
- use: ['ignore-loader'],
28
- exclude: /node_modules/,
29
- });
30
-
31
- // Ignore TypeScript declaration file warnings
32
- config.ignoreWarnings = [
33
- ...(config.ignoreWarnings || []),
34
- { module: /\.d\.ts$/ }
35
- ];
36
-
37
- if (!isServer) {
38
- config.resolve.fallback = {
39
- ...config.resolve.fallback,
40
- crypto: false, // Provide empty mock for crypto
41
- };
42
- }
43
- return config;
44
- },
45
- transpilePackages: ['@shohojdhara/atomix'],
46
- };
47
-
48
- // For Webpack 5 (in webpack.config.js)
49
- module.exports = {
50
- resolve: {
51
- fallback: {
52
- crypto: false, // Provide empty mock for crypto
53
- },
54
- },
55
- // Fix TypeScript declaration files issues
56
- ignoreWarnings: [
57
- {
58
- module: /\.d\.ts$/,
59
- },
60
- ],
61
- };
62
- ```
63
1
 
64
- ## Installation
2
+ # Atomix
65
3
 
66
- ```bash
67
- npm install @shohojdhara/atomix
68
- # or
69
- yarn add @shohojdhara/atomix
70
- # or
71
- pnpm add @shohojdhara/atomix
72
- ```
4
+ **Atomix** is a modern component library for Web, React and Next.js applications with full SSR support. It provides a comprehensive set of UI components built with accessibility, performance, and developer experience in mind.
73
5
 
74
- ## Usage
6
+ ## ✨ Features
75
7
 
76
- ### Basic CSS Import
8
+ - **Comprehensive Component Library**: A rich set of UI components to build modern web applications.
9
+ - **Full SSR Support**: Seamless integration with server-side rendering frameworks like Next.js.
10
+ - **Accessibility First**: Built with accessibility in mind, following WAI-ARIA standards.
11
+ - **High Performance**: Optimized for performance with a small bundle size.
12
+ - **Developer Friendly**: Easy to use with a simple and intuitive API.
13
+ - **Themeable**: Easily customize the look and feel to match your brand.
14
+ - **TypeScript Support**: Written in TypeScript with predictable static types.
77
15
 
78
- ```tsx
79
- import { Button } from '@shohojdhara/atomix';
80
- import '@shohojdhara/atomix/css'; // Import styles
16
+ ## 📦 Installation
81
17
 
82
- function App() {
83
- return (
84
- <Button variant="primary">Click Me</Button>
85
- );
86
- }
87
- ```
88
-
89
- ### Multiple CSS Integration Options
18
+ To install Atomix, you can use npm or yarn:
90
19
 
91
- Atomix provides several ways to integrate CSS based on your project needs:
92
-
93
- #### 1. Traditional CSS Import
94
- ```javascript
95
- import '@shohojdhara/atomix/css';
96
- // or minified version
97
- import '@shohojdhara/atomix/css/min';
20
+ ```bash
21
+ npm install @shohojdhara/atomix
98
22
  ```
99
23
 
100
- #### 2. SCSS Source Access
101
- ```scss
102
- @use '@shohojdhara/atomix/scss' as atomix;
103
- // or selective imports
104
- @use '@shohojdhara/atomix/src/styles/06-components/components.button';
24
+ ```bash
25
+ yarn add @shohojdhara/atomix
105
26
  ```
106
27
 
28
+ ## 🚀 Usage
107
29
 
30
+ To start using Atomix, import the CSS and the components you need.
108
31
 
109
- #### 3. CSS Modules
110
- ```tsx
111
- import '@shohojdhara/atomix/css';
112
- import styles from './component.module.css';
32
+ ### CSS
113
33
 
114
- <Button className={`c-btn ${styles.customButton}`}>
115
- Scoped Button
116
- </Button>
117
- ```
34
+ Import the CSS file in your main application file:
118
35
 
119
- 📚 **[Complete CSS Integration Guide](./CSS_INTEGRATION_GUIDE.md)** - Detailed documentation for all CSS integration approaches.
120
-
121
- ## CSS Variables
122
-
123
- ```css
124
- :root {
125
- /* Primary Colors */
126
- --atomix-primary-50: #eff6ff;
127
- --atomix-primary-500: #3b82f6;
128
- --atomix-primary-900: #1e3a8a;
129
-
130
- /* Spacing */
131
- --atomix-spacing-xs: 0.25rem;
132
- --atomix-spacing-sm: 0.5rem;
133
- --atomix-spacing-md: 1rem;
134
- }
36
+ ```javascript
37
+ import '@shohojdhara/atomix/dist/css/atomix.css';
135
38
  ```
136
39
 
137
- ### Theme Support
40
+ ### Components
41
+
42
+ Import the components you want to use:
138
43
 
139
- ```tsx
140
- // Set theme programmatically
141
- document.documentElement.setAttribute('data-atomix-theme', 'dark')
44
+ ```javascript
45
+ import { Button, Card } from '@shohojdhara/atomix';
142
46
 
143
- // Or use CSS
144
- html[data-atomix-theme="dark"] {
145
- /* Dark theme styles */
47
+ function App() {
48
+ return (
49
+ <div>
50
+ <Button>Click me</Button>
51
+ <Card>
52
+ <h2>Card Title</h2>
53
+ <p>This is a simple card component.</p>
54
+ </Card>
55
+ </div>
56
+ );
146
57
  }
147
58
  ```
148
59
 
149
- ## Browser Support
150
-
151
- - Chrome (latest)
152
- - Firefox (latest)
153
- - Safari (latest)
154
- - Edge (latest)
155
-
156
- ## Documentation
157
-
158
- - 📚 [Full Documentation](https://liimonx.github.io/atomix)
159
- - 🎨 [Storybook](https://liimonx.github.io/atomix/storybook)
160
- - 🎨 **[CSS Integration Guide](./CSS_INTEGRATION_GUIDE.md)** - Complete guide for all CSS approaches
161
- - 🚀 [Next.js Integration Guide](./NEXTJS_INTEGRATION.md)
162
- - 📝 [Contributing Guide](./CONTRIBUTING.md)
163
- - 💡 [Examples](./examples/) - Working examples for different use cases
164
-
165
- ## Contributing
166
-
167
- We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
168
-
169
- ## License
170
-
171
- MIT © [liimonx](https://github.com/liimonx)
172
-
173
- ## Support
60
+ ## 🤝 Contributing
174
61
 
175
- - [GitHub Issues](https://github.com/liimonx/atomix/issues)
176
- - [Discussions](https://github.com/liimonx/atomix/discussions)
62
+ We welcome contributions from the community. If you'd like to contribute, please follow these steps:
177
63
 
178
- ## Quick Start
64
+ 1. **Fork the repository**: Fork the repository to your own GitHub account.
65
+ 2. **Create a branch**: Create a new branch for your feature or bug fix.
66
+ 3. **Make your changes**: Make your changes and commit them with a clear and concise message.
67
+ 4. **Push your changes**: Push your changes to your forked repository.
68
+ 5. **Create a pull request**: Create a pull request to the main repository.
179
69
 
180
- ### Next.js Integration
70
+ ## 📝 License
181
71
 
182
- ```
72
+ Atomix is licensed under the [Apache-2.0 License](LICENSE).