New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pluralsight/react

Package Overview
Dependencies
Maintainers
0
Versions
630
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pluralsight/react - npm Package Compare versions

Comparing version 0.6.1 to 0.7.1-experimental-27e9ee-20240731

dist/chunk-2E2MCGW7.js

147

package.json
{
"name": "@pluralsight/react",
"version": "0.6.1",
"version": "0.7.1-experimental-27e9ee-20240731",
"description": "A React component library for Pando.",

@@ -16,62 +16,44 @@ "license": "Apache 2.0",

},
"browserslist": "> 0.25%, not dead",
"sideEffects": false,
"browserslist": "> 0.25%, not dead",
"main": "npm/node/index.js",
"module": "npm/browser/index.js",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"exports": {
".": {
"import": "./npm/browser/index.js",
"require": "./npm/node/index.js",
"types": "./npm/types/src/index.d.ts"
}
},
"publishConfig": {
"access": "public",
"main": "npm/node/index.js",
"module": "npm/browser/index.js",
"types": "npm/types/src/index.d.ts",
"exports": {
".": {
"import": "./npm/browser/index.js",
"require": "./npm/node/index.js",
"types": "./npm/types/src/index.d.ts"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.js"
}
},
"typesVersions": {
"*": {
".": [
"npm/types/src/types.d.ts"
]
}
}
"./icons": {
"types": "./dist/icons/index.d.ts",
"import": "./dist/icons/index.js",
"require": "./dist/icons/index.cjs"
},
"./package.json": "./package.json",
"./styles.css": "./static-css/styles.css"
},
"publishConfig": {
"access": "public"
},
"files": [
"npm/**/*",
"src/**/*"
"src/**/*",
"static-css/**/*",
"dist/**/*"
],
"scripts": {
"build": "yarn clean && yarn compile:types && yarn bundle && yarn clean:allUnused",
"bundle": "rollup --config rollup.config.mjs",
"clean": "yarn clean:bundles && yarn clean:types",
"clean:bundles": "rm -rf ./npm/browser && rm -rf ./npm/node",
"clean:types": "rm -rf ./npm/types",
"clean:allUnused": "yarn clean:unusedFiles && yarn clean:unusedDirs",
"clean:unusedFiles": "rm -rf npm/types/index.js",
"clean:unusedDirs": "yarn clean:unusedDirs:ru && yarn clean:unusedDirs:shared",
"clean:unusedDirs:ru": "rm -rf npm/types/react-utils",
"clean:unusedDirs:shared": "rm -rf npm/types/shared",
"compile:types": "tsc --project tsconfig.build.json",
"lint:js": "eslint --max-warnings 0 \"./**/*.@(ts|tsx)\"",
"lint:ts": "tsc --project tsconfig.json --noEmit",
"test": "echo \"'yarn test' should be run from root directory.\" && exit 1"
},
"dependencies": {
"@floating-ui/react-dom": "^2.0.1",
"@pluralsight/react-aria": "0.6.1-next-385e61",
"@pluralsight/react-utils": "0.6.1-next-385e61",
"tslib": "latest"
"@floating-ui/react": "^0.26.15",
"tslib": "latest",
"@pluralsight/react-utils": "0.0.0",
"@pluralsight/react-aria": "0.0.0",
"@pluralsight/icons": "0.0.0"
},
"peerDependencies": {
"@pluralsight/headless-styles": "*",
"@pluralsight/icons": "*",
"@pandacss/dev": "*",
"@pluralsight/panda-preset": "*",
"react": "*",

@@ -81,45 +63,20 @@ "react-dom": "*"

"devDependencies": {
"@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",
"@pluralsight/headless-styles": "0.6.1-next-385e61",
"@pluralsight/icons": "0.4.1-next-9e4bcc",
"@rollup/plugin-alias": "^5.0.0",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.0",
"@testing-library/dom": "^9.3.1",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/babel__core": "latest",
"@types/babel__preset-env": "latest",
"@types/eslint": "^8",
"@types/jest": "^29.2.5",
"@types/node": "^20.1.7",
"@microsoft/api-extractor": "^7.38.3",
"@pandacss/dev": "^0.42.0",
"@types/react": "latest",
"@types/react-dom": "latest",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"core-js": "^3.30.2",
"eslint": "^8.39.0",
"esbuild-plugin-file-path-extensions": "^2.0.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest-dom": "^5.0.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-sonarjs": "^0.20.0",
"eslint-plugin-testing-library": "^6.0.0",
"identity-obj-proxy": "^3.0.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"rollup": "^3.2.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-node-externals": "^6.0.1",
"typescript": "5.0.4"
"react": "18.3.1",
"react-dom": "18.3.1",
"tsup": "^8.0.1",
"@pando/configs": "0.0.0",
"@pluralsight/headless-styles": "0.0.0",
"@pluralsight/panda-preset": "0.0.0"
},

@@ -139,4 +96,22 @@ "keywords": [

],
"packageManager": "yarn@3.5.0",
"types": "npm/types/src/index.d.ts"
"scripts": {
"build": "NODE_OPTIONS='--max-old-space-size=16384' tsup && pnpm run generate:css",
"clean": "rm -rf ./dist",
"generate:styles": "bun run prepare",
"lint:js": "eslint --max-warnings 0 \"./**/*.@(ts|tsx)\"",
"lint:ts": "pnpm run generate:styles && tsc --project tsconfig.lint.json --noEmit",
"generate:css": "panda cssgen --outfile dist/styles.css",
"test": "jest --passWithNoTests"
},
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
".": [
"./dist/index.d.ts"
],
"./icons": [
"./dist/icons/index.d.ts"
]
}
}
}

