one-north-cla 0.0.6 → 0.0.10

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/README.md CHANGED
@@ -41,11 +41,11 @@ npm run build
41
41
  ```
42
42
  OneNorthCLA/
43
43
  ├── src/
44
- │ ├── components/
45
- │ │ ├── composites/
44
+ │ ├── components/
45
+ │ │ ├── composites/
46
46
  │ │ │ ├── ContentCarouselMultiple/
47
47
  │ │ │ └──ContentPrimaryFeatureDetail/
48
- │ │ └── foundations/
48
+ │ │ └── foundations/
49
49
  │ │ ├── BackgroundVideo/
50
50
  │ │ ├── Button/
51
51
  │ │ ├── ButtonSocial/
@@ -57,6 +57,8 @@ OneNorthCLA/
57
57
  │ │ ├── hooks/
58
58
  │ │ └── utils/
59
59
  │ └── assets/ # Static assets
60
+ ├── docs/ # Documentation
61
+ │ └── TESTING.md # Testing guide
60
62
  └── public/ # Public assets
61
63
  ```
62
64
 
@@ -76,8 +78,6 @@ This project follows a clean architecture pattern that separates concerns:
76
78
  3. **Type Safety**: Full TypeScript support throughout the codebase
77
79
  4. **Storybook Integration**: Comprehensive documentation and testing via Storybook
78
80
 
79
- ## 🧩 Available Components
80
-
81
81
  ## 🛠️ Development
82
82
 
83
83
  ### Prerequisites
@@ -93,12 +93,19 @@ This project follows a clean architecture pattern that separates concerns:
93
93
  npm run dev # Start Vite dev server
94
94
  npm run storybook # Start Storybook
95
95
 
96
+ # Testing
97
+ npm test # Run tests in watch mode
98
+ npm run test:run # Run tests once (CI mode)
99
+ npm run test:coverage # Run tests with coverage
100
+ npm run test:ui # Run tests with interactive UI
101
+
96
102
  # Building
97
103
  npm run build # Build for production
98
104
  npm run build-storybook # Build Storybook
99
105
 
100
106
  # Quality
101
107
  npm run lint # Run ESLint
108
+ npm run lint:strict # Run ESLint with no warnings allowed
102
109
  npm run preview # Preview production build
103
110
  npm run type-check # Run TSC
104
111
  ```
@@ -120,6 +127,7 @@ npm run type-check # Run TSC
120
127
 
121
128
  - **Storybook**: Run `npm run storybook` for interactive component documentation
122
129
  - **TypeScript**: Full type definitions for all components
130
+ - **Testing**: See [docs/TESTING.md](./docs/TESTING.md) for testing guide and best practices
123
131
 
124
132
  ## 🔧 Configuration
125
133
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "one-north-cla",
3
- "version": "0.0.6",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -25,29 +25,35 @@
25
25
  "dev": "vite",
26
26
  "build": "vite build",
27
27
  "lint": "eslint .",
28
- "lint:strict": "eslint . --max-warnings=0",
28
+ "lint:strict": "eslint 'src/**/*.{ts,tsx}' --ignore-pattern '**/*.test.*' --max-warnings=0 && eslint 'src/**/*.test.{ts,tsx}'",
29
29
  "preview": "vite preview",
30
30
  "storybook": "storybook dev -p 6006",
31
31
  "build-storybook": "storybook build",
32
32
  "prepare": "husky",
33
- "type-check": "tsc -b --noEmit"
33
+ "type-check": "tsc -b --noEmit",
34
+ "test": "vitest",
35
+ "test:ui": "vitest --ui",
36
+ "test:run": "vitest run",
37
+ "test:coverage": "vitest run --coverage"
34
38
  },
35
39
  "peerDependencies": {
36
40
  "react": ">=18",
37
41
  "react-dom": ">=18"
38
42
  },
39
43
  "dependencies": {
44
+ "@ark-ui/react": "^5.34.1",
45
+ "@radix-ui/react-dialog": "^1.1.15",
40
46
  "@radix-ui/react-popover": "^1.1.15",
47
+ "@radix-ui/react-select": "^2.2.6",
41
48
  "@radix-ui/react-slot": "^1.2.4",
42
49
  "@sitecore-jss/sitecore-jss-react": "^22.7",
50
+ "@types/jest": "^30.0.0",
43
51
  "@vimeo/player": "^2.30.1",
44
52
  "class-variance-authority": "^0.7.1",
45
53
  "clsx": "^2.1.1",
46
- "common-tags": "^1.8.2",
47
54
  "embla-carousel-react": "^8.6.0",
48
55
  "lucide-react": "^0.562.0",
49
56
  "tailwind-merge": "^3.4.0",
50
- "uuid": "^11.1.0",
51
57
  "youtube-player": "^5.6.0"
52
58
  },
53
59
  "devDependencies": {
@@ -55,6 +61,9 @@
55
61
  "@storybook/addon-docs": "^10.1.10",
56
62
  "@storybook/react-vite": "^10.1.10",
57
63
  "@tailwindcss/vite": "^4.1.7",
64
+ "@testing-library/jest-dom": "^6.9.1",
65
+ "@testing-library/react": "^16.3.2",
66
+ "@testing-library/user-event": "^14.6.1",
58
67
  "@types/common-tags": "^1.8.4",
59
68
  "@types/node": "^24.0.10",
60
69
  "@types/react": "^19.1.2",
@@ -64,6 +73,7 @@
64
73
  "@typescript-eslint/eslint-plugin": "^8.50.1",
65
74
  "@typescript-eslint/parser": "^8.50.1",
66
75
  "@vitejs/plugin-react": "^4.4.1",
76
+ "@vitest/ui": "^4.0.18",
67
77
  "ajv": "^8",
68
78
  "ajv-draft-04": "^1",
69
79
  "ajv-keywords": "^5",
@@ -75,8 +85,10 @@
75
85
  "eslint-plugin-react-hooks": "^7.0.1",
76
86
  "eslint-plugin-react-refresh": "^0.4.19",
77
87
  "eslint-plugin-storybook": "^10.1.10",
88
+ "eslint-plugin-testing-library": "^7.15.4",
78
89
  "globals": "^16.0.0",
79
90
  "husky": "^9.1.7",
91
+ "jsdom": "^28.0.0",
80
92
  "lint-staged": "^16.2.7",
81
93
  "prettier": "^3.7.4",
82
94
  "storybook": "^10.1.10",
@@ -86,12 +98,14 @@
86
98
  "typescript-eslint": "^8.30.1",
87
99
  "vite": "^6.3.5",
88
100
  "vite-plugin-dts": "^4.5.4",
89
- "vite-plugin-svgr": "^4.3.0"
101
+ "vite-plugin-svgr": "^4.3.0",
102
+ "vitest": "^4.0.18"
90
103
  },
91
104
  "lint-staged": {
92
105
  "*.{ts,tsx,js,jsx}": [
93
- "eslint --fix --max-warnings=0",
94
- "prettier --write"
106
+ "bash -c '[[ \"$0\" =~ \\.test\\. ]] && eslint --fix \"$0\" || eslint --fix --max-warnings=0 \"$0\"'",
107
+ "prettier --write",
108
+ "vitest related --run"
95
109
  ]
96
110
  }
97
111
  }