@nimblegiant/stilts 0.1.0

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 Nimble Giant
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,361 @@
1
+ # 🦒 Stilts Design System
2
+
3
+ Nimble Giant's whimsical yet disciplined design system - a collection of reusable React components and design tokens built for flexibility and delight.
4
+
5
+ ## Overview
6
+
7
+ Stilts is a framework-agnostic design system extracted from Nimble Giant's website. It provides:
8
+
9
+ - 10 production-ready React components
10
+ - Comprehensive design tokens (colors, spacing, typography, animations)
11
+ - Full TypeScript support
12
+ - Tree-shakable ESM and CJS builds
13
+ - Tailwind CSS integration
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @nimblegiant/stilts
19
+ # or
20
+ bun add @nimblegiant/stilts
21
+ # or
22
+ yarn add @nimblegiant/stilts
23
+ ```
24
+
25
+ ## Quick Start
26
+
27
+ ### 1. Import Styles
28
+
29
+ ```typescript
30
+ import '@nimblegiant/stilts/styles';
31
+ ```
32
+
33
+ ### 2. Use Components
34
+
35
+ ```tsx
36
+ import { MainNav, PageHero, TeamGrid } from '@nimblegiant/stilts';
37
+
38
+ function App() {
39
+ return (
40
+ <>
41
+ <MainNav currentPath="/" />
42
+ <PageHero
43
+ title="Welcome to Stilts"
44
+ subtitle="A whimsical yet disciplined design system"
45
+ align="center"
46
+ />
47
+ <TeamGrid team={teamMembers} />
48
+ </>
49
+ );
50
+ }
51
+ ```
52
+
53
+ ### 3. Access Design Tokens
54
+
55
+ ```typescript
56
+ import { colors, spacing, animations } from '@nimblegiant/stilts/tokens';
57
+
58
+ const primaryColor = colors.primary.DEFAULT; // '#02aec2'
59
+ const space4 = spacing[4]; // '1rem'
60
+ const springEasing = animations.easings.spring; // 'cubic-bezier(0.175, 0.885, 0.32, 1.275)'
61
+ ```
62
+
63
+ ## Components
64
+
65
+ ### Layout Components
66
+
67
+ #### MainNav
68
+ Responsive navigation with theme toggle and mobile menu.
69
+
70
+ ```tsx
71
+ import { MainNav } from '@nimblegiant/stilts';
72
+
73
+ <MainNav currentPath="/about" isPortfolioPage={false} />
74
+ ```
75
+
76
+ ### UI Components
77
+
78
+ #### Toast
79
+ Global toast notification system.
80
+
81
+ ```tsx
82
+ import { Toast } from '@nimblegiant/stilts';
83
+
84
+ // Component usage
85
+ <Toast />
86
+
87
+ // Programmatic usage (global)
88
+ window.showToast({
89
+ type: 'success',
90
+ title: 'Success!',
91
+ message: 'Your changes have been saved.',
92
+ duration: 3000
93
+ });
94
+ ```
95
+
96
+ ### Pattern Components
97
+
98
+ #### PageHero
99
+ Simple hero section with optional background image.
100
+
101
+ ```tsx
102
+ import { PageHero } from '@nimblegiant/stilts';
103
+
104
+ <PageHero
105
+ title="About Us"
106
+ subtitle="Building amazing things"
107
+ eyebrow="Company"
108
+ description="We're a team of designers and developers..."
109
+ align="center"
110
+ backgroundImage="/hero-bg.jpg"
111
+ />
112
+ ```
113
+
114
+ #### VideoHero
115
+ Full-screen hero with video background and service cards.
116
+
117
+ ```tsx
118
+ import { VideoHero } from '@nimblegiant/stilts';
119
+
120
+ <VideoHero
121
+ title="Transform Your Business"
122
+ tagline="Digital Solutions"
123
+ description="We build products that scale"
124
+ cards={serviceCards}
125
+ />
126
+ ```
127
+
128
+ #### TeamGrid
129
+ Display team members in a responsive grid.
130
+
131
+ ```tsx
132
+ import { TeamGrid } from '@nimblegiant/stilts';
133
+
134
+ <TeamGrid
135
+ team={[
136
+ {
137
+ name: "Jane Doe",
138
+ role: "Engineering",
139
+ title: "Co-Founder",
140
+ image: "/team/jane.jpg",
141
+ bio: "Jane is a...",
142
+ linkedin: "https://linkedin.com/in/jane"
143
+ }
144
+ ]}
145
+ />
146
+ ```
147
+
148
+ #### ServiceSection
149
+ Service features section with grid layout.
150
+
151
+ ```tsx
152
+ import { ServiceSection } from '@nimblegiant/stilts';
153
+
154
+ <ServiceSection
155
+ id="services"
156
+ title="Our Services"
157
+ description="What we offer"
158
+ features={featuresList}
159
+ />
160
+ ```
161
+
162
+ #### ProcessSteps
163
+ Horizontal or vertical process timeline.
164
+
165
+ ```tsx
166
+ import { ProcessSteps } from '@nimblegiant/stilts';
167
+
168
+ <ProcessSteps
169
+ steps={[
170
+ { title: "Step 1", description: "First step" },
171
+ { title: "Step 2", description: "Second step" }
172
+ ]}
173
+ orientation="horizontal"
174
+ />
175
+ ```
176
+
177
+ #### StatBar
178
+ Statistics display bar.
179
+
180
+ ```tsx
181
+ import { StatBar } from '@nimblegiant/stilts';
182
+
183
+ <StatBar
184
+ stats={[
185
+ { value: "100+", label: "Projects" },
186
+ { value: "50+", label: "Clients" }
187
+ ]}
188
+ />
189
+ ```
190
+
191
+ #### IndustryGrid
192
+ Industry showcase grid.
193
+
194
+ ```tsx
195
+ import { IndustryGrid } from '@nimblegiant/stilts';
196
+
197
+ <IndustryGrid
198
+ industries={[
199
+ { name: "Healthcare", icon: "🏥" },
200
+ { name: "Finance", icon: "💰" }
201
+ ]}
202
+ />
203
+ ```
204
+
205
+ #### ContentPage
206
+ MDX content page wrapper.
207
+
208
+ ```tsx
209
+ import { ContentPage } from '@nimblegiant/stilts';
210
+
211
+ <ContentPage>
212
+ <h1>Page Title</h1>
213
+ <p>Content goes here...</p>
214
+ </ContentPage>
215
+ ```
216
+
217
+ ## Design Tokens
218
+
219
+ ### Colors
220
+
221
+ ```typescript
222
+ import { colors } from '@nimblegiant/stilts/tokens';
223
+
224
+ colors.primary.DEFAULT // '#02aec2'
225
+ colors.primary[500] // Shade variants
226
+ colors.accent.violet // Brand accents
227
+ colors.semantic.success // Semantic colors
228
+ colors.gray[500] // Neutral scale
229
+ ```
230
+
231
+ ### Spacing
232
+
233
+ ```typescript
234
+ import { spacing } from '@nimblegiant/stilts/tokens';
235
+
236
+ spacing[4] // '1rem' (16px)
237
+ spacing[8] // '2rem' (32px)
238
+ spacing[16] // '4rem' (64px)
239
+ ```
240
+
241
+ ### Animations
242
+
243
+ ```typescript
244
+ import { durations, easings } from '@nimblegiant/stilts/tokens';
245
+
246
+ durations.fast // '100ms'
247
+ durations.normal // '200ms'
248
+ easings.spring // Bouncy easing
249
+ easings.smooth // Smooth easing
250
+ ```
251
+
252
+ ## Tailwind CSS Integration
253
+
254
+ Stilts works seamlessly with Tailwind CSS. The design system uses CSS variables that can be integrated into your Tailwind configuration.
255
+
256
+ ### Option 1: Use Pre-compiled CSS
257
+
258
+ ```typescript
259
+ import '@nimblegiant/stilts/styles';
260
+ ```
261
+
262
+ ### Option 2: Extend Tailwind Config
263
+
264
+ ```javascript
265
+ // tailwind.config.js
266
+ export default {
267
+ content: [
268
+ './src/**/*.{ts,tsx}',
269
+ './node_modules/@nimblegiant/stilts/dist/**/*.js',
270
+ ],
271
+ theme: {
272
+ extend: {
273
+ colors: {
274
+ primary: 'var(--color-primary)',
275
+ // ... map other CSS variables
276
+ },
277
+ },
278
+ },
279
+ };
280
+ ```
281
+
282
+ ## TypeScript Support
283
+
284
+ Stilts is built with TypeScript and includes full type definitions.
285
+
286
+ ```typescript
287
+ import type { ColorToken, SpacingToken } from '@nimblegiant/stilts/tokens';
288
+
289
+ const myColor: ColorToken = colors.primary;
290
+ const mySpacing: SpacingToken = spacing;
291
+ ```
292
+
293
+ ## Framework Compatibility
294
+
295
+ Stilts components are pure React components with no framework-specific dependencies. They work with:
296
+
297
+ - **React** ✅
298
+ - **Next.js** ✅
299
+ - **Astro** ✅ (with @astrojs/react)
300
+ - **Gatsby** ✅
301
+ - **Remix** ✅
302
+ - Any other React-based framework
303
+
304
+ ## Browser Support
305
+
306
+ Stilts supports all modern browsers:
307
+
308
+ - Chrome (last 2 versions)
309
+ - Firefox (last 2 versions)
310
+ - Safari (last 2 versions)
311
+ - Edge (last 2 versions)
312
+
313
+ ## Development
314
+
315
+ ### Build
316
+
317
+ ```bash
318
+ bun install
319
+ bun run build
320
+ ```
321
+
322
+ ### Type Check
323
+
324
+ ```bash
325
+ bun run typecheck
326
+ ```
327
+
328
+ ### Watch Mode
329
+
330
+ ```bash
331
+ bun run dev
332
+ ```
333
+
334
+ ## Package Structure
335
+
336
+ ```
337
+ stilts/
338
+ ├── dist/ # Built files
339
+ │ ├── index.js # ESM bundle
340
+ │ ├── index.cjs # CommonJS bundle
341
+ │ └── index.d.ts # TypeScript definitions
342
+ ├── src/
343
+ │ ├── components/ # React components
344
+ │ ├── styles/ # CSS design tokens
345
+ │ ├── tokens/ # TypeScript tokens
346
+ │ └── types/ # Shared types
347
+ └── package.json
348
+ ```
349
+
350
+ ## License
351
+
352
+ MIT © Nimble Giant
353
+
354
+ ## Contributing
355
+
356
+ This package is currently maintained internally by Nimble Giant. For questions or issues, please contact the team.
357
+
358
+ ## Links
359
+
360
+ - [Nimble Giant Website](https://nimble-giant.com)
361
+ - [GitHub Repository](https://github.com/nimble-giant/giantkit)