react-iro-gradient-picker 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +75 -20
  2. package/package.json +5 -2
package/README.md CHANGED
@@ -1,15 +1,18 @@
1
1
  <!-- markdownlint-disable -->
2
+
2
3
  # React Iro Gradient Picker
3
4
 
4
5
  ## ✨ Modern React Color Picker with Complete Dark Theme Support! ✨
5
6
 
6
7
  A beautiful, modern React gradient and solid color picker with full dark theme integration, built with Tailwind CSS and TypeScript.
7
8
 
8
- ### Inspired by [gpickr](https://github.com/Simonwep/gpickr) and enhanced with modern features
9
+ ### 🚀 **[✨ LIVE DEMO & DOCUMENTATION ✨](https://romfatal.github.io/react-iro-gradient-picker/)**
9
10
 
10
- [![NPM](https://img.shields.io/npm/v/react-iro-gradient-picker.svg)](https://www.npmjs.com/package/react-iro-gradient-picker) [![License](https://img.shields.io/npm/l/react-iro-gradient-picker.svg)](https://github.com/romfatal/react-iro-gradient-picker/blob/main/LICENSE)
11
+ [![NPM](https://img.shields.io/npm/v/react-iro-gradient-picker.svg)](https://www.npmjs.com/package/react-iro-gradient-picker) [![License](https://img.shields.io/npm/l/react-iro-gradient-picker.svg)](https://github.com/romfatal/react-iro-gradient-picker/blob/main/LICENSE) [![GitHub Pages](https://img.shields.io/badge/docs-live-brightgreen)](https://romfatal.github.io/react-iro-gradient-picker/)
11
12
 
12
- **[Demo](https://romfatal.github.io/react-iro-gradient-picker/)**
13
+ > 📚 **[Interactive Documentation](https://romfatal.github.io/react-iro-gradient-picker/)** | 📦 **[NPM Package](https://www.npmjs.com/package/react-iro-gradient-picker)** | 🔧 **[GitHub Repository](https://github.com/romfatal/react-iro-gradient-picker)**
14
+
15
+ ### Inspired by [gpickr](https://github.com/Simonwep/gpickr) and enhanced with modern features
13
16
 
14
17
  ## ✨ Features
15
18
 
@@ -20,39 +23,92 @@ A beautiful, modern React gradient and solid color picker with full dark theme i
20
23
  - 🎯 **Tailwind CSS** - Modern styling with comprehensive theming system
21
24
  - 📱 **Responsive Design** - Works great on all screen sizes
22
25
 
23
- ## Install
26
+ ## 🎬 Live Demo
24
27
 
25
- ### **Important: this component uses React Hooks and works on React version 16.8.0 and higher**
28
+ ### 🚀 **[✨ Try it Live - Interactive Storybook Demo ✨](https://romfatal.github.io/react-iro-gradient-picker/)**
29
+
30
+ Experience all features in action:
31
+
32
+ - 🌙 **Dark/Light Theme Toggle** - Switch themes and see all components adapt
33
+ - 🎨 **Solid Color Picker** - Pick any solid color with alpha transparency
34
+ - 🌈 **Gradient Picker** - Create linear/radial gradients with multiple stops
35
+ - 🔄 **Dual Mode** - Switch between solid and gradient modes seamlessly
36
+ - 📱 **Responsive Design** - Works perfectly on desktop and mobile
37
+ - ⚙️ **All Props & Configuration** - Explore every feature and customization option
38
+
39
+ **[📚 View Complete Documentation →](https://romfatal.github.io/react-iro-gradient-picker/)**
26
40
 
27
41
  ---
28
42
 
43
+ ## 🚀 Quick Start
44
+
45
+ ### Install
46
+
47
+ **Important: this component uses React Hooks and works on React version 16.8.0 and higher**
48
+
29
49
  ```bash
30
- npm install --save react-iro-gradient-picker
50
+ npm install react-iro-gradient-picker
31
51
  ```
32
52
 
33
- OR
34
-
35
53
  ```bash
36
54
  yarn add react-iro-gradient-picker
37
55
  ```
38
56
 
39
- ## Usage
57
+ ```bash
58
+ pnpm add react-iro-gradient-picker
59
+ ```
60
+
61
+ ### Basic Usage
40
62
 
41
63
  ```tsx
42
- import React from 'react';
43
- import ReactIroGradientPicker from 'react-iro-gradient-picker';
64
+ import React, { useState } from 'react';
65
+ import ColorPicker from 'react-iro-gradient-picker';
44
66
 
45
67
  function App() {
46
- const onChange = (value) => {
47
- console.log(value);
48
- };
49
-
50
- return <ReactIroGradientPicker value='red' onChange={onChange} />;
68
+ const [color, setColor] = useState('#3B82F6');
69
+
70
+ return (
71
+ <ColorPicker
72
+ solid
73
+ value={color}
74
+ onChange={(newColor: string) => {
75
+ setColor(newColor);
76
+ return newColor;
77
+ }}
78
+ />
79
+ );
51
80
  }
52
81
 
53
82
  export default App;
54
83
  ```
55
84
 
85
+ ### 🌙 With Dark Theme Support
86
+
87
+ ```tsx
88
+ import React, { useState } from 'react';
89
+ import ColorPicker from 'react-iro-gradient-picker';
90
+ import { ThemeProvider } from 'react-iro-gradient-picker/components/providers/ThemeContext';
91
+
92
+ function App() {
93
+ const [color, setColor] = useState('#3B82F6');
94
+
95
+ return (
96
+ <ThemeProvider defaultTheme='dark'>
97
+ <ColorPicker
98
+ solid
99
+ gradient
100
+ value={color}
101
+ onChange={setColor}
102
+ showAlpha={true}
103
+ showInputs={true}
104
+ />
105
+ </ThemeProvider>
106
+ );
107
+ }
108
+ ```
109
+
110
+ ### 📚 **[→ View Complete Documentation & Examples](https://romfatal.github.io/react-iro-gradient-picker/)**
111
+
56
112
  ## 🌟 What Makes This Special
57
113
 
58
114
  This is an enhanced version of the original react-gcolor-picker with major improvements:
@@ -77,10 +133,6 @@ This is an enhanced version of the original react-gcolor-picker with major impro
77
133
  - **Updated Dependencies** - Latest versions of all packages
78
134
  - **Better Build Process** - Optimized for modern React applications
79
135
 
80
- export default App;
81
-
82
- ```
83
-
84
136
  ## Props
85
137
 
86
138
  | Attribute | Type | Default | Description |
@@ -195,4 +247,7 @@ Special thanks to the original author for creating such a solid foundation! 🙏
195
247
  MIT © [romfatal](https://github.com/romfatal)
196
248
 
197
249
  Original project: MIT © [undind](https://github.com/undind)
250
+
251
+ ```
252
+
198
253
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-iro-gradient-picker",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Modern React gradient and solid color picker with complete dark theme support, built with TypeScript and Tailwind CSS",
5
5
  "keywords": [
6
6
  "react",
@@ -54,7 +54,10 @@
54
54
  "predeploy": "storybook build",
55
55
  "deploy": "gh-pages -d storybook-static/",
56
56
  "release": "npm run test && release-it",
57
- "build-storybook": "storybook build"
57
+ "build-storybook": "storybook build",
58
+ "version:patch": "npm run deploy && npm version patch && npm publish",
59
+ "version:minor": "npm run deploy && npm version minor && npm publish",
60
+ "version:major": "npm run deploy && npm version major && npm publish"
58
61
  },
59
62
  "peerDependencies": {
60
63
  "react": ">=16.8.0",