Skip to content

Commit ded19d2

Browse files
Concorde update
0 parents  commit ded19d2

File tree

373 files changed

+31590
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+31590
-0
lines changed

.eslintrc.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
parser: "@typescript-eslint/parser"
3+
extends:
4+
- "@epilot/eslint-config-react"
5+
- "plugin:@typescript-eslint/recommended"
6+
- "plugin:prettier/recommended"
7+
- "plugin:storybook/recommended"
8+
- "prettier"
9+
- "plugin:oxlint/recommended"
10+
env:
11+
jest: true
12+
settings:
13+
import/resolver:
14+
node:
15+
extensions:
16+
- ".js"
17+
- ".jsx"
18+
- ".ts"
19+
- ".tsx"
20+
paths:
21+
- src
22+
typescript: true
23+
parserOptions:
24+
ecmaVersion: 2020
25+
sourceType: module
26+
ecmaFeatures:
27+
jsx: true
28+
ignorePatterns:
29+
- "/node_modules/*"
30+
- "/dist/*"
31+
- "**/*.module.scss.d.ts"
32+
rules:
33+
"no-console": "error"
34+
"@typescript-eslint/consistent-type-imports": "error"
35+
"@typescript-eslint/ban-types": "off"
36+
"prettier/prettier": "error"
37+
"@typescript-eslint/no-unused-vars-experimental": "off"

.github/workflows/node.js.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Install Dependencies
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
branches: ["main"]
11+
12+
jobs:
13+
install-dependencies:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [22.x]
19+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
- run: npm i --force

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.log
2+
.DS_Store
3+
node_modules
4+
storybook-static
5+
.cache
6+
dist
7+
.vscode
8+
.idea
9+
.eslintcache
10+
.npmrc
11+
test-report.xml
12+
.yarn
13+
build-storybook.log
14+
**/*.module.scss.d.ts
15+
16+
*storybook.log

.storybook/main.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
3+
import { join, dirname } from "path";
4+
5+
/**
6+
* This function is used to resolve the absolute path of a package.
7+
* It is needed in projects that use pnpm PnP or are set up within a monorepo.
8+
*/
9+
function getAbsolutePath(value: string): any {
10+
return dirname(require.resolve(join(value, "package.json")));
11+
}
12+
const config: StorybookConfig = {
13+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
14+
addons: [
15+
getAbsolutePath("@storybook/addon-links"),
16+
getAbsolutePath("@storybook/addon-essentials"),
17+
getAbsolutePath("@chromatic-com/storybook"),
18+
getAbsolutePath("@storybook/addon-interactions"),
19+
getAbsolutePath("@storybook/addon-a11y"),
20+
],
21+
framework: {
22+
name: getAbsolutePath("@storybook/react-vite"),
23+
options: {},
24+
},
25+
docs: {
26+
autodocs: "tag",
27+
},
28+
async viteFinal(config) {
29+
const { mergeConfig } = await import('vite');
30+
return mergeConfig(config, {
31+
optimizeDeps: {
32+
exclude: ['axios'],
33+
},
34+
});
35+
},
36+
};
37+
export default config;

.storybook/preview.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { Preview } from '@storybook/react'
2+
// Imports styles for story only because journey-app has styles already
3+
import 'material-symbols/sharp.css'
4+
import 'material-symbols/rounded.css'
5+
import '../src/global.css'
6+
import 'react-datepicker/dist/react-datepicker.css'
7+
8+
const preview: Preview = {
9+
tags: ['autodocs']
10+
}
11+
12+
export default preview

AGENTS.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# AGENTS.md
2+
3+
## Project Overview
4+
5+
Component library providing reusable UI components for Journeys. This is a published package that includes Storybook for component documentation and visual testing.
6+
7+
## Project Structure
8+
9+
- **Components**: `src/components/` - Components definition
10+
- **Stories**: `src/stories/` - Storybook stories for components
11+
- **Utils**: `src/utils/` - Shared utilities
12+
13+
## Tech Stack
14+
15+
- **Framework**: React 18+ with TypeScript as peer dependency
16+
- **Build and tests**: Vite, Vitest and Storybook with a11y addon for accessibility tests
17+
- **Styling**: SCSS modules with typescript definitions
18+
- **Component primitives**: Radix UI for accessible primitives
19+
- **Animation**: Motion (Framer Motion) for animations
20+
- **Form management**: React Hook Form support
21+
22+
## Commands
23+
24+
```bash
25+
pnpm install # Install dependencies
26+
pnpm check # Run lint, tests and storybook build to verify changes
27+
pnpm storybook # Run storybook (http://localhost:6006)
28+
pnpm build:package # Production build
29+
pnpm build:storybook # Builds storybook
30+
pnpm lint # Check formatting with ESLint and Prettier
31+
pnpm lint:fix # Automatically resolve lint errors
32+
pnpm test # Run unit tests
33+
pnpm changelog # Generate changelog
34+
pnpm release # Release new package version
35+
```
36+
37+
## Code Style Guidelines
38+
39+
- Use TypeScript strict mode
40+
- Use modern and idiomatic syntax
41+
- Component interfaces need to be accessible and meet [WCAG standards](https://www.w3.org/WAI/standards-guidelines/wcag/)
42+
- Prefer Radix UI primitives as a base for new components
43+
- Use `import type { ... }` for type-only imports
44+
- Use specific imports to improve tree shaking
45+
46+
### Development Workflow
47+
48+
1. **Start Storybook**: `pnpm storybook` to develop components interactively
49+
2. **Write components**: In `src/components/ComponentName/`
50+
3. **Declare types**: Declare component types in co-colated `types.ts` file
51+
4. **Style**: Style components in co-colated SCSS modules, generate TypeScript definitions
52+
5. **Document**: Create stories in `src/stories/` or co-located
53+
6. **Test**: Write Vitest tests for component logic and accessibility requirements
54+
7. **Build**: Test package build with `pnpm build:package`
55+
56+
## Publishing Workflow
57+
58+
1. **Make changes**: Update components, add tests, update stories, commit
59+
2. **Verify changes**: `pnpm check` to verify changes
60+
3. **Publish**: Ask for confirmation, then `pnpm release` (publishes to npm)
61+
62+
## Important Notes
63+
64+
- **Published**: This package is published to npm (MIT license)
65+
- **Versioning**: Uses semantic versioning (patch version auto-bumped on publish)
66+
- **Changelog**: Are auto-generated from commits
67+
- **Storybook**: Primary development and documentation tool
68+
69+
## Other
70+
71+
- See root `AGENTS.md` for monorepo-wide context

0 commit comments

Comments
 (0)