@impulse-ui-native/color-picker 9.0.0 → 9.1.1
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.
- package/README.md +7 -4
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -8,12 +8,13 @@ A modular full-spectrum color picker for native iOS and Android. Reuses ImpulseU
|
|
|
8
8
|
pnpm add @impulse-ui-native/color-picker react-native-svg react-native-gesture-handler react-native-reanimated react-native-worklets
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Requires React >=18, React Native >=0.73, react-native-svg >=13.9.0, Gesture Handler >=2, Reanimated >=4, and Worklets >=0.5. Complete Gesture Handler and
|
|
11
|
+
Requires React >=18, React Native >=0.73, react-native-svg >=13.9.0, Gesture Handler >=2, Reanimated >=4, and Worklets >=0.5. Complete Gesture Handler, Reanimated, and Worklets native setup. Render inside `GestureHandlerRootView` and `ThemeProvider` from `@impulse-ui-native/theme` and load the theme's fonts, as for other ImpulseUI controls. ColorPicker also requires react-native-svg for gradients and transparency previews. No overlay providers are required for this inline picker.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
16
|
import { useState } from "react";
|
|
17
|
+
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
17
18
|
|
|
18
19
|
import { ColorPicker } from "@impulse-ui-native/color-picker";
|
|
19
20
|
import { ThemeProvider } from "@impulse-ui-native/theme";
|
|
@@ -22,9 +23,11 @@ export function BrandColor() {
|
|
|
22
23
|
const [color, setColor] = useState("#F55D6B");
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
26
|
+
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
27
|
+
<ThemeProvider>
|
|
28
|
+
<ColorPicker value={color} onChange={setColor} commitMode="confirm" />
|
|
29
|
+
</ThemeProvider>
|
|
30
|
+
</GestureHandlerRootView>
|
|
28
31
|
);
|
|
29
32
|
}
|
|
30
33
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulse-ui-native/color-picker",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "Modular spectrum color picker with custom hex/RGB entry and theme presets for React Native.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
],
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@impulse-ui-native/core": "9.
|
|
32
|
-
"@impulse-ui-native/input": "9.
|
|
33
|
-
"@impulse-ui-native/
|
|
34
|
-
"@impulse-ui-native/
|
|
35
|
-
"@impulse-ui-native/
|
|
36
|
-
"@impulse-ui-native/slider": "9.
|
|
31
|
+
"@impulse-ui-native/core": "9.1.1",
|
|
32
|
+
"@impulse-ui-native/input": "9.1.1",
|
|
33
|
+
"@impulse-ui-native/theme": "9.1.1",
|
|
34
|
+
"@impulse-ui-native/icon": "9.1.1",
|
|
35
|
+
"@impulse-ui-native/primitives": "9.1.1",
|
|
36
|
+
"@impulse-ui-native/slider": "9.1.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/react": "~19.2.14",
|