@shohojdhara/atomix 0.6.1 → 0.6.3

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 (67) hide show
  1. package/README.md +510 -106
  2. package/dist/atomix.css +30 -24
  3. package/dist/atomix.css.map +1 -1
  4. package/dist/atomix.min.css +6 -6
  5. package/dist/atomix.min.css.map +1 -1
  6. package/dist/atomix.umd.js +1 -1
  7. package/dist/atomix.umd.js.map +1 -1
  8. package/dist/atomix.umd.min.js +1 -1
  9. package/dist/charts.d.ts +11 -2
  10. package/dist/charts.js +294 -139
  11. package/dist/charts.js.map +1 -1
  12. package/dist/core.d.ts +14 -39
  13. package/dist/core.js +297 -145
  14. package/dist/core.js.map +1 -1
  15. package/dist/forms.d.ts +11 -1
  16. package/dist/forms.js +385 -185
  17. package/dist/forms.js.map +1 -1
  18. package/dist/heavy.d.ts +9 -0
  19. package/dist/heavy.js +297 -143
  20. package/dist/heavy.js.map +1 -1
  21. package/dist/index.d.ts +156 -164
  22. package/dist/index.esm.js +391 -203
  23. package/dist/index.esm.js.map +1 -1
  24. package/dist/index.js +391 -203
  25. package/dist/index.js.map +1 -1
  26. package/dist/index.min.js +1 -1
  27. package/dist/index.min.js.map +1 -1
  28. package/dist/theme.d.ts +14 -6
  29. package/dist/theme.js +2 -9
  30. package/dist/theme.js.map +1 -1
  31. package/package.json +26 -26
  32. package/src/components/AtomixGlass/AtomixGlass.tsx +1 -1
  33. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +8 -1
  34. package/src/components/AtomixGlass/deprecated/AtomixGlass.deprecated.tsx +390 -0
  35. package/src/components/AtomixGlass/glass-utils.ts +29 -0
  36. package/src/components/AtomixGlass/stories/Playground.stories.tsx +32 -1
  37. package/src/components/Button/Button.stories.tsx +1 -1
  38. package/src/components/Button/Button.tsx +6 -5
  39. package/src/components/Card/Card.tsx +2 -2
  40. package/src/components/Dropdown/Dropdown.tsx +1 -0
  41. package/src/components/EdgePanel/EdgePanel.tsx +1 -3
  42. package/src/components/Form/Select.test.tsx +75 -0
  43. package/src/components/Form/Select.tsx +348 -252
  44. package/src/components/Form/SelectOption.tsx +16 -10
  45. package/src/components/index.ts +1 -1
  46. package/src/layouts/CssGrid/index.ts +1 -0
  47. package/src/lib/composables/shared-mouse-tracker.ts +62 -6
  48. package/src/lib/composables/useAtomixGlass.ts +241 -139
  49. package/src/lib/composables/useAtomixGlassStyles.ts +201 -149
  50. package/src/lib/constants/components.ts +54 -35
  51. package/src/lib/theme/config/configLoader.ts +1 -1
  52. package/src/lib/theme/test/testTheme.ts +2 -2
  53. package/src/lib/theme/utils/themeUtils.ts +98 -110
  54. package/src/lib/types/components.ts +29 -65
  55. package/src/styles/01-settings/_settings.spacing.scss +6 -1
  56. package/src/styles/03-generic/_generic.reset.scss +1 -1
  57. package/src/styles/06-components/_components.atomix-glass.scss +20 -29
  58. package/src/styles/06-components/_components.data-table.scss +5 -4
  59. package/src/styles/06-components/_components.dynamic-background.scss +9 -8
  60. package/src/styles/06-components/_components.footer.scss +8 -7
  61. package/src/styles/06-components/_components.hero.scss +2 -2
  62. package/src/styles/06-components/_components.messages.scss +16 -16
  63. package/src/styles/06-components/_components.navbar.scss +2 -0
  64. package/src/styles/06-components/_components.select.scss +15 -2
  65. package/src/styles/06-components/_components.upload.scss +3 -3
  66. package/CHANGELOG.md +0 -165
  67. package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +0 -215
package/CHANGELOG.md DELETED
@@ -1,165 +0,0 @@
1
- # Changelog
2
-
3
- ## [0.3.15] - 2026-02-20
4
-
5
- ### Added
6
-
7
- - Standardize component import paths, update build tool plugin import examples, and include themes in package distribution (fda94bac)
8
- - Add TypeScript declaration files to package for build-tools (fc288744)
9
- - Update type definitions and improve export documentation for build-tools (13a6dd2c)
10
-
11
- ### Changed
12
-
13
- - Centralize build tool utilities for theme handling, component filtering, and logging (6acdcbfe)
14
-
15
- ### Fixed
16
-
17
- - Add `.js` extension to type import path in build tools definition (e0479944)
18
- - Resolve duplicate identifiers in `AtomixGlass` (51d82d99)
19
-
20
- ## [2.0.0] - 2026-01-20
21
-
22
- ### Added
23
-
24
- - **Spinner**: Added `aria-label` (default "Loading") and `role` (default "status") props for improved accessibility.
25
- - **Badge**: Added `onRemove` callback and `aria-label` support. Providing `onRemove` automatically renders a close button.
26
- - **Input/Textarea**: Added `defaultValue` prop for uncontrolled component support.
27
- - **JSDoc**: Added `@default` tags to many component props for better developer experience and documentation.
28
-
29
- ### Changed (Breaking)
30
-
31
- - **Standardized ARIA Props**: All ARIA-related props have been renamed from camelCase to kebab-case (e.g., `ariaLabel` -> `aria-label`) to align with native React/HTML standards.
32
- - **Toggle Component**: Refactored API to follow standard React form patterns. Removed `initialOn`, `onToggleOn`, and `onToggleOff`. Added `checked`, `defaultChecked`, and `onChange`.
33
- - **Rating Component**: Renamed `color` prop to `variant` for consistency with other components.
34
- - **Accordion Component**: Consolidated `onOpen` and `onClose` into a single `onOpenChange` handler.
35
- - **Callout Component**: Renamed `oneLine` to `compact` and `toast` to `isToast`.
36
-
37
- ### Fixed
38
-
39
- - Fixed several accessibility issues across navigation components.
40
- - Improved focus management in `Modal` component.
41
-
42
- ## 0.3.11
43
-
44
- ### Patch Changes
45
-
46
- - 7dbaeb5: patchFix fs/promises module resolution error by removing server-side only functions (saveTheme, saveCSSFile, loadThemeFromConfig) from the browser bundle. This makes the library fully compatible with Next.js App Router and other browser environments. Breaking Change: Removed Node.js specific file-system utilities from main exports.
47
-
48
- ## [0.3.10] - 2026-01-06
49
-
50
- ### Fixed
51
-
52
- - Fixed `Module not found: Can't resolve './lib/config/loader'` by bundling `loadAtomixConfig` instead of treating it as external.
53
-
54
- ## [0.3.9] - 2026-01-06
55
-
56
- ### Fixed
57
-
58
- - Fixed `Module not found` error by replacing dynamic `require` with static import in `ThemeProvider`. This resolves build issues in external projects (e.g. Next.js).
59
- All notable changes to this project will be documented in this file.
60
-
61
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
62
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
63
-
64
- ## [Unreleased]
65
-
66
- ## [0.3.0] - 2025-12-03
67
-
68
- ### Added
69
-
70
- #### Theme Manager System
71
-
72
- - **Theme Manager Class**: Core theme management for vanilla JavaScript applications
73
-
74
- - Dynamic theme loading with CSS file management
75
- - Theme persistence using localStorage
76
- - Event system for theme changes (`themeChange`, `themeLoad`, `themeError`)
77
- - Theme preloading for faster switching
78
- - SSR-safe implementation
79
- - Comprehensive error handling
80
-
81
- - **React Integration**:
82
-
83
- - `ThemeProvider` component for React applications
84
- - `useTheme` hook for accessing theme state
85
- - `ThemeContext` for context-based state management
86
- - Loading and error states
87
- - Automatic cleanup on unmount
88
-
89
- - **TypeScript Support**:
90
-
91
- - Complete type definitions for all theme utilities
92
- - `ThemeMetadata`, `ThemeManagerConfig`, `ThemeChangeEvent` interfaces
93
- - Type-safe event system
94
- - Full IntelliSense support
95
-
96
- - **Package Exports**:
97
-
98
- - `@shohojdhara/atomix/theme` - Theme manager utilities
99
-
100
- - **Documentation**:
101
-
102
- - Comprehensive theme manager guide (`docs/THEME_MANAGER.md`)
103
- - React usage examples
104
- - Vanilla JavaScript examples
105
- - API reference
106
- - Migration guide
107
- - Troubleshooting section
108
-
109
- - **Runtime Configuration**:
110
- - Added runtime section to `themes.config.js`
111
- - Support for CDN paths
112
- - Theme preloading configuration
113
- - Theme dependencies mapping
114
-
115
- ### Changed
116
-
117
- - Updated `README.md` with theme manager usage examples
118
- - Enhanced `themes.config.js` with runtime configuration options
119
- - Updated `src/lib/index.ts` to export theme utilities
120
-
121
- ### Features
122
-
123
- - 🎨 Dynamic theme switching without page reload
124
- - 💾 Automatic theme persistence across sessions
125
- - ⚡ Theme preloading for instant switching
126
- - 🔒 Full TypeScript support
127
- - ♿ SSR compatible (Next.js, Remix, etc.)
128
- - 🎯 Works with React and vanilla JavaScript
129
- - 📦 Zero breaking changes to existing API
130
-
131
- ## [0.2.9] - 2025-01-29
132
-
133
- ## [0.2.8] - 2025-01-28
134
-
135
- ## [0.2.7] - 2025-01-27
136
-
137
- ## [0.1.25] - 2025-07-02
138
-
139
- ### Fixed
140
-
141
- - Fixed module parse error with undefined exports in ESM build
142
- - Fixed Tooltip component export issue (previously exported as `Tooltip_Tooltip as Tooltip`)
143
- - Added post-build script to ensure all components are properly exported
144
-
145
- ### Added
146
-
147
- - Added support for direct component imports via `@shohojdhara/atomix/components/*`
148
- - Added troubleshooting guide for common issues
149
-
150
- ## [0.1.18] - 2025-07-03
151
-
152
- ## [0.1.16] - 2025-07-02
153
-
154
- ### Added
155
-
156
- - Initial release of Atomix Design System
157
- - Core components library with React and vanilla JavaScript support
158
- - Multiple module formats: ESM, CJS, and UMD
159
- - Comprehensive styling with CSS variables and theming support
160
-
161
- ## [0.1.0] - 2023-06-09
162
-
163
- ### Added
164
-
165
- - Initial public release
@@ -1,215 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { DesignTokensCustomizer } from './DesignTokensCustomizer';
3
- import { useState } from 'react';
4
-
5
- // Enhanced preview components
6
- const PreviewContainer = ({
7
- title,
8
- description,
9
- children,
10
- }: {
11
- title?: string;
12
- description?: string;
13
- children: React.ReactNode;
14
- }) => (
15
- <div className="story-preview-container">
16
- {title && <h3 className="story-preview-title">{title}</h3>}
17
- {description && <p className="story-preview-description">{description}</p>}
18
- <div className="story-preview-content">{children}</div>
19
- </div>
20
- );
21
-
22
- const meta: Meta<typeof DesignTokensCustomizer> = {
23
- title: 'DevTools/DesignTokensCustomizer',
24
- component: DesignTokensCustomizer,
25
- parameters: {
26
- layout: 'fullscreen',
27
- docs: {
28
- description: {
29
- component: 'Interactive design tokens customization tool for real-time theme adjustments.',
30
- },
31
- },
32
- },
33
- };
34
-
35
- export default meta;
36
- type Story = StoryObj<typeof DesignTokensCustomizer>;
37
-
38
- // Basic Usage
39
- export const Default: Story = {
40
- render: () => (
41
- <PreviewContainer
42
- title="Design Tokens Customizer"
43
- description="Interactive tool for customizing design tokens in real-time"
44
- >
45
- <DesignTokensCustomizer />
46
- </PreviewContainer>
47
- ),
48
- parameters: {
49
- docs: {
50
- description: {
51
- story: 'The default design tokens customizer with all standard controls and features.',
52
- },
53
- },
54
- },
55
- };
56
-
57
- // With Custom Configuration
58
- export const WithCustomConfig: Story = {
59
- render: () => {
60
- const customConfig = {
61
- colors: {
62
- primary: '#667eea',
63
- secondary: '#764ba2',
64
- accent: '#f093fb',
65
- },
66
- spacing: {
67
- small: '8px',
68
- medium: '16px',
69
- large: '24px',
70
- },
71
- typography: {
72
- fontFamily: 'Inter, sans-serif',
73
- fontSize: '16px',
74
- fontWeight: '400',
75
- },
76
- };
77
-
78
- return (
79
- <PreviewContainer
80
- title="Custom Configuration"
81
- description="Design tokens customizer with predefined custom configuration"
82
- >
83
- <DesignTokensCustomizer initialConfig={customConfig} />
84
- </PreviewContainer>
85
- );
86
- },
87
- };
88
-
89
- // Theme Preview Mode
90
- export const ThemePreview: Story = {
91
- render: () => (
92
- <PreviewContainer
93
- title="Theme Preview Mode"
94
- description="Customizer with live theme preview components"
95
- >
96
- <div className="theme-preview-layout">
97
- <div className="customizer-panel">
98
- <DesignTokensCustomizer />
99
- </div>
100
- <div className="preview-panel">
101
- <div className="preview-components">
102
- <button className="preview-button">Primary Button</button>
103
- <button className="preview-button secondary">Secondary Button</button>
104
- <div className="preview-card">
105
- <h3>Preview Card</h3>
106
- <p>This card updates in real-time with your token changes.</p>
107
- <input className="preview-input" placeholder="Type to see styling" />
108
- </div>
109
- <div className="preview-colors">
110
- <div className="color-swatch primary"></div>
111
- <div className="color-swatch secondary"></div>
112
- <div className="color-swatch accent"></div>
113
- </div>
114
- </div>
115
- </div>
116
- </div>
117
- </PreviewContainer>
118
- ),
119
- parameters: {
120
- viewport: {
121
- viewports: {
122
- desktop: {
123
- name: 'Desktop',
124
- styles: { width: '1200px', height: '800px' },
125
- },
126
- },
127
- defaultViewport: 'desktop',
128
- },
129
- },
130
- };
131
-
132
- // Compact Mode
133
- export const Compact: Story = {
134
- render: () => (
135
- <PreviewContainer
136
- title="Compact Mode"
137
- description="Space-efficient customizer for smaller screens"
138
- >
139
- <DesignTokensCustomizer compact={true} />
140
- </PreviewContainer>
141
- ),
142
- parameters: {
143
- viewport: {
144
- viewports: {
145
- mobile: {
146
- name: 'Mobile',
147
- styles: { width: '375px', height: '667px' },
148
- },
149
- },
150
- defaultViewport: 'mobile',
151
- },
152
- },
153
- };
154
-
155
- // With Export Options
156
- export const WithExport: Story = {
157
- render: () => {
158
- const [exportData, setExportData] = useState('');
159
-
160
- const handleExport = (tokens: any) => {
161
- setExportData(JSON.stringify(tokens, null, 2));
162
- };
163
-
164
- return (
165
- <PreviewContainer
166
- title="With Export Options"
167
- description="Customizer with export functionality for sharing themes"
168
- >
169
- <div className="export-workflow">
170
- <DesignTokensCustomizer onExport={handleExport} />
171
- {exportData && (
172
- <div className="export-output">
173
- <h4>Exported Theme Data:</h4>
174
- <pre>{exportData}</pre>
175
- <button
176
- onClick={() => navigator.clipboard.writeText(exportData)}
177
- className="copy-button"
178
- >
179
- Copy to Clipboard
180
- </button>
181
- </div>
182
- )}
183
- </div>
184
- </PreviewContainer>
185
- );
186
- },
187
- };
188
-
189
- // Interactive Tutorial
190
- export const InteractiveTutorial: Story = {
191
- render: () => (
192
- <PreviewContainer
193
- title="Interactive Tutorial"
194
- description="Guided tour of the design tokens customizer features"
195
- >
196
- <div className="tutorial-container">
197
- <div className="tutorial-steps">
198
- <div className="tutorial-step active">
199
- <h4>Step 1: Explore Color Tokens</h4>
200
- <p>Click on the Colors section to customize your primary and secondary colors.</p>
201
- </div>
202
- <div className="tutorial-step">
203
- <h4>Step 2: Adjust Typography</h4>
204
- <p>Modify font sizes, weights, and line heights for better readability.</p>
205
- </div>
206
- <div className="tutorial-step">
207
- <h4>Step 3: Configure Spacing</h4>
208
- <p>Set consistent spacing values for margins and padding.</p>
209
- </div>
210
- </div>
211
- <DesignTokensCustomizer />
212
- </div>
213
- </PreviewContainer>
214
- ),
215
- };