@chesapeake/stack 0.1.0 → 0.1.2
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/CHANGELOG.md +35 -1
- package/README.md +40 -81
- package/eslint.config.js +56 -0
- package/package.json +19 -4
- package/prettier.config.js +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,39 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
and this project adheres to
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.1.2] - 2026-03-05
|
|
10
|
+
|
|
11
|
+
- `examples/` folder with copy-pasteable React examples: basic-form,
|
|
12
|
+
auth-setup, page-layout, theme-customization, feedback-and-notifications,
|
|
13
|
+
data-display, user-management
|
|
14
|
+
- polish README.md
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
## [0.1.1] - 2026-03-05
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- UI component: LocationInput – Google Maps Places Autocomplete search with
|
|
23
|
+
debounced input, keyboard navigation, and suggestions dropdown
|
|
24
|
+
- UI export: sonner-api – re-exports `toast` and `ToasterProps` for
|
|
25
|
+
programmatic toast notifications
|
|
26
|
+
- UX component: ActivityAnimation – activity indicator with pulse and particles
|
|
27
|
+
variants (sm/md/lg)
|
|
28
|
+
- UX component: FireAnimation – animated fire visualization scaled by
|
|
29
|
+
productivity score
|
|
30
|
+
- CONTRIBUTING.md with development setup and component guidelines
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- README rewritten for npm consumers: added examples table with GitHub links,
|
|
35
|
+
Package Contents section, and Contributing link
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- GitHub URLs corrected from `chesapeake-computing` to `chesapeakedev` across
|
|
40
|
+
README.md, package.json, CONTRIBUTING.md, and CHANGELOG.md
|
|
41
|
+
|
|
9
42
|
## [0.1.0] - 2026-02-05
|
|
10
43
|
|
|
11
44
|
### Added
|
|
@@ -23,4 +56,5 @@ and this project adheres to
|
|
|
23
56
|
- Full dark mode support via CSS custom properties
|
|
24
57
|
- Apache 2.0 license
|
|
25
58
|
|
|
26
|
-
[0.1.
|
|
59
|
+
[0.1.1]: https://github.com/chesapeakedev/stack/releases/tag/v0.1.1
|
|
60
|
+
[0.1.0]: https://github.com/chesapeakedev/stack/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -17,7 +17,6 @@ system consists of:
|
|
|
17
17
|
- `styles/index.css` that includes Tailwind CSS, design tokens, base styles, and
|
|
18
18
|
component styles
|
|
19
19
|
- `tailwind.preset.ts` for use in `tailwind.config.ts`
|
|
20
|
-
- Peer dependencies declared for any component dependencies
|
|
21
20
|
|
|
22
21
|
## Installation
|
|
23
22
|
|
|
@@ -45,39 +44,7 @@ Import the shared styles in your app's main CSS file (e.g., `src/index.css`):
|
|
|
45
44
|
@import "@chesapeake/stack/styles/index.css";
|
|
46
45
|
```
|
|
47
46
|
|
|
48
|
-
### 3. Configure
|
|
49
|
-
|
|
50
|
-
If you consume the package from source (e.g. in a monorepo), add a path alias so
|
|
51
|
-
imports resolve correctly. When using the published npm package, use the package
|
|
52
|
-
name in place of `@chesapeake/stack` in the examples below.
|
|
53
|
-
|
|
54
|
-
**Vite** (`vite.config.ts`):
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
import path from "path";
|
|
58
|
-
|
|
59
|
-
export default defineConfig({
|
|
60
|
-
resolve: {
|
|
61
|
-
alias: {
|
|
62
|
-
"@shared": path.resolve(__dirname, "../stack"),
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**TypeScript** (`tsconfig.json`):
|
|
69
|
-
|
|
70
|
-
```json
|
|
71
|
-
{
|
|
72
|
-
"compilerOptions": {
|
|
73
|
-
"paths": {
|
|
74
|
-
"@shared/*": ["../stack/*"]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 4. Configure Tailwind
|
|
47
|
+
### 3. Configure Tailwind
|
|
81
48
|
|
|
82
49
|
Extend your `tailwind.config.ts` with the shared preset:
|
|
83
50
|
|
|
@@ -96,7 +63,7 @@ const config: Config = {
|
|
|
96
63
|
export default config;
|
|
97
64
|
```
|
|
98
65
|
|
|
99
|
-
###
|
|
66
|
+
### 4. Configure Tailwind Content
|
|
100
67
|
|
|
101
68
|
Add the package to your Tailwind content configuration so classes are processed:
|
|
102
69
|
|
|
@@ -118,7 +85,7 @@ const config: Config = {
|
|
|
118
85
|
export default config;
|
|
119
86
|
```
|
|
120
87
|
|
|
121
|
-
###
|
|
88
|
+
### 5. Import and Use Components
|
|
122
89
|
|
|
123
90
|
Import and use components in your React components:
|
|
124
91
|
|
|
@@ -172,12 +139,6 @@ import type {
|
|
|
172
139
|
} from "@chesapeake/stack/types/user";
|
|
173
140
|
```
|
|
174
141
|
|
|
175
|
-
### Migrating from an older setup
|
|
176
|
-
|
|
177
|
-
If you previously copied shared CSS or used a different import pattern: remove
|
|
178
|
-
duplicate CSS, switch to the import pattern above, install any missing peer
|
|
179
|
-
dependencies, and test all components.
|
|
180
|
-
|
|
181
142
|
## Usage
|
|
182
143
|
|
|
183
144
|
### Available Components
|
|
@@ -205,14 +166,6 @@ dependencies, and test all components.
|
|
|
205
166
|
- **Page Layout** - `PageContent`, `PageHeader`, `PageLayout` for consistent
|
|
206
167
|
page structure
|
|
207
168
|
|
|
208
|
-
### Design System Features
|
|
209
|
-
|
|
210
|
-
- **Design Tokens**: Consistent color palette, spacing, and typography
|
|
211
|
-
- **Dark Mode**: Built-in dark theme support
|
|
212
|
-
- **Responsive**: Mobile-first responsive design
|
|
213
|
-
- **Accessibility**: ARIA-compliant components
|
|
214
|
-
- **Animations**: Smooth transitions and micro-interactions
|
|
215
|
-
|
|
216
169
|
## Theming
|
|
217
170
|
|
|
218
171
|
This section explains how the shared theme system works and how projects can
|
|
@@ -390,15 +343,6 @@ This means you only need to override the variables you want to change!
|
|
|
390
343
|
6. **Use Tailwind's color utilities** - they automatically use your custom
|
|
391
344
|
variables
|
|
392
345
|
|
|
393
|
-
### Migrating from an Older Theme
|
|
394
|
-
|
|
395
|
-
If you're migrating from the old theme:
|
|
396
|
-
|
|
397
|
-
1. Check which variables your project currently uses
|
|
398
|
-
2. Import `@chesapeake/stack/styles/index.css`
|
|
399
|
-
3. Override only the variables that need to change
|
|
400
|
-
4. Test thoroughly in both light and dark modes
|
|
401
|
-
|
|
402
346
|
### Further Reading
|
|
403
347
|
|
|
404
348
|
- [MDN: CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) -
|
|
@@ -408,33 +352,48 @@ If you're migrating from the old theme:
|
|
|
408
352
|
- [Can I Use: CSS Custom Properties](https://caniuse.com/css-variables) -
|
|
409
353
|
Browser support information
|
|
410
354
|
|
|
411
|
-
##
|
|
355
|
+
## Examples
|
|
356
|
+
|
|
357
|
+
The GitHub repository includes an
|
|
358
|
+
[`examples/`](https://github.com/chesapeakedev/stack/tree/main/examples) folder
|
|
359
|
+
with copy-pasteable React examples covering common patterns. Each example is a
|
|
360
|
+
self-contained `.tsx` file you can drop into any app that has the stack
|
|
361
|
+
installed and configured.
|
|
362
|
+
|
|
363
|
+
| Example | What it covers |
|
|
364
|
+
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
365
|
+
| [`basic-form.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/basic-form.tsx) | Input, Label, Textarea, Select, and Button composed into a working form |
|
|
366
|
+
| [`auth-setup.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/auth-setup.tsx) | Multi-provider authentication with Google and GitHub using MultiAuthProvider |
|
|
367
|
+
| [`page-layout.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/page-layout.tsx) | App shell with StandardLayout, PageLayout, PageHeader, and PageContent |
|
|
368
|
+
| [`theme-customization.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/theme-customization.tsx) | ThemeProvider, useTheme toggle, and a companion `.css` showing token overrides |
|
|
369
|
+
| [`feedback-and-notifications.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/feedback-and-notifications.tsx) | FeedbackDrawer, toast variants (success / error / promise), confirmation Dialog |
|
|
370
|
+
| [`data-display.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/data-display.tsx) | Cards, badges, avatars, tooltips, dropdown menus, and EmptyState |
|
|
371
|
+
| [`user-management.tsx`](https://github.com/chesapeakedev/stack/blob/main/examples/user-management.tsx) | UserSelector multi-select search, FriendList with presence indicators |
|
|
372
|
+
|
|
373
|
+
## Package Contents
|
|
374
|
+
|
|
375
|
+
When installed via npm you get:
|
|
412
376
|
|
|
413
377
|
```
|
|
414
|
-
stack/
|
|
378
|
+
@chesapeake/stack/
|
|
415
379
|
├── components/
|
|
416
|
-
│ ├── ui/
|
|
417
|
-
│ └── ux/
|
|
380
|
+
│ ├── ui/ # Primitive UI components (Button, Input, Card, …)
|
|
381
|
+
│ └── ux/ # Higher-level UX components (auth, layout, feedback)
|
|
418
382
|
├── styles/
|
|
419
|
-
│ ├── index.css
|
|
420
|
-
│ ├── tokens.css
|
|
421
|
-
│ ├── base.css
|
|
422
|
-
│ └── components.css
|
|
383
|
+
│ ├── index.css # Main stylesheet entry point
|
|
384
|
+
│ ├── tokens.css # Design tokens (CSS custom properties)
|
|
385
|
+
│ ├── base.css # Base styles and utilities
|
|
386
|
+
│ └── components.css # Component-specific styles
|
|
423
387
|
├── lib/
|
|
424
|
-
│ └── utils.ts
|
|
425
|
-
├── types/
|
|
426
|
-
├── tailwind.preset.ts
|
|
427
|
-
├──
|
|
428
|
-
|
|
429
|
-
├── public/ # Demo app static assets
|
|
430
|
-
├── Makefile # Lint, validate, add_component
|
|
431
|
-
└── package.json # Package configuration and exports
|
|
388
|
+
│ └── utils.ts # Utility functions (cn, etc.)
|
|
389
|
+
├── types/ # Shared TypeScript types (BaseUser, Friend, …)
|
|
390
|
+
├── tailwind.preset.ts # Tailwind configuration preset
|
|
391
|
+
├── eslint.config.js # Shared ESLint config
|
|
392
|
+
└── prettier.config.js # Shared Prettier config
|
|
432
393
|
```
|
|
433
394
|
|
|
434
|
-
|
|
435
|
-
showcase only; it is not published to npm.
|
|
436
|
-
|
|
437
|
-
# Contributing
|
|
395
|
+
## Contributing
|
|
438
396
|
|
|
439
|
-
See
|
|
440
|
-
|
|
397
|
+
See the
|
|
398
|
+
[CONTRIBUTING.md](https://github.com/chesapeakedev/stack/blob/main/CONTRIBUTING.md)
|
|
399
|
+
on GitHub for development setup, adding shadcn components, and opening PRs.
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright 2026 Chesapeake Computing
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import js from "@eslint/js";
|
|
5
|
+
import globals from "globals";
|
|
6
|
+
import reactHooks from "eslint-plugin-react-hooks";
|
|
7
|
+
import reactRefresh from "eslint-plugin-react-refresh";
|
|
8
|
+
import tseslint from "typescript-eslint";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Shared ESLint configuration for React + TypeScript apps.
|
|
12
|
+
* Uses strict type checking for better type safety.
|
|
13
|
+
*
|
|
14
|
+
* Note: typescript-eslint flat config API may change; see
|
|
15
|
+
* https://typescript-eslint.io for current recommendations.
|
|
16
|
+
*
|
|
17
|
+
* @param {object} parserOptions - TypeScript parser options
|
|
18
|
+
* @param {string[]} parserOptions.project - TypeScript project files (e.g., ["./tsconfig.node.json", "./tsconfig.app.json"])
|
|
19
|
+
* @param {string} parserOptions.tsconfigRootDir - Root directory for tsconfig resolution (use import.meta.dirname from the consuming app)
|
|
20
|
+
*/
|
|
21
|
+
export function createEslintConfig(parserOptions) {
|
|
22
|
+
return tseslint.config(
|
|
23
|
+
{ ignores: ["dist", "node_modules"] },
|
|
24
|
+
{
|
|
25
|
+
extends: [
|
|
26
|
+
js.configs.recommended,
|
|
27
|
+
...tseslint.configs.strictTypeChecked,
|
|
28
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
29
|
+
],
|
|
30
|
+
files: ["**/*.{ts,tsx}"],
|
|
31
|
+
languageOptions: {
|
|
32
|
+
ecmaVersion: 2020,
|
|
33
|
+
globals: globals.browser,
|
|
34
|
+
parserOptions,
|
|
35
|
+
},
|
|
36
|
+
plugins: {
|
|
37
|
+
"react-hooks": reactHooks,
|
|
38
|
+
"react-refresh": reactRefresh,
|
|
39
|
+
},
|
|
40
|
+
rules: {
|
|
41
|
+
...reactHooks.configs.recommended.rules,
|
|
42
|
+
"react-refresh/only-export-components": [
|
|
43
|
+
"warn",
|
|
44
|
+
{ allowConstantExport: true },
|
|
45
|
+
],
|
|
46
|
+
"@typescript-eslint/unified-signatures": "off",
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Default export for ESLint to use when linting this package directly
|
|
53
|
+
export default createEslintConfig({
|
|
54
|
+
project: ["./tsconfig.json"],
|
|
55
|
+
tsconfigRootDir: import.meta.dirname,
|
|
56
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chesapeake/stack",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A simple, reusable React component library and design system built on shadcn/ui with Tailwind CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@10.2.0",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/
|
|
23
|
+
"url": "git+https://github.com/chesapeakedev/stack.git"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://github.com/
|
|
25
|
+
"homepage": "https://github.com/chesapeakedev/stack#readme",
|
|
26
26
|
"bugs": {
|
|
27
|
-
"url": "https://github.com/
|
|
27
|
+
"url": "https://github.com/chesapeakedev/stack/issues"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"components",
|
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"types",
|
|
34
34
|
"index.ts",
|
|
35
35
|
"tailwind.preset.ts",
|
|
36
|
+
"eslint.config.js",
|
|
37
|
+
"prettier.config.js",
|
|
36
38
|
"README.md",
|
|
37
39
|
"LICENSE",
|
|
38
40
|
"CHANGELOG.md"
|
|
@@ -85,7 +87,20 @@
|
|
|
85
87
|
"./components/ux/theme-provider": "./components/ux/theme-provider.tsx",
|
|
86
88
|
"./components/ux/useTheme": "./components/ux/useTheme.ts",
|
|
87
89
|
"./components/ux/FeedbackDrawer": "./components/ux/FeedbackDrawer.tsx",
|
|
90
|
+
"./components/ux/EmptyState": "./components/ux/EmptyState.tsx",
|
|
91
|
+
"./components/ux/FriendList": "./components/ux/FriendList.tsx",
|
|
92
|
+
"./components/ux/FriendRequestList": "./components/ux/FriendRequestList.tsx",
|
|
93
|
+
"./components/ux/SelectedUsersList": "./components/ux/SelectedUsersList.tsx",
|
|
94
|
+
"./components/ux/UserSearch": "./components/ux/UserSearch.tsx",
|
|
95
|
+
"./components/ux/UserSelector": "./components/ux/UserSelector.tsx",
|
|
96
|
+
"./components/ux/StandardLayout": "./components/ux/StandardLayout/index.ts",
|
|
97
|
+
"./components/ux/StandardLayout/PageLayout": "./components/ux/StandardLayout/PageLayout.tsx",
|
|
98
|
+
"./components/ux/StandardLayout/ProfilePage": "./components/ux/StandardLayout/ProfilePage.tsx",
|
|
99
|
+
"./components/ux/StandardLayout/StandardLayout": "./components/ux/StandardLayout/StandardLayout.tsx",
|
|
88
100
|
"./components/ux/auth": "./components/ux/auth/index.ts",
|
|
101
|
+
"./components/ux/auth/MultiAuthProvider": "./components/ux/auth/MultiAuthProvider.tsx",
|
|
102
|
+
"./components/ux/auth/AuthSelector": "./components/ux/auth/AuthSelector.tsx",
|
|
103
|
+
"./components/ux/auth/useAuth": "./components/ux/auth/useAuth.ts",
|
|
89
104
|
"./components/ux/auth/google": "./components/ux/auth/google/index.ts",
|
|
90
105
|
"./components/ux/auth/google/client": "./components/ux/auth/google/client.ts",
|
|
91
106
|
"./components/ux/auth/google/default-client": "./components/ux/auth/google/default-client.ts",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright 2026 Chesapeake Computing
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Shared Prettier configuration for React + TypeScript apps.
|
|
6
|
+
* Import and re-export from your project's prettier.config.js.
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
// Use single quotes for consistency
|
|
10
|
+
singleQuote: false,
|
|
11
|
+
// Use semicolons for better compatibility
|
|
12
|
+
semi: true,
|
|
13
|
+
// Use 2 spaces for indentation
|
|
14
|
+
tabWidth: 2,
|
|
15
|
+
// Use spaces instead of tabs
|
|
16
|
+
useTabs: false,
|
|
17
|
+
// Print width of 80 characters
|
|
18
|
+
printWidth: 80,
|
|
19
|
+
// Trailing commas where valid in ES5 (objects, arrays, etc.)
|
|
20
|
+
trailingComma: "es5",
|
|
21
|
+
// Add spaces between brackets in object literals
|
|
22
|
+
bracketSpacing: true,
|
|
23
|
+
// Put the > of a multi-line JSX element at the end of the last line
|
|
24
|
+
bracketSameLine: false,
|
|
25
|
+
// Arrow function parentheses: always
|
|
26
|
+
arrowParens: "always",
|
|
27
|
+
// End of line: use lf for consistency across platforms
|
|
28
|
+
endOfLine: "lf",
|
|
29
|
+
};
|