@@ -5,2 +5,6 @@ # React

## Contributing
Are you planning on contributing to this package? Please review the [Contributing Guidelines](/CONTRIBUTING.md).
## What role does this package play in Pando?

@@ -30,7 +34,7 @@

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.
This project uses pnPm so there are no setup commands needed. If you get any errors, you may need to run an initial `pnpm install` or ensure you are using Node >= 18.
## Development
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.
We use a custom Vite TS/React sandbox to help keep security issues, complexity, and dependency size down.

@@ -40,3 +44,3 @@ From the **root directory of the project**, run:

```bash
yarn start:react-sandbox
pnpm run start:sandbox
```

@@ -49,3 +53,3 @@

```bash
yarn test
pnpm test packages/react/tests
```

@@ -55,2 +59,6 @@

If you plan on contributing to this project, please take time to read our [CONTRIBUTING.md](https://github.com/pluralsight/pando/blob/main/CONTRIBUTING.md). Pull requests that do not adhere to the requirements in this doc will automatically be flagged and closed.
If you plan on contributing to this project, please take time to read our [CONTRIBUTING.md](https://github.com/ps-dev/pando/blob/main/CONTRIBUTING.md). Pull requests that do not adhere to the requirements in this doc will automatically be flagged and closed.
## v1 Migration TODO
- [ ] Create a new Icon API that is more flexible and user friendly (i.e. `Icon` component - React v19 forces an API change for SSR compatibility)

@@ -6,1 +6,13 @@ import { type ElementType } from 'react'

}
// types
export type Palettes =
| 'action'
| 'neutral'
| 'info'
| 'success'
| 'warning'
| 'danger'
export type Sizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl'

@@ -1,13 +0,8 @@

import type { Dispatch, SetStateAction } from 'react'
import { type UseFloatingReturn } from '@floating-ui/react-dom'
import type { ARROW_DOWN, ARROW_UP } from '../../utils/const.ts'
import type {
FloatingContextValue,
FloatingTriggerKey,
} from 'context/shared/floating.types'
export interface MenuContextValue {
expanded: boolean
export interface MenuContextValue extends FloatingContextValue {
menuId: string
triggerId: string
triggerKey: TriggerKey
setExpanded: Dispatch<SetStateAction<boolean>>
setTriggerKey: Dispatch<SetStateAction<TriggerKey>>
floating: UseFloatingReturn
}

@@ -17,2 +12,2 @@

export type TriggerKey = typeof ARROW_DOWN | typeof ARROW_UP | null
export type TriggerKey = FloatingTriggerKey
import { useId, useMemo } from 'react'
import { initialAlertOptions } from './alert.actions.ts'
import type { AlertOptions } from './alert.types.ts'
import { initialAlertOptions } from './alert.actions'
import type { AlertOptions } from './alert.types'
export interface InitialAlertOptions extends AlertOptions {
bodyId: string
headingId: string
}
export function useInitialAlertOptions(
options: AlertOptions = initialAlertOptions
) {
options: AlertOptions = initialAlertOptions,
): InitialAlertOptions {
const headingId = useId()

@@ -17,4 +22,4 @@ const bodyId = useId()

}),
[options, headingId, bodyId]
[options, headingId, bodyId],
)
}
import type { ConfirmDialogOptions } from '@pluralsight/headless-styles/types'
import { ADD, REMOVE } from './alert.actions.ts'
import { ADD, REMOVE } from './alert.actions'

