@casoon/atlas-styles 0.0.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Jörn Seidel (CASOON)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,271 @@
1
+ # @casoon/atlas-styles
2
+
3
+ **Complete Tailwind v4-compatible design system with modern UI effects**
4
+
5
+ A comprehensive CSS utility library featuring glassmorphism effects, gradient systems, animations, and modern design components, all built for Tailwind v4.
6
+
7
+ ## Features
8
+
9
+ - ✅ **Tailwind v4 Native** - Uses `@theme` and `@utility` directives
10
+ - ✅ **Modular Imports** - Import only what you need via subpaths
11
+ - ✅ **Complete Design System** - 145+ utility classes and components
12
+ - ✅ **Glass Effects** - Modern glassmorphism with backdrop filters
13
+ - ✅ **Gradient System** - Dynamic backgrounds and effects
14
+ - ✅ **SSR Compatible** - No JavaScript required
15
+ - ✅ **Tree Shakeable** - Optimized for production builds
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ npm install @casoon/atlas-styles
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ### Full Import
26
+ ```css
27
+ @import "@casoon/atlas-styles";
28
+ ```
29
+
30
+ ### Modular Imports
31
+ ```css
32
+ /* Import specific modules */
33
+ @import "@casoon/atlas-styles/core"; /* Design tokens & base utilities */
34
+ @import "@casoon/atlas-styles/glass"; /* Glass morphism effects */
35
+ @import "@casoon/atlas-styles/orbs"; /* Orb animations */
36
+ @import "@casoon/atlas-styles/animations"; /* Animation utilities */
37
+ @import "@casoon/atlas-styles/utilities"; /* Additional utilities */
38
+ ```
39
+
40
+ ### With Tailwind v4
41
+ ```css
42
+ /* In your main CSS file */
43
+ @import "tailwindcss";
44
+ @import "@casoon/atlas-styles";
45
+ ```
46
+
47
+ ## Available Modules
48
+
49
+ ### Core (`@casoon/atlas-styles/core`)
50
+ Complete design system foundation with tokens, utilities, and components:
51
+ - **Design Tokens**: Colors, spacing, typography, motion
52
+ - **Component System**: Cards, forms, navigation, typography
53
+ - **Layout Utilities**: Containers, z-index, focus management
54
+ - **Gradient System**: 30+ gradient utilities with animations
55
+
56
+ ### Glass (`@casoon/atlas-styles/glass`)
57
+ Modern glassmorphism effects:
58
+ - **Glass Variants**: `cs-glass`, `cs-glass-dark`, `cs-glass-strong`
59
+ - **Size Options**: `cs-glass-sm` to `cs-glass-5xl`
60
+ - **Color Variants**: `cs-glass-blue`, `cs-glass-purple`, etc.
61
+ - **Interactive States**: Hover and focus effects
62
+
63
+ ### Orbs (`@casoon/atlas-styles/orbs`)
64
+ Floating orb animations and effects:
65
+ - **Container**: `cs-orbs-container`
66
+ - **Orb Elements**: `cs-orb`, `cs-orb-small`, `cs-orb-medium`, `cs-orb-large`
67
+ - **Animations**: Built-in floating and movement effects
68
+
69
+ ### Animations (`@casoon/atlas-styles/animations`)
70
+ Comprehensive animation utilities:
71
+ - **Micro Interactions**: Hover lifts, scales, glows
72
+ - **Loading States**: Spinners, skeletons, progress
73
+ - **Scroll Effects**: Reveal animations, smooth scrolling
74
+
75
+ ### Utilities (`@casoon/atlas-styles/utilities`)
76
+ Additional utility classes:
77
+ - **Scrollbar Styling**: Custom scrollbar designs
78
+ - **Focus Management**: Enhanced focus states
79
+ - **Accessibility**: Screen reader utilities
80
+
81
+ ## Examples
82
+
83
+ ### Glass Morphism Cards
84
+ ```html
85
+ <div class="cs-glass p-6 rounded-lg">
86
+ <h3 class="cs-text">Glass Card</h3>
87
+ <p class="cs-text-muted">Beautiful glassmorphism effect</p>
88
+ </div>
89
+
90
+ <!-- Dark variant -->
91
+ <div class="cs-glass-dark p-6 rounded-lg">
92
+ <h3 class="cs-text">Dark Glass Card</h3>
93
+ </div>
94
+
95
+ <!-- Strong glass effect -->
96
+ <div class="cs-glass-strong p-6 rounded-lg">
97
+ <h3 class="cs-text">Strong Glass Effect</h3>
98
+ </div>
99
+ ```
100
+
101
+ ### Gradient Backgrounds
102
+ ```html
103
+ <!-- Predefined gradients -->
104
+ <div class="cs-gradient-ocean p-8 rounded-lg">
105
+ <h2 class="cs-gradient-text-ocean">Ocean Gradient</h2>
106
+ </div>
107
+
108
+ <div class="cs-gradient-sunset p-8 rounded-lg">
109
+ <h2 class="cs-gradient-text-sunset">Sunset Gradient</h2>
110
+ </div>
111
+
112
+ <!-- Animated gradients -->
113
+ <div class="cs-gradient-ocean cs-gradient-animate p-8 rounded-lg">
114
+ <h2>Animated Ocean</h2>
115
+ </div>
116
+ ```
117
+
118
+ ### Feature Cards
119
+ ```html
120
+ <div class="cs-card-feature">
121
+ <div class="cs-card-icon">🚀</div>
122
+ <h3 class="cs-card-title">Fast Performance</h3>
123
+ <p class="cs-card-description">Optimized for speed and efficiency</p>
124
+ <button class="cs-button-primary-card">Learn More</button>
125
+ </div>
126
+ ```
127
+
128
+ ### Form Components
129
+ ```html
130
+ <form class="cs-form-modern">
131
+ <div class="cs-form-group">
132
+ <label class="cs-label-modern">Email</label>
133
+ <input type="email" class="cs-input-modern" placeholder="Enter your email">
134
+ </div>
135
+ <button class="cs-button-primary-modern">Submit</button>
136
+ </form>
137
+ ```
138
+
139
+ ## Design Tokens
140
+
141
+ All design tokens are available as CSS custom properties:
142
+
143
+ ### Colors
144
+ ```css
145
+ --cs-bg: #0b0c0f;
146
+ --cs-surface: #14161a;
147
+ --cs-text: #eef1f6;
148
+ --cs-brand: #4f7cff;
149
+ --cs-success: #22c55e;
150
+ ```
151
+
152
+ ### Spacing
153
+ ```css
154
+ --cs-space-1: 4px;
155
+ --cs-space-2: 8px;
156
+ --cs-space-4: 16px;
157
+ --cs-space-8: 32px;
158
+ ```
159
+
160
+ ### Typography
161
+ ```css
162
+ --cs-fs-sm: clamp(0.88rem, 0.82rem + 0.3cqi, 0.95rem);
163
+ --cs-fs-md: clamp(1rem, 0.95rem + 0.4cqi, 1.125rem);
164
+ --cs-fs-lg: clamp(1.25rem, 1.05rem + 0.8cqi, 1.5rem);
165
+ ```
166
+
167
+ ## Customization
168
+
169
+ ### Override Design Tokens
170
+ ```css
171
+ :root {
172
+ --cs-brand: #your-brand-color;
173
+ --cs-radius: 12px;
174
+ --cs-glass-blur: 20px;
175
+ }
176
+ ```
177
+
178
+ ### Custom Glass Variants
179
+ ```css
180
+ .my-custom-glass {
181
+ background: var(--cs-glass-bg-medium);
182
+ backdrop-filter: blur(12px);
183
+ border: 1px solid var(--cs-glass-border-strong);
184
+ border-radius: var(--cs-radius);
185
+ }
186
+ ```
187
+
188
+ ## Tailwind Integration
189
+
190
+ ### Purge Configuration
191
+ Add CASOON classes to your Tailwind safelist:
192
+
193
+ ```js
194
+ // tailwind.config.js
195
+ module.exports = {
196
+ content: ['./src/**/*.{html,js,tsx}'],
197
+ safelist: [
198
+ // Glass effects
199
+ { pattern: /cs-glass.*/ },
200
+ // Gradient utilities
201
+ { pattern: /cs-gradient.*/ },
202
+ // Component classes
203
+ { pattern: /cs-card.*/ },
204
+ { pattern: /cs-button.*/ },
205
+ ]
206
+ }
207
+ ```
208
+
209
+ ### Plugin Integration
210
+ ```js
211
+ // tailwind.config.js
212
+ const plugin = require('tailwindcss/plugin');
213
+
214
+ module.exports = {
215
+ plugins: [
216
+ plugin(function({ addUtilities }) {
217
+ // CASOON styles will be available as Tailwind utilities
218
+ })
219
+ ]
220
+ }
221
+ ```
222
+
223
+ ## Browser Support
224
+
225
+ - **Modern Browsers**: Full support (Chrome 88+, Firefox 94+, Safari 14+)
226
+ - **Backdrop Filters**: Graceful degradation for unsupported browsers
227
+ - **CSS Custom Properties**: IE 11+ (with polyfill)
228
+
229
+ ## Performance
230
+
231
+ - **CSS Size**: ~50KB uncompressed, ~8KB gzipped
232
+ - **Tree Shakeable**: Import only what you need
233
+ - **No JavaScript**: Pure CSS, no runtime overhead
234
+ - **Optimized**: Minimal specificity, efficient selectors
235
+
236
+ ## Migration Guide
237
+
238
+ ### From Tailwind v3
239
+ ```css
240
+ /* Before */
241
+ @tailwind base;
242
+ @tailwind components;
243
+ @tailwind utilities;
244
+
245
+ /* After */
246
+ @import "tailwindcss";
247
+ @import "@casoon/styles";
248
+ ```
249
+
250
+ ### From Custom CSS
251
+ Replace custom glass/gradient CSS with CASOON utilities:
252
+
253
+ ```css
254
+ /* Before */
255
+ .my-glass {
256
+ background: rgba(255, 255, 255, 0.1);
257
+ backdrop-filter: blur(16px);
258
+ border: 1px solid rgba(255, 255, 255, 0.2);
259
+ }
260
+
261
+ /* After - just use the class */
262
+ /* <div class="cs-glass"> */
263
+ ```
264
+
265
+ ## Contributing
266
+
267
+ See the main [CASOON Atlas README](../../README.md) for contribution guidelines.
268
+
269
+ ## License
270
+
271
+ MIT