react-compare-slider
Advanced tools
Comparing version 3.0.0-beta.1 to 3.0.0-beta.2
{ | ||
"name": "react-compare-slider", | ||
"version": "3.0.0-beta.1", | ||
"version": "3.0.0-beta.2", | ||
"license": "MIT", | ||
@@ -47,2 +47,12 @@ "repository": { | ||
], | ||
"scripts": { | ||
"dev": "concurrently -k -s first -n \"tsup,ts\" -c \"blue,cyan\" \"tsup --watch\" \"pnpm run check:types --watch --preserveWatchOutput\"", | ||
"build": "pnpm run check:types && NODE_ENV=production tsup", | ||
"release": "pnpm run release:preflight && pnpm run release:publish", | ||
"release:preflight": "cp ../README.md ../LICENSE . && pnpm run -w lint && pnpm run -w test && pnpm run build && pnpm run check", | ||
"release:publish": "release-it", | ||
"check": "concurrently -n \"package,types\" -c \"blue,magenta\" \"pnpm run check:package\" \"pnpm run check:types\"", | ||
"check:package": "attw -P . --ignore-rules cjs-resolves-to-esm && publint", | ||
"check:types": "tsc --noEmit" | ||
}, | ||
"browserslist": { | ||
@@ -65,5 +75,2 @@ "production": [ | ||
}, | ||
"np": { | ||
"pnpm": true | ||
}, | ||
"peerDependencies": { | ||
@@ -74,24 +81,16 @@ "react": ">=16.8", | ||
"devDependencies": { | ||
"@types/node": "^20.8.7", | ||
"@types/react": "^18.2.31", | ||
"@types/node": "^20.8.9", | ||
"@types/react": "^18.2.33", | ||
"@types/react-dom": "^18.2.14", | ||
"browserslist": "^4.22.1", | ||
"concurrently": "^8.2.2", | ||
"esbuild-plugin-browserslist": "^0.9.1", | ||
"np": "^8.0.4", | ||
"esbuild-plugin-browserslist": "^0.10.0", | ||
"publint": "^0.2.5", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"release-it": "^16.2.1", | ||
"tslib": "~2.6.2", | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.2.2" | ||
}, | ||
"scripts": { | ||
"dev": "concurrently -k -s first -n \"tsup,ts\" -c \"blue,cyan\" \"tsup --watch\" \"pnpm run check:types --watch --preserveWatchOutput\"", | ||
"build": "pnpm run check:types && NODE_ENV=production tsup", | ||
"release": "cp ../README.md ../LICENSE . && pnpm run -w lint && pnpm run -w test && pnpm run build && pnpm run check && np --no-tests --no-cleanup", | ||
"check": "concurrently -n \"package,types\" -c \"blue,magenta\" \"pnpm run check:package\" \"pnpm run check:types\"", | ||
"check:package": "attw -P . --ignore-rules cjs-resolves-to-esm && publint", | ||
"check:types": "tsc --noEmit" | ||
} | ||
} | ||
} |
@@ -5,3 +5,3 @@ <div align="center"> | ||
[![Example](https://raw.githubusercontent.com/nerdyman/stuff/main/libs/react-compare-slider/docs/hero.gif)](https://codesandbox.io/s/react-compare-slider-simple-example-9si6l?file=/src/App.jsx) | ||
[![Example](https://raw.githubusercontent.com/nerdyman/stuff/main/libs/react-compare-slider/docs/hero.gif)](https://codesandbox.io/p/sandbox/github/nerdyman/react-compare-slider/tree/main/docs/example?file=/src/App.tsx:1,1) | ||
@@ -31,5 +31,5 @@ <a href="https://github.com/nerdyman/react-compare-slider/blob/main/LICENSE"><img alt="License MIT" src="https://img.shields.io/npm/l/react-compare-slider.svg" /></a> | ||
## Demo | ||
## Demos | ||
- Storybook: [docs](https://react-compare-slider.vercel.app/?path=/docs/docs-introduction--page), [demos](https://react-compare-slider.vercel.app/?path=/story/demos), [custom recipies](https://react-compare-slider.vercel.app/?path=/story/recipies), [custom handles](https://react-compare-slider.vercel.app/?path=/story/handles) | ||
- Storybook: [docs](https://react-compare-slider.vercel.app/?path=/docs/docs-introduction--docs), [demos](https://react-compare-slider.vercel.app/?path=/story/demos), [custom recipes](https://react-compare-slider.vercel.app/?path=/story/recipes), [custom handles](https://react-compare-slider.vercel.app/?path=/story/handles) [`useReactCompareSliderRef`](https://react-compare-slider.vercel.app/?path=/docs/docs-usereactcomparesliderref--docs) | ||
- CodeSandbox: [basic demo](https://codesandbox.io/p/sandbox/github/nerdyman/react-compare-slider/tree/main/docs/example?file=/src/App.tsx:1,1) | ||
@@ -68,4 +68,2 @@ - [Local example](./docs/example) | ||
See the [Images docs](https://react-compare-slider.vercel.app/?path=/docs/docs-images--page) for more information and [demos](https://react-compare-slider.vercel.app/?path=/story/demos--images). | ||
## Props | ||
@@ -75,10 +73,10 @@ | ||
| ---- | ---- | :------: | ------- | ----------- | | ||
| [`boundsPadding`](https://react-compare-slider.vercel.app/?path=/story/docs-bounds-padding--page) | `number` | | `0` | Padding to limit the slideable bounds in pixels on the X-axis (landscape) or Y-axis (portrait). | | ||
| [`changePositionOnHover`](https://react-compare-slider.vercel.app/?path=/story/docs-change-position-on-hover--page) | `boolean` | | `false` | Whether the slider should follow the pointer on hover. | | ||
| [`disabled`](https://react-compare-slider.vercel.app/?path=/story/docs-disabled--page) | `boolean` | | `false` | Whether to disable slider movement (items are still interactable). | | ||
| [`handle`](https://react-compare-slider.vercel.app/?path=/story/docs-handles--page) | `ReactNode` | | `undefined` | Custom handle component. | | ||
| [`boundsPadding`](https://react-compare-slider.vercel.app/?path=/story/demos--bounds-padding) | `number` | | `0` | Padding to limit the slideable bounds in pixels on the X-axis (landscape) or Y-axis (portrait). | | ||
| [`changePositionOnHover`](https://react-compare-slider.vercel.app/?path=/story/demos--change-position-on-hover) | `boolean` | | `false` | Whether the slider should follow the pointer on hover. | | ||
| [`disabled`](https://react-compare-slider.vercel.app/?path=/story/demos--disabled) | `boolean` | | `false` | Whether to disable slider movement (items are still interactable). | | ||
| [`handle`](https://react-compare-slider.vercel.app/?path=/story/demos--handle) | `ReactNode` | | `undefined` | Custom handle component. | | ||
| `itemOne` | `ReactNode` | ✓ | `undefined` | First component to show in slider. | | ||
| `itemTwo` | `ReactNode` | ✓ | `undefined` | Second component to show in slider. | | ||
| [`keyboardIncrement`](https://react-compare-slider.vercel.app/?path=/story/docs-keyboard-increment--page) | `` number\|`${number}%` `` | | `5%` | Percentage or pixel amount to move when the slider handle is focused and keyboard arrow is pressed. | | ||
| [`onlyHandleDraggable`](https://react-compare-slider.vercel.app/?path=/story/docs-only-handle-draggable--page) | `boolean` | | `false` | Whether to only change position when handle is interacted with (useful for touch devices). | | ||
| [`keyboardIncrement`](https://react-compare-slider.vercel.app/?path=/story/demos--keyboard-increment) | `` number\|`${number}%` `` | | `5%` | Percentage or pixel amount to move when the slider handle is focused and keyboard arrow is pressed. | | ||
| [`onlyHandleDraggable`](https://react-compare-slider.vercel.app/?path=/story/demos--only-handle-draggable) | `boolean` | | `false` | Whether to only change position when handle is interacted with (useful for touch devices). | | ||
| [`onPositionChange`](https://react-compare-slider.vercel.app/?path=/story/demos--on-position-change) | `function` | | `undefined` | Callback on position change, returns current position percentage as argument `(position) => { ... }`. | | ||
@@ -89,3 +87,3 @@ | [`portrait`](https://react-compare-slider.vercel.app/?path=/story/demos--portrait) | `boolean` | | `false` | Whether to use portrait orientation. | | ||
[API docs](https://react-compare-slider.vercel.app/?path=/docs/docs-api--page) for more information. | ||
[API docs](https://react-compare-slider.vercel.app/?path=/docs/docs-api--docs) for more information. | ||
@@ -96,5 +94,3 @@ <br /> | ||
- [Official GOV.UK Coronavirus Dashboard](https://coronavirus.data.gov.uk/details/interactive-map/vaccinations#vaccinations-map-container) | ||
- [Upscayl, Free and Open Source AI Image Upscaler](https://github.com/upscayl/upscayl#free-and-open-source-ai-image-upscaler) | ||
- [Counter-Strike 2 Website](https://www.counter-strike.net/cs2) | ||
Checkout out the [Real World Examples page](https://react-compare-slider.vercel.app/?path=/docs/docs-real-world-examples--docs). | ||
@@ -101,0 +97,0 @@ ## Requirements |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
56858
95