Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1. Always use latest React 19 version and TypeScript for our ReactJS development. Always show examples and reference the latest version of React in your responses. If in doubt, use docs from https://react.dev/learn
2. Always use React router, MUI latest components for React development
3. Always use functional components and hooks for state management in React
4. Always use TypeScript for type safety in React components
5. Always use the latest best practices for performance optimization in React, such as memoization and lazy loading
6. Always ensure accessibility standards are met in React components
7. Always use ESLint and Prettier for code formatting and linting in React projects
8. Always provide clear and concise comments in the code to explain complex logic or important decisions
9. Always use PropTypes or TypeScript interfaces for defining component props
10. Always ensure that components are reusable and modular, following the DRY (Don't Repeat Yourself) principle

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "@js-smart/react-kit",
"version": "5.5.0",
"version": "5.8.0",
"license": "MIT",
"private": false,
"type": "module",
"scripts": {
"nx": "nx",
"start": "nx serve",
Expand All @@ -13,14 +14,14 @@
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^7.1.0",
"@mui/material": "^7.1.0",
"@mui/x-data-grid": "^8.2.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^7.2.0",
"@mui/material": "^7.2.0",
"@mui/x-data-grid": "^7.29.7",
"date-fns": "^4.1.0",
"react": "^18.3.1 || ^19.0.0",
"react-dom": "^18.3.1 || ^19.0.0",
"react-router-dom": "^7.5.3"
"react-router-dom": "^7.6.3"
},
"devDependencies": {
"@babel/core": "^7.27.1",
Expand Down
197 changes: 119 additions & 78 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions react-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "@js-smart/react-kit",
"private": false,
"version": "5.5.0",
"version": "5.8.0",
"main": "./index.js",
"types": "./index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/icons-material": "^6.3.0",
"@mui/lab": "^6.0.0-beta.21",
"@mui/material": "^6.3.0",
"@emotion/styled": "^11.14.1",
"@mui/icons-material": "^7.2.0",
"@mui/material": "^7.2.0",
"date-fns": "^4.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.1.1"
"react": "^18.3.1 || ^19.0.0",
"react-dom": "^18.3.1 || ^19.0.0",
"react-router-dom": "^7.6.3"
},
"exports": {
".": {
Expand All @@ -30,7 +30,7 @@
},
"author": {
"name": "Pavan Kumar Jadda",
"email": "contactdeveloperpj@gmail.com"
"email": "contact@pavankjadda.dev"
},
"keywords": [
"react",
Expand Down
9 changes: 8 additions & 1 deletion react-kit/src/lib/components/NextLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ import React from 'react';
import { Link as MuiLink } from '@mui/material';
import { Link } from 'react-router-dom';

interface Props {
href: string;
linkText?: string;
target?: string;
children?: React.ReactNode;
}

/**
* Reusable custom Next.js 13 Link component.
*
Expand All @@ -10,7 +17,7 @@ import { Link } from 'react-router-dom';
* @author Pavan Kumar Jadda
* @since 0.3.2
*/
export function NextLink(props: { href: string; linkText?: string; target?: string; children?: React.ReactNode }): React.JSX.Element {
export function NextLink(props: Readonly<Props>): React.JSX.Element {
return (
<MuiLink component={Link} to={props.href} className={'next-btn-link'} underline="hover">
{props.linkText ?? props.children}
Expand Down
4 changes: 2 additions & 2 deletions react-kit/src/lib/components/OpenInNewIconLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Icon, Link as MuiLink } from '@mui/material';
import React from 'react';
import { Link } from 'react-router-dom';

interface OpenInNewIconLinkProps {
interface Props {
href: string;
linkText: string;
target: string;
Expand All @@ -18,7 +18,7 @@ interface OpenInNewIconLinkProps {
* @author Pavan Kumar Jadda
* @since 1.2.24
*/
export function OpenInNewIconLink(props: OpenInNewIconLinkProps) {
export function OpenInNewIconLink(props: Readonly<Props>) {
return (
<MuiLink
component={Link}
Expand Down
2 changes: 1 addition & 1 deletion react-kit/src/lib/components/buttons/EditIconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface EditIconButtonProps {
color?: 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
}

export function EditIconButton(props: EditIconButtonProps) {
export function EditIconButton(props: Readonly<EditIconButtonProps>) {
return (
<Tooltip title={props.tooltipTitle}>
<IconButton
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"moduleResolution": "bundler",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
Expand Down