fix: prevent asset conflicts between React and Grid.js versions

Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

5
node_modules/react-colorful/ACKNOWLEDGMENTS generated vendored Normal file
View File

@@ -0,0 +1,5 @@
## Acknowledgements
- Special thanks @RyanChristian4427 who has rewritten the library in TypeScript.
- In order to avoid tree-shaking problems, and provide better TS support, `rgbToHex` and `hexToRgb` methods were copied from [@swiftcarrot/color-fns](https://github.com/swiftcarrot/color-fns) (MIT License).
- `hsvToRgb` modified from https://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c.

257
node_modules/react-colorful/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,257 @@
### 5.6.1
- Update export settings to fix Jet 28 issues (via #191)
### 5.6.0
- Add new `HexAlphaColorPicker` component (via #186)
- Fix types export for TYpeScript 4.7. Thanks to @AnotherHermit (via #189)
- Improve ARIA attribute values for sliders. Thanks to @aitchiss (via #177)
### 5.5.1
- Fix embedding into `<iframe>`. The component is rendered correctly by libraries like `react-frame-component`. Thanks to @leoc4e (via #166)
### 5.5.0
- Multitouch! ✌️ Thanks to @xnimorz (via #158)
### 5.4.0
- Add new `alpha` property for `HexColorInput` to allow "#rgba" and "#rrggbbaa" formats (via #155)
### 5.3.1
- Fix potential memory leaks and improve the performance. Thanks to @xnimorz (via #151)
### 5.3.0
- Add new `prefixed` property for `HexColorInput` to display "#" prefix (via #146)
### 5.2.3
- Fix: Make the picker take focus on click (via #143)
### 5.2.2
- Fix "Unable to preventDefault inside passive event listener" (via #141)
### 5.2.1
- Fix rounded corner rendering bug (via #140)
### 5.2.0
- Improve input color parsers to support more CSS color notations and units (via #133)
### 5.1.4
- Fix `.mjs` file publishing (via #129)
### 5.1.3
- Export `.mjs` file to improve different environments and bundlers support. Thanks to @rschristian (via #127)
### 5.1.2
- Add `"default"` fallback to the exports map (via #124)
### 5.1.1
- Fix `setNonce` type declaration file publishing (via #123)
### 5.1.0
- The picker complies with the strict CSP (Content Security Policy). The `style` tag added by the component uses a nonce hash provided by Webpack or the one defined manually by the new `setNonce` function (via #121)
### 5.0.1
- The picker supports all HTML attributes and DOM events that a regular tag does (e.g. `id` or `onMouseEnter` (via #119)
## 5.0
- The library is 100% CSS-in-JS now. No need to import the CSS file to render the picker properly (via #101)
### 4.4.4
- Fix bug when a user releases the mouse button outside of the document bounds (via #99)
### 4.4.3
- Get rid of `useLayoutEffect` warning when using on the server (via #95)
### 4.4.2
- Fix CSS loading in Webpack v5 (via #91)
### 4.4.1
- Disable static class names minification (via #86)
### 4.4.0
- Migrate from CSS modules to static class names (via #84)
- Better Skypack support. Thanks to @rschristian (via #83)
### 4.3.0
- Better React 17 support (via #80)
### 4.2.0
- Round output values (via #77)
### 4.1.4
- Fix pointer rendering bug on Safari 14 (via #74)
### 4.1.3
- Do not display the default focus styles
### 4.1.2
- 100% code coverage
### 4.1.1
- Better Internet Explorer 11 support (via #65)
### 4.1.0
- The picker follows the WAI-ARIA guidelines to support users of assistive technologies. The component is completely accessible with keyboard navigation: you can focus on any picker's part using the Tab button and change the color with the arrow keys. Made by @omgovich (via #63)
### 4.0.7
- Simplify gradient CSS styles
### 4.0.6
- Improve pasting from clipboard to `HexColorInput`
### 4.0.5
- Fix: Fast Tap and Release in iOS Safari (via #56)
- Adding `HsvStringColorPicker` and `HsvaStringColorPicker` components. Thanks to @rschristian (via #48)
### 4.0.4
- Resolving `TouchEvent` error on Firefox. Thanks to @rschristian (via #53)
### 4.0.3
- Improve `Interactive` internal typing (via #50)
### 4.0.2
- Allow to pass custom `onBlur` callback to `HexInput` (via #49)
- Improve `HexColorInput` types (via #49)
### 4.0.1
- Add alpha picker demos
## 4.0
- Alpha channel support (via #47)
- Additional components to work with RGBA, HSLA, HSVA color models (via #47)
### 3.0.3
- Improve TypeScript tooling. Thanks to @rschristian (via #45)
### 3.0.2
- Fix `sideEffects` to keep CSS-files
## 3.0
- Migrate to named exports. Thanks to @rschristian (via #42)
- Mark the library as side-effect-free and add tree-shaking support. Thanks to @rschristian (via #42)
- More consistent public component and type names. Thanks to @rschristian (via #42)
- Fix type definitions: make all `HexInput` props optional
- Enhance internal event type definitions. Thanks to @byr-gdp (via #41)
- Escape from "useCallback hell" and improve performance by adding `useEventCallback` hook. Thanks to @jeetiss (via #40)
### 2.3.1
- Extend allowed `HexInput` props with `HTMLInputElement`
### 2.3.0
- The entire codebase was rewritten in TypeScript by @rschristian (via #23)
### 2.2.1
- Fix type definitions: make all of the picker props optional
### 2.2.0
- TypeScript types are now bundled with the library. Thanks to @rschristian (via #22)
### 2.1.2
- Make the pointer grabbable even if it is outside of the picket bounds (via #21)
### 2.1.1
- Fix bug if user taps on the picker and does not move the pointer afterward
### 2.1.0
- Add `HexInput` component that allows to paste and type a HEX color
### 2.0.3
- Reduce the number of folders published to NPM
- Rewrite `Interactive` to make the bundle lighter
### 2.0.2
- Fix HSV to RGB conversion algorithm
- Rewrite utils to make the bundler lighter
### 2.0.1
- Update docs and tooling
## 2.0
- Support new input/output formats: RGB object, RGB string, HSL object, HSL string, HSV object
### 1.2.5
- Test components with Jest and React Testing Library
### 1.2.4
- Fix `box-sizing` of the pointers
### 1.2.3
- Refactor `Interactive` a bit in order to make the package lighter
### 1.2.2
- Get rid of unused `className` props in `Hue` and `Saturation` components
### 1.2.1
- Add `equalHex` and `equalColorObjects` utils and write tests for them
### 1.2.0
- Make the package dependency-free
- Do not trigger `onChange` after the mounting
### 1.1.0
- Migrate from color-fns to @swiftcarrot/color-fns which is 40% lighter
### 1.0.1
- Use proper JSX pragma for React. Thanks to @jeetiss
## 1.0
- HEX color picker component

21
node_modules/react-colorful/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Vlad Shilov <omgovich@ya.ru>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

343
node_modules/react-colorful/README.md generated vendored Normal file
View File

@@ -0,0 +1,343 @@
<div align="center">
<a href="https://omgovich.github.io/react-colorful">
<img src="demo/src/assets/design.png" width="229" height="233" alt="react-colorful" />
</a>
</div>
<div align="center">
<a href="https://npmjs.org/package/react-colorful">
<img alt="npm" src="https://img.shields.io/npm/v/react-colorful.svg?labelColor=da248d&color=6ead0a" />
</a>
<a href="https://github.com/omgovich/react-colorful/actions">
<img alt="build" src="https://img.shields.io/github/workflow/status/omgovich/react-colorful/Node.js%20CI/master.svg?labelColor=da248d&color=6ead0a" />
</a>
<a href="https://codecov.io/gh/omgovich/react-colorful">
<img alt="coverage" src="https://img.shields.io/codecov/c/github/omgovich/react-colorful.svg?labelColor=da248d&color=6ead0a" />
</a>
<a href="https://npmjs.org/package/react-colorful">
<img alt="no dependencies" src="https://badgen.net/bundlephobia/dependency-count/react-colorful?labelColor=da248d&color=6ead0a" />
</a>
<a href="https://bundlephobia.com/result?p=react-colorful">
<img alt="tree-shakeable" src="https://badgen.net/bundlephobia/tree-shaking/react-colorful?labelColor=da248d&color=6ead0a" />
</a>
<a href="https://npmjs.org/package/react-colorful">
<img alt="types included" src="https://badgen.net/npm/types/react-colorful?labelColor=da248d&color=6ead0a" />
</a>
</div>
<div align="center">
<strong>react-colorful</strong> is a tiny color picker component for React and Preact apps.
</div>
## Features
- 🗜 **Small**: Just 2,8 KB gzipped ([13x lighter](#why-react-colorful) than **react-color**).
- 🌳 **Tree-shakeable**: Only the parts you use will be imported into your app's bundle.
- 🚀 **Fast**: Built with hooks and functional components only.
- 🛡 **Bulletproof**: Written in strict TypeScript and has 100% test coverage.
- 🗂 **Typed**: Ships with [types included](#typescript-support)
- 😍 **Simple**: The interface is straightforward and easy to use.
- 👫 **Cross-browser**: Works out-of-the-box for most browsers, regardless of version.
- 📲 **Mobile-friendly**: Supports mobile devices and touch screens.
- 💬 **Accessible**: Follows the [WAI-ARIA](https://www.w3.org/WAI/standards-guidelines/aria/) guidelines to support users of assistive technologies.
- 💨 **No dependencies**
## Live demos
- [Website](https://omgovich.github.io/react-colorful)
- [HEX Color Picker (CodeSandbox)](https://codesandbox.io/s/react-colorful-demo-u5vwp)
- [RGBA Color Picker (CodeSandbox)](https://codesandbox.io/s/react-colorful-rgb-o9q0t)
## Table of Contents
- [Getting Started](#getting-started)
- [Supported Color Models](#supported-color-models)
- [Customization](#customization)
- [How to paste or type a color?](#how-to-paste-or-type-a-color)
- [Code Recipes](#code-recipes)
- [TypeScript Support](#typescript-support)
- [Usage with Preact](#usage-with-preact)
- [Browser Support](#browser-support)
- [Why react-colorful?](#why-react-colorful)
- [Projects using react-colorful](#projects-using-react-colorful)
- [Ports](#ports)
## Getting Started
```
npm install react-colorful
```
```js
import { HexColorPicker } from "react-colorful";
const YourComponent = () => {
const [color, setColor] = useState("#aabbcc");
return <HexColorPicker color={color} onChange={setColor} />;
};
```
## Supported Color Models
We provide 12 additional color picker components for different color models, unless your app needs a HEX string as an input/output format.
<details>
<summary>How to use another color model</summary>
#### Available pickers
| Import | Value example |
| --------------------------- | ---------------------------------- |
| `{ HexColorPicker }` | `"#ffffff"` |
| `{ HexAlphaColorPicker }` | `"#ffffff88"` |
| `{ RgbColorPicker }` | `{ r: 255, g: 255, b: 255 }` |
| `{ RgbaColorPicker }` | `{ r: 255, g: 255, b: 255, a: 1 }` |
| `{ RgbStringColorPicker }` | `"rgb(255, 255, 255)"` |
| `{ RgbaStringColorPicker }` | `"rgba(255, 255, 255, 1)"` |
| `{ HslColorPicker }` | `{ h: 0, s: 0, l: 100 }` |
| `{ HslaColorPicker }` | `{ h: 0, s: 0, l: 100, a: 1 }` |
| `{ HslStringColorPicker }` | `"hsl(0, 0%, 100%)"` |
| `{ HslaStringColorPicker }` | `"hsla(0, 0%, 100%, 1)"` |
| `{ HsvColorPicker }` | `{ h: 0, s: 0, v: 100 }` |
| `{ HsvaColorPicker }` | `{ h: 0, s: 0, v: 100, a: 1 }` |
| `{ HsvStringColorPicker }` | `"hsv(0, 0%, 100%)"` |
| `{ HsvaStringColorPicker }` | `"hsva(0, 0%, 100%, 1)"` |
#### Code example
```js
import { RgbColorPicker } from "react-colorful";
const YourComponent = () => {
const [color, setColor] = useState({ r: 50, g: 100, b: 150 });
return <RgbColorPicker color={color} onChange={setColor} />;
};
```
[Live demo →](https://codesandbox.io/s/react-colorful-rgb-o9q0t)
</details>
## Customization
The easiest way to tweak **react-colorful** is to create another stylesheet to override the default styles.
```css
.your-component .react-colorful {
height: 240px;
}
.your-component .react-colorful__saturation {
border-radius: 4px 4px 0 0;
}
.your-component .react-colorful__hue {
height: 40px;
border-radius: 0 0 4px 4px;
}
.your-component .react-colorful__hue-pointer {
width: 12px;
height: inherit;
border-radius: 0;
}
```
[See examples →](https://codesandbox.io/s/react-colorful-customization-demo-mq85z?file=/src/styles.css)
## How to paste or type a color?
As you probably noticed the color picker itself does not include an input field, but do not worry if you need one. **react-colorful** is a modular library that allows you to build any picker you need. Since `v2.1` we provide an additional component that works perfectly in pair with our color picker.
<details>
<summary>How to use <code>HexColorInput</code></summary><br />
```js
import { HexColorPicker, HexColorInput } from "react-colorful";
const YourComponent = () => {
const [color, setColor] = useState("#aabbcc");
return (
<div>
<HexColorPicker color={color} onChange={setColor} />
<HexColorInput color={color} onChange={setColor} />
</div>
);
};
```
[Live demo →](https://codesandbox.io/s/react-colorful-hex-input-demo-0k2fx)
| Property | Default | Description |
| ---------- | ------- | -------------------------------------------- |
| `alpha` | `false` | Allows `#rgba` and `#rrggbbaa` color formats |
| `prefixed` | `false` | Enables `#` prefix displaying |
`HexColorInput` does not have any default styles, but it also accepts all properties that a regular `input` tag does (such as `className`, `placeholder` and `autoFocus`). That means you can place and modify this component as you like. Also, that allows you to combine the color picker and input in different ways:
```jsx
<HexColorInput color={color} onChange={setColor} placeholder="Type a color" prefixed alpha />
```
</details>
## Code Recipes
- [Value debouncing](https://codesandbox.io/s/dgqn0?file=/src/DebouncedPicker.js)
- [Popover picker](https://codesandbox.io/s/opmco?file=/src/PopoverPicker.js)
- [Preset colors (color squares)](https://codesandbox.io/s/bekry?file=/src/SwatchesPicker.js)
- [Picker that accepts any color input](https://codesandbox.io/s/6fp23?file=/src/CustomPicker.js)
- [Text field to be able to type/copy/paste a color](https://codesandbox.io/s/0k2fx?file=/src/App.js)
- [Custom styles and layout](https://codesandbox.io/s/mq85z?file=/src/styles.css)
## TypeScript Support
**react-colorful** supports TypeScript and ships with types in the library itself; no need for any other install.
<details>
<summary>How you can get the most from our TypeScript support</summary><br />
While not only typing its own functions and variables, it can also help you type yours. Depending on the component you are using, you can also import the type that is associated with the component. For example, if you are using our HSL color picker component, you can also import the `HSL` type.
```ts
import { HslColorPicker, HslColor } from "react-colorful";
const myHslValue: HslColor = { h: 0, s: 0, l: 0 };
```
Take a look at [Supported Color Models](#supported-color-models) for more information about the types and color formats you may want to use.
</details>
## Usage with Preact
**react-colorful** will work flawlessly with Preact out-of-the-box if you are using [WMR](https://github.com/preactjs/wmr), [Preact-CLI](https://github.com/preactjs/preact-cli), [NextJS with Preact](https://github.com/vercel/next.js/tree/canary/examples/using-preact), or a few other tools/boilerplates thanks to aliasing.
If you are using another solution, please refer to the [Aliasing React to Preact](https://preactjs.com/guide/v10/getting-started#aliasing-react-to-preact) section of the Preact documentation.
<details>
<summary>Preact + Typescript</summary><br />
**react-colorful**, like all other React + TS projects, can potentially cause issues in a Preact + TS application if you have the `@types/react` package installed, either as a direct dependency or a dependency of a dependency. For example, the Preact TS template comes with `@types/enzyme` which has `@types/react` as a dependency.
To fix this, create a `declaration.d.ts` file or add to your existing:
```
import React from "react";
declare global {
namespace React {
interface ReactElement {
nodeName: any;
attributes: any;
children: any;
}
}
}
```
This will correct the types and allow you to use **react-colorful** along with many other React + TS libraries in your Preact + TS application.
</details>
## Browser Support
It would be an easier task to list all of the browsers and versions that **react-colorful** does not support! We regularly test against browser versions going all the way back to 2013 and this includes IE11.
**react-colorful** works out-of-the-box for most browsers, regardless of version, and only requires an `Object.assign` polyfill be provided for full IE11 support.
## Why react-colorful?
Today each dependency drags more dependencies and increases your projects bundle size uncontrollably. But size is very important for everything that intends to work in a browser.
**react-colorful** is a simple color picker for those who care about their bundle size and client-side performance. It is fast and lightweight because:
- has no dependencies (no risks in terms of vulnerabilities, no unexpected bundle size changes);
- built with hooks and functional components only (no classes and polyfills for them);
- ships only a minimal amount of manually optimized color conversion algorithms (while most of the popular pickers import entire color manipulation libraries that increase the bundle size by more than 10 KB and make your app slower).
To show you the problem that **react-colorful** is trying to solve, we have performed a simple benchmark (using [bundlephobia.com](https://bundlephobia.com)) against popular React color picker libraries:
| Name | Bundle size | Bundle size (gzip) | Dependencies |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **react-colorful** | [![](https://badgen.net/bundlephobia/min/react-colorful?color=6ead0a&label=)](https://bundlephobia.com/result?p=react-colorful) | [![](https://badgen.net/bundlephobia/minzip/react-colorful?color=6ead0a&label=)](https://bundlephobia.com/result?p=react-colorful) | [![](https://badgen.net/bundlephobia/dependency-count/react-colorful?color=6ead0a&label=)](https://bundlephobia.com/result?p=react-colorful) |
| react-color | [![](https://badgen.net/bundlephobia/min/react-color?color=red&label=)](https://bundlephobia.com/result?p=react-color) | [![](https://badgen.net/bundlephobia/minzip/react-color?color=red&label=)](https://bundlephobia.com/result?p=react-color) | [![](https://badgen.net/bundlephobia/dependency-count/react-color?color=red&label=)](https://bundlephobia.com/result?p=react-color) |
| react-input-color | [![](https://badgen.net/bundlephobia/min/react-input-color?color=red&label=)](https://bundlephobia.com/result?p=react-input-color) | [![](https://badgen.net/bundlephobia/minzip/react-input-color?color=red&label=)](https://bundlephobia.com/result?p=react-input-color) | [![](https://badgen.net/bundlephobia/dependency-count/react-input-color?color=red&label=)](https://bundlephobia.com/result?p=react-input-color) |
| rc-color-picker | [![](https://badgen.net/bundlephobia/min/rc-color-picker?color=red&label=)](https://bundlephobia.com/result?p=rc-color-picker) | [![](https://badgen.net/bundlephobia/minzip/rc-color-picker?color=red&label=)](https://bundlephobia.com/result?p=rc-color-picker) | [![](https://badgen.net/bundlephobia/dependency-count/rc-color-picker?color=red&label=)](https://bundlephobia.com/result?p=rc-color-picker) |
## Projects using react-colorful
<details>
<summary><a href="https://storybook.js.org/">Storybook</a> — the most widely used open-source tool for developing UI components</summary>
<a href="https://storybook.js.org/">
<img src="demo/src/assets/storybook.png" width="551" alt="Storybook" />
</a>
</details>
<details>
<summary><a href="https://resume.io">Resume.io</a> — online resume builder with over 9,400,000 users worldwide</summary>
<a href="https://resume.io/">
<img src="demo/src/assets/resume-io.png" width="873" alt="resume.io" />
</a>
</details>
<details>
<summary><a href="https://wireflow.co/">Wireflow.co</a> — free tool for creating modern user flow prototypes</summary>
<a href="https://wireflow.co/">
<img src="demo/src/assets/wireflow-co.png" width="1222" alt="wireflow.co" />
</a>
</details>
<details>
<summary><a href="https://www.magicpattern.design/">MagicPattern.design</a> — unique geometric pattern generator</summary>
<a href="https://www.magicpattern.design/">
<img src="demo/src/assets/magicpattern-design.jpg" width="943" alt="magicpattern.design" />
</a>
</details>
<details>
<summary><a href="https://viewst.com/">Viewst.com</a> — online tool for designing, creating and automating ad campaigns</summary>
<a href="https://viewst.com/">
<img src="demo/src/assets/viewst.png" width="1159" alt="viewst.com" />
</a>
</details>
<details>
<summary><a href="https://omatsuri.app">Omatsuri.app</a> — progressive web application with a lot of different frontend focused tools</summary>
<a href="https://omatsuri.app">
<img src="demo/src/assets/omatsuri-app.png" width="1223" alt="omatsuri.app" />
</a>
</details>
<details>
<summary><a href="https://github.com/pmndrs/leva">Leva</a> — open source extensible GUI panel made for React</summary>
<a href="https://github.com/pmndrs/leva">
<img src="demo/src/assets/leva.png" width="1223" alt="pmndrs/leva" />
</a>
</details>
<details>
<summary><a href="https://www.composable.art">Composable</a> — online tool for creating custom vector illustrations</summary>
<a href="https://www.composable.art">
<img src="demo/src/assets/composable.png" width="745" alt="composable.art" />
</a>
</details>
## Backers and sponsors
<a href="https://opencollective.com/react-colorful"><img src="https://opencollective.com/react-colorful/individuals.svg?width=890"></a>
## Ports
Not using React or Preact? Not a problem! Check out the list of react-colorful ports adapted to your favourite framework or technology of choice:
- **[vanilla-colorful](https://github.com/web-padawan/vanilla-colorful)** — a react-colorful reimplementation in vanilla Custom Elements, generously ported by [@web-padavan](https://github.com/web-padawan).
- **[angular-colorful](https://github.com/fil0157/angular-colorful)** — a react-colorful rewritten for use with the Angular framework, lovingly ported by [@fil0157](https://github.com/fil0157).
If your port is not in the list, reach us out via [GitHub issues](https://github.com/omgovich/react-colorful/issues).

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const HexAlphaColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,10 @@
/// <reference types="react" />
import { ColorInputBaseProps } from "../types";
interface HexColorInputProps extends ColorInputBaseProps {
/** Enables `#` prefix displaying */
prefixed?: boolean;
/** Allows `#rgba` and `#rrggbbaa` color formats */
alpha?: boolean;
}
export declare const HexColorInput: (props: HexColorInputProps) => JSX.Element;
export {};

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const HexColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps, HslColor } from "../types";
export declare const HslColorPicker: (props: Partial<ColorPickerBaseProps<HslColor>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const HslStringColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps, HslaColor } from "../types";
export declare const HslaColorPicker: (props: Partial<ColorPickerBaseProps<HslaColor>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const HslaStringColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps, HsvColor } from "../types";
export declare const HsvColorPicker: (props: Partial<ColorPickerBaseProps<HsvColor>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const HsvStringColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps, HsvaColor } from "../types";
export declare const HsvaColorPicker: (props: Partial<ColorPickerBaseProps<HsvaColor>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const HsvaStringColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps, RgbColor } from "../types";
export declare const RgbColorPicker: (props: Partial<ColorPickerBaseProps<RgbColor>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const RgbStringColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps, RgbaColor } from "../types";
export declare const RgbaColorPicker: (props: Partial<ColorPickerBaseProps<RgbaColor>>) => JSX.Element;

View File

@@ -0,0 +1,3 @@
/// <reference types="react" />
import { ColorPickerBaseProps } from "../types";
export declare const RgbaStringColorPicker: (props: Partial<ColorPickerBaseProps<string>>) => JSX.Element;

17
node_modules/react-colorful/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
export { HexColorPicker } from "./components/HexColorPicker";
export { HexAlphaColorPicker } from "./components/HexAlphaColorPicker";
export { HslaColorPicker } from "./components/HslaColorPicker";
export { HslaStringColorPicker } from "./components/HslaStringColorPicker";
export { HslColorPicker } from "./components/HslColorPicker";
export { HslStringColorPicker } from "./components/HslStringColorPicker";
export { HsvaColorPicker } from "./components/HsvaColorPicker";
export { HsvaStringColorPicker } from "./components/HsvaStringColorPicker";
export { HsvColorPicker } from "./components/HsvColorPicker";
export { HsvStringColorPicker } from "./components/HsvStringColorPicker";
export { RgbaColorPicker } from "./components/RgbaColorPicker";
export { RgbaStringColorPicker } from "./components/RgbaStringColorPicker";
export { RgbColorPicker } from "./components/RgbColorPicker";
export { RgbStringColorPicker } from "./components/RgbStringColorPicker";
export { HexColorInput } from "./components/HexColorInput";
export { RgbColor, RgbaColor, HslColor, HslaColor, HsvColor, HsvaColor } from "./types";
export { setNonce } from "./utils/nonce";

2
node_modules/react-colorful/dist/index.esmodule.js generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
node_modules/react-colorful/dist/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/react-colorful/dist/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2
node_modules/react-colorful/dist/index.mjs generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/react-colorful/dist/index.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2
node_modules/react-colorful/dist/index.module.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/react-colorful/dist/index.module.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

2
node_modules/react-colorful/dist/index.umd.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/react-colorful/dist/index.umd.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

44
node_modules/react-colorful/dist/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,44 @@
import React from "react";
export interface RgbColor {
r: number;
g: number;
b: number;
}
export interface RgbaColor extends RgbColor {
a: number;
}
export interface HslColor {
h: number;
s: number;
l: number;
}
export interface HslaColor extends HslColor {
a: number;
}
export interface HsvColor {
h: number;
s: number;
v: number;
}
export interface HsvaColor extends HsvColor {
a: number;
}
export declare type ObjectColor = RgbColor | HslColor | HsvColor | RgbaColor | HslaColor | HsvaColor;
export declare type AnyColor = string | ObjectColor;
export interface ColorModel<T extends AnyColor> {
defaultColor: T;
toHsva: (defaultColor: T) => HsvaColor;
fromHsva: (hsva: HsvaColor) => T;
equal: (first: T, second: T) => boolean;
}
declare type ColorPickerHTMLAttributes = Omit<React.HTMLAttributes<HTMLDivElement>, "color" | "onChange" | "onChangeCapture">;
export interface ColorPickerBaseProps<T extends AnyColor> extends ColorPickerHTMLAttributes {
color: T;
onChange: (newColor: T) => void;
}
declare type ColorInputHTMLAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value">;
export interface ColorInputBaseProps extends ColorInputHTMLAttributes {
color?: string;
onChange?: (newColor: string) => void;
}
export {};

11
node_modules/react-colorful/dist/utils/nonce.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* Returns a nonce hash included by Webpack or the one defined manually by developer.
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
* https://webpack.js.org/guides/csp/
*/
export declare const getNonce: () => string | undefined;
/**
* Signs the style tag with a base64-encoded string (nonce) to conforms to Content Security Policies.
* This function has to be invoked before any picker is rendered if you aren't using Webpack for CSP.
*/
export declare const setNonce: (hash: string) => void;

200
node_modules/react-colorful/package.json generated vendored Normal file
View File

@@ -0,0 +1,200 @@
{
"name": "react-colorful",
"version": "5.6.1",
"description": "🎨 A tiny (2,8 KB) color picker component for React and Preact apps. Fast, well-tested, dependency-free, mobile-friendly and accessible",
"source": "src/index.ts",
"main": "dist/index.js",
"module": "dist/index.module.js",
"esmodule": "dist/index.esmodule.js",
"umd:main": "dist/index.umd.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"umd": "./dist/index.umd.js",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"default": "./dist/index.module.js"
}
},
"scripts": {
"lint": "eslint src/**/*.{ts,tsx} demo/src/**/*.{ts,tsx}",
"size": "npm run build && size-limit",
"check-types": "tsc --noEmit true",
"test": "jest tests --coverage",
"build": "del-cli 'dist/*' && microbundle build --entry src/index.ts --jsx React.createElement --name react-colorful --css inline --tsconfig tsconfig.build.json",
"postbuild": "cpy dist/index.module.js dist --rename=index.mjs && cpy dist/index.module.js.map dist --rename=index.mjs.map",
"prepublishOnly": "npm run build",
"check-release": "npm publish --dry-run",
"release": "npm publish",
"start-demo": "parcel demo/src/index.html --out-dir demo/dist --open",
"build-demo": "del-cli 'demo/dist/*' && parcel build demo/src/index.html --out-dir demo/dist --public-url https://omgovich.github.io/react-colorful/",
"deploy-demo": "npm run build-demo && gh-pages -d demo/dist"
},
"size-limit": [
{
"path": "dist/index.module.js",
"name": "HexColorPicker",
"import": "{ HexColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HslColorPicker",
"import": "{ HslColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HslaColorPicker",
"import": "{ HslaColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HslStringColorPicker",
"import": "{ HslStringColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HslaStringColorPicker",
"import": "{ HslaStringColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HsvColorPicker",
"import": "{ HsvColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HsvaColorPicker",
"import": "{ HsvaColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HsvStringColorPicker",
"import": "{ HsvStringColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "HsvaStringColorPicker",
"import": "{ HsvaStringColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "RgbColorPicker",
"import": "{ RgbColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "RgbaColorPicker",
"import": "{ RgbaColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "RgbStringColorPicker",
"import": "{ RgbStringColorPicker }",
"limit": "3 KB"
},
{
"path": "dist/index.module.js",
"name": "RgbaStringColorPicker",
"import": "{ RgbaStringColorPicker }",
"limit": "3.1 KB"
},
{
"path": "dist/index.module.js",
"name": "HexColorInput",
"import": "{ HexColorInput }",
"limit": "3 KB"
}
],
"sideEffects": false,
"jest": {
"verbose": true,
"transform": {
"\\.js$": "jest-esm-jsx-transform",
"^.+\\.tsx?$": "ts-jest"
},
"moduleNameMapper": {
"\\.css$": "<rootDir>/tests/__mocks__/styles.css.mock.ts"
}
},
"files": [
"dist/*.{js,mjs,ts,map}",
"dist/components/*.ts",
"dist/utils/nonce.d.ts",
"LICENSE",
"ACKNOWLEDGMENTS",
"README.md",
"package.json"
],
"repository": "omgovich/react-colorful",
"keywords": [
"react",
"color picker",
"react-component",
"colorpicker",
"tiny",
"hex",
"color",
"front-end",
"color-picker",
"accessible",
"react-color",
"accessibility",
"aria",
"a11y",
"wai-aria"
],
"author": "Vlad Shilov <omgovich@ya.ru>",
"license": "MIT",
"bugs": {
"url": "https://github.com/omgovich/react-colorful/issues"
},
"homepage": "https://omgovich.github.io/react-colorful",
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^4.10.1",
"@testing-library/react": "^11.2.5",
"@types/jest": "^26.0.20",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-frame-component": "^4.1.3",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"cpy-cli": "^3.1.1",
"del-cli": "^3.0.1",
"eslint": "^7.21.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"gh-pages": "^3.1.0",
"goober": "^2.0.33",
"jest": "^26.6.3",
"jest-esm-jsx-transform": "^1.0.0",
"microbundle": "0.13.0",
"parcel-bundler": "1.12.3",
"parcel-plugin-css-to-string": "^2.5.2",
"prettier": "^2.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-frame-component": "^5.1.0",
"size-limit": "^4.10.1",
"ts-jest": "^26.5.3",
"typescript": "^4.2.3",
"use-throttled-effect": "0.0.7"
}
}