@pluralsight/react
Advanced tools
Comparing version 0.0.0 to 0.4.1-experimental-0c2d86-20230503
@@ -1,2 +0,2 @@ | ||
export { itWorks as unsafe_itWorks } from './src/index.js'; | ||
export { Test as unsafe_Test } from './src/components/Test.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -5,7 +5,7 @@ 'use strict'; | ||
const index = require('./src/index.js'); | ||
const Test = require('./src/components/Test.js'); | ||
exports.unsafe_itWorks = index.itWorks; | ||
exports.unsafe_Test = Test.Test; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pluralsight/react", | ||
"version": "0.0.0", | ||
"version": "0.4.1-experimental-0c2d86-20230503", | ||
"description": "A React component library for Pando.", | ||
@@ -15,2 +15,5 @@ "main": "npm/node/index.js", | ||
"types": "./npm/types/types.d.ts" | ||
}, | ||
"./dev": { | ||
"import": "./src/index.ts" | ||
} | ||
@@ -29,2 +32,3 @@ }, | ||
"sideEffects": false, | ||
"browserslist": "> 0.25%, not dead", | ||
"scripts": { | ||
@@ -42,2 +46,3 @@ "build": "yarn clean && yarn compile:types && yarn bundle && yarn clean:allUnused", | ||
"compile:types": "tsc --project tsconfig.build.json", | ||
"lint:js": "eslint --max-warnings 0 \"./**/*.@(ts|tsx)\"", | ||
"lint:ts": "tsc --project tsconfig.json --noEmit", | ||
@@ -50,10 +55,9 @@ "test": "echo \"'yarn test' should be run from root directory.\" && exit 1" | ||
"devDependencies": { | ||
"@babel/core": "latest", | ||
"@babel/plugin-transform-runtime": "^7.19.6", | ||
"@babel/preset-env": "latest", | ||
"@babel/preset-react": "latest", | ||
"@babel/preset-typescript": "latest", | ||
"@babel/core": "^7.21.5", | ||
"@babel/preset-env": "^7.21.5", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.21.5", | ||
"@babel/runtime": "^7.20.13", | ||
"@rollup/plugin-alias": "^4.0.0", | ||
"@rollup/plugin-babel": "^6.0.0", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-commonjs": "^23.0.0", | ||
@@ -67,4 +71,4 @@ "@rollup/plugin-node-resolve": "^15.0.0", | ||
"@types/babel__core": "latest", | ||
"@types/babel__plugin-transform-runtime": "^7", | ||
"@types/babel__preset-env": "latest", | ||
"@types/eslint": "^8", | ||
"@types/jest": "^29.2.5", | ||
@@ -75,2 +79,14 @@ "@types/node": "^18.11.18", | ||
"@types/testing-library__jest-dom": "^5", | ||
"@typescript-eslint/eslint-plugin": "^5.59.2", | ||
"@typescript-eslint/parser": "^5.59.2", | ||
"eslint": "^8.39.0", | ||
"eslint-import-resolver-typescript": "^3.5.5", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jest": "^27.2.1", | ||
"eslint-plugin-jest-dom": "^4.0.3", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-sonarjs": "^0.19.0", | ||
"eslint-plugin-testing-library": "^5.10.3", | ||
"identity-obj-proxy": "^3.0.0", | ||
@@ -98,4 +114,3 @@ "react": "18.2.0", | ||
"components", | ||
"ui components", | ||
"pluralsight" | ||
"ui components" | ||
], | ||
@@ -117,2 +132,2 @@ "publishConfig": { | ||
"packageManager": "yarn@3.5.0" | ||
} | ||
} |
# React | ||
A library of custom React hooks that help manage advanced React features like State and accessbility. | ||
A library of React components and hooks that help manage advanced React features like State and accessibility. | ||
- [Checkout the docs](design.pluralsight.com/development/react-utils) | ||
## What role does this package play in Pando? | ||
@@ -14,2 +12,3 @@ | ||
PANDO ||--o{ HEADLESS-STYLES : contains | ||
PANDO ||--o{ REACT : contains | ||
PANDO ||--o{ REACT-UTILS : contains | ||
@@ -19,19 +18,19 @@ DESIGN-TOKENS ||..|{ NORMALIZE-SETUP : contains | ||
HEADLESS-STYLES ||--|{ DESIGN-TOKENS : uses | ||
REACT ||--|{ HEADLESS-STYLES : uses | ||
REACT ||--|{ REACT-UTILS : uses | ||
``` | ||
This package utilizes the latest version of React to export custom hooks to use along with [Headless Styles](https://design.pluralsight.com/docs/next/development/headless-styles/intro) or independently from Pando. | ||
This package utilizes the latest version of React to deliver component-based abstractions, helpers, and hooks of the Headless-styles library. | ||
### React Utils General Function | ||
### React General Function | ||
The react-utils package is independant from the Pando sister libraries, but works cohesively when combined with them. It's true purpose is to provide custom hooks that successfully work along side Headless Styles within the Pando Normalize system (i.e. themes, etc.). | ||
The react package is dependant on the Headless-styles library, and works cohesively with the other libraries when combined with them. It's true purpose is to provide a component and hook library within the Pando Normalize system (i.e. themes, etc.). | ||
However, most if not all custom hooks should work successfully outside of Pando due to the nature of its design. | ||
## Install | ||
This project uses Yarn 3 with PnP so there are no setup commands needed. If you get any errors, you may need to run an initial `yarn install` or esnure you are using Node >= 18. | ||
This project uses Yarn 3 with PnP so there are no setup commands needed. If you get any errors, you may need to run an initial `yarn install` or ensure you are using Node >= 18. | ||
## Development | ||
There is no development sandbox for this specific project, but most of the time, we import the hooks into the [Headless Styles sandbox](https://github.com/pluralsight/pando/tree/main/packages/headless-styles/sandbox) which is [just as easy](https://github.com/pluralsight/pando/blob/main/packages/headless-styles/sandbox/src/components/Tabs.jsx#L2-L8). | ||
We utilize a Vite TS/React sandbox to help keep security issues, complexity, and dependency size down which is a common problem when using a tool like Storybook. | ||
@@ -41,3 +40,3 @@ From the **root directory of the project**, run: | ||
```bash | ||
yarn start:sandbox | ||
yarn start:react-sandbox | ||
``` | ||
@@ -44,0 +43,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38393
14
27
40
52