@@ -11,2 +11,4 @@ export interface AlertOptions

promptValidationKey?: string
confirmText?: string
cancelText?: string
}

@@ -13,0 +15,0 @@

import { type Dispatch } from 'react'
import { ToastActions, ToastProps } from './types.ts'
import { ToastActions, ToastProps } from './types'

@@ -22,3 +22,3 @@ export const SHOW = 'SHOW'

state: ToastProps,
action: ToastActions
action: ToastActions,
): ToastProps {

@@ -36,3 +36,3 @@ switch (action.type) {

onAction: undefined,
sentiment: 'info',
palette: 'info',
}

@@ -39,0 +39,0 @@

@@ -1,4 +0,3 @@

import type { ToastOptions } from '@pluralsight/headless-styles/types'
import { SHOW, DISMISS } from './reducer.ts'
import { type ToastElProps } from '../../components/toast'
import { SHOW, DISMISS } from './reducer'
export interface ToastContextProps {

@@ -8,7 +7,7 @@ show: (props: ToastProps) => void

export interface ToastProps extends ToastOptions {
export interface ToastProps extends ToastElProps {
mount?: HTMLElement
duration?: number
heading?: string
text: string
onAction?: () => void
}

@@ -15,0 +14,0 @@

import { type KeyboardEvent } from 'react'
import { ARROW_DOWN, ARROW_UP, END, HOME } from '../../utils/const.ts'
import type { MenuNavKeys } from './types.ts'
import { ARROW_DOWN, ARROW_UP, END, HOME } from '../../utils/const'
import type { MenuNavKeys } from './types'

@@ -13,3 +13,3 @@ const menuItemSelector = '[role="menuitem"]'

event: KeyboardEvent<Element>,
menuListSignal: () => HTMLElement | null
menuListSignal: () => HTMLElement | null,
) {

@@ -37,3 +37,3 @@ if (isPrintableCharacter(event.key)) {

length: number,
key: MenuNavKeys
key: MenuNavKeys,
) {

@@ -61,3 +61,3 @@ switch (key) {

currentFocus: number,
key: MenuNavKeys
key: MenuNavKeys,
) {

@@ -74,3 +74,3 @@ const items = menuList.querySelectorAll(menuItemSelector)

menuListSignal: MenuListSignal,
key: MenuNavKeys = ARROW_DOWN
key: MenuNavKeys = ARROW_DOWN,
) {

@@ -80,3 +80,3 @@ if (menuListSignal()) {

const currentFocus = Array.from(
menuList.querySelectorAll(menuItemSelector)
menuList.querySelectorAll(menuItemSelector),
).findIndex((item) => item === document.activeElement)

@@ -90,3 +90,3 @@

menuListSignal: MenuListSignal,
key: MenuNavKeys = ARROW_DOWN
key: MenuNavKeys = ARROW_DOWN,
) {

@@ -93,0 +93,0 @@ if (menuListSignal()) {

@@ -1,2 +0,2 @@

import { ARROW_DOWN, ARROW_UP, END, HOME } from '../../utils/const.ts'
import { ARROW_DOWN, ARROW_UP, END, HOME } from '../../utils/const'

@@ -3,0 +3,0 @@ export type MenuNavKeys =

@@ -0,4 +1,6 @@

'use client'
import { useMemo, type KeyboardEvent, useEffect, useCallback } from 'react'
import { useMenu } from '../../context/Menu/context.tsx'
import { ESCAPE, ARROW_DOWN, ARROW_UP, HOME, END } from '../../utils/const.ts'
import { useMenu } from '../../context/Menu/context'
import { ESCAPE, ARROW_DOWN, ARROW_UP, HOME, END } from '../../utils/const'
import {

@@ -8,3 +10,3 @@ handleArrowKeys,

handleTriggerArrowKeys,
} from './helpers.ts'
} from './helpers'

@@ -16,3 +18,3 @@ export function useMenuListInteraction() {

() => floating.elements.reference as HTMLElement,
[floating.elements.reference]
[floating.elements.reference],
)

@@ -22,3 +24,3 @@

() => floating.elements.floating,
[floating.elements.floating]
[floating.elements.floating],
)

@@ -25,0 +27,0 @@

import { type KeyboardEvent, useMemo } from 'react'
import { useMenu } from '../../context/Menu/context.tsx'
import { ESCAPE, ARROW_DOWN, ARROW_UP } from '../../utils/const.ts'
import { useMenu } from '../../context/Menu/context'
import { ESCAPE, ARROW_DOWN, ARROW_UP } from '../../utils/const'

@@ -5,0 +5,0 @@ export function useMenuTriggerInteraction() {

// UI kit
export * from './components/Admonition.tsx'
export * from './components/AlertDialog/sections.tsx'
export * from './components/AlertDialog/actions.tsx'
export * from './components/AlertDialog/text.tsx'
export * from './components/Avatar.tsx'
export * from './components/Badge.tsx'
export * from './components/Button.tsx'
export * from './components/Checkbox.tsx'
export * from './components/CircularProgress.tsx'
export * from './components/ErrorMessage.tsx'
export * from './components/FieldMessage.tsx'
export * from './components/Fieldset.tsx'
export * from './components/Flex.tsx'
export * from './components/Grid.tsx'
export * from './components/Icon.tsx'
export * from './components/IconButton.tsx'
export * from './components/Input.tsx'
export * from './components/Label.tsx'
export * from './components/Menu/actions.tsx'
export * from './components/Menu/sections.tsx'
export * from './components/ProgressBar.tsx'
export * from './components/Radio.tsx'
export * from './components/Select.tsx'
export * from './components/Skeleton.tsx'
export * from './components/tabs.tsx'
export * from './components/Table.tsx'
export * from './components/Tag.tsx'
export * from './components/Textarea.tsx'
export * from './components/TextLink.tsx'
export * from './components/Toast.tsx'
export * from './components/Toggle.tsx'
export * from './components/Admonition'
export * from './components/AlertDialog/actions'
export * from './components/AlertDialog/sections'
export * from './components/AlertDialog/text'
export * from './components/Avatar'
export * from './components/Badge'
export * from './components/Button'
export * from './components/Checkbox'
export * from './components/CircularProgress'
export * from './components/FieldMessage'
// export * from './components/Fieldset'
export * from './components/Flex'
// export * from './components/Grid'
// export * from './components/Icon'
export * from './components/IconButton'
export * from './components/Input'
export * from './components/Label'
// export * from './components/Menu/actions'
// export * from './components/Menu/sections'
export * from './components/Popover/sections'
export * from './components/Popover/actions'
export * from './components/ProgressBar'
export * from './components/Radio'
// export * from './components/Select'
export * from './components/Skeleton'
// export * from './components/tabs'
export * from './components/Table'
export * from './components/Tag'
export * from './components/Textarea'
export * from './components/TextLink'
export * from './components/toast'
export * from './components/Tooltip'
export * from './components/Toggle'
export * from './components/shared/types'
// context
export * from './context/Confirm/context.tsx'
export * from './context/FormControl.tsx'
export * from './context/Menu/context.tsx'
export * from './context/Prompt/context.tsx'
export * from './context/TabsContext.tsx'
export * from './context/Toast/context.tsx'
// export * from './context/Confirm/context'
export * from './context/FormControl'
// export * from './context/Menu/context'
// export * from './context/Popover/context'
export * from './context/ConfirmDialog/context'
export * from './context/PromptDialog/context'
// export * from './context/TabsContext'
export * from './context/Toast/context'
export * from './context/Toast/types'
export * from './context/shared/alert.hooks'
export * from './context/shared/alert.actions'
export * from './context/shared/alert.types'
// utility components
export * from './components/For.tsx'
export * from './components/Portal.tsx'
export * from './components/Show.tsx'
export * from './components/For'
export * from './components/Portal'
export * from './components/Show'
// hooks
export * from './hooks/menu/useMenuTriggerInteraction.ts'
export * from './hooks/menu/useMenuListInteraction.ts'
// export * from './hooks/menu/useMenuTriggerInteraction'
// export * from './hooks/menu/useMenuListInteraction'
export * from './hooks/useTheme'
// helpers
export * from './helpers/avatar.helpers'
export * from './helpers/badge.helpers'
export * from './helpers/button.helpers'
export * from './helpers/circularProgress.helpers'
export * from './helpers/input.helpers'
export * from './helpers/label.helpers'
export * from './helpers/textLink.helpers'
export * from './hooks/helpers/themeHelpers'
// external
export {
useAutoFormatDate,
useIsIndeterminate,
useTheme,
} from '@pluralsight/react-utils'
// extra types
export type { CustomThemes } from '@pluralsight/react-utils/types'
export { useAutoFormatDate, useIsIndeterminate } from '@pluralsight/react-utils'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc