@startupjs-ui/color-picker 0.2.0 → 0.3.0
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/CHANGELOG.md +11 -0
- package/index.d.ts +4 -0
- package/index.tsx +9 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.3.0](https://github.com/startupjs/startupjs-ui/compare/v0.2.3...v0.3.0) (2026-05-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* [BREAKING] [0.3] improve accessibility props for E2E tests. Support testID everywhere ([#31](https://github.com/startupjs/startupjs-ui/issues/31)) ([882588c](https://github.com/startupjs/startupjs-ui/commit/882588ca37d5e1fd14b5717b5697cf9ed47042e4))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.2.0](https://github.com/startupjs/startupjs-ui/compare/v0.1.23...v0.2.0) (2026-05-04)
|
|
7
18
|
|
|
8
19
|
|
package/index.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface ColorPickerProps {
|
|
|
18
18
|
size?: 's' | 'm' | 'l';
|
|
19
19
|
/** Called with the selected hex color */
|
|
20
20
|
onChangeColor?: (color: string) => void;
|
|
21
|
+
/** Test identifier */
|
|
22
|
+
testID?: string;
|
|
21
23
|
/** Imperative ref to open/close picker */
|
|
22
24
|
ref?: RefObject<any>;
|
|
25
|
+
/** Additional props forwarded to the color button */
|
|
26
|
+
[key: string]: any;
|
|
23
27
|
}
|
package/index.tsx
CHANGED
|
@@ -30,8 +30,12 @@ export interface ColorPickerProps {
|
|
|
30
30
|
size?: 's' | 'm' | 'l'
|
|
31
31
|
/** Called with the selected hex color */
|
|
32
32
|
onChangeColor?: (color: string) => void
|
|
33
|
+
/** Test identifier */
|
|
34
|
+
testID?: string
|
|
33
35
|
/** Imperative ref to open/close picker */
|
|
34
36
|
ref?: RefObject<any>
|
|
37
|
+
/** Additional props forwarded to the color button */
|
|
38
|
+
[key: string]: any
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
function ColorPicker ({
|
|
@@ -40,7 +44,9 @@ function ColorPicker ({
|
|
|
40
44
|
value = '#fff',
|
|
41
45
|
disabled = false,
|
|
42
46
|
onChangeColor = () => {},
|
|
43
|
-
|
|
47
|
+
testID,
|
|
48
|
+
ref,
|
|
49
|
+
...props
|
|
44
50
|
}: ColorPickerProps): ReactNode {
|
|
45
51
|
const [shown, setShown] = useState(false)
|
|
46
52
|
const pickerRef = useRef<any>(null)
|
|
@@ -52,7 +58,7 @@ function ColorPicker ({
|
|
|
52
58
|
}, [disabled, shown])
|
|
53
59
|
|
|
54
60
|
return pug`
|
|
55
|
-
Div(style=style)
|
|
61
|
+
Div(style=style testID=testID)
|
|
56
62
|
Picker(
|
|
57
63
|
ref=pickerRef
|
|
58
64
|
onChangeColor=(color) => {
|
|
@@ -61,6 +67,7 @@ function ColorPicker ({
|
|
|
61
67
|
}
|
|
62
68
|
)
|
|
63
69
|
Button.button(
|
|
70
|
+
...props
|
|
64
71
|
disabled=disabled
|
|
65
72
|
style={ backgroundColor: value }
|
|
66
73
|
variant='flat'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/color-picker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@startupjs-ui/button": "^0.
|
|
12
|
-
"@startupjs-ui/core": "^0.
|
|
13
|
-
"@startupjs-ui/div": "^0.
|
|
14
|
-
"@startupjs-ui/modal": "^0.
|
|
15
|
-
"@startupjs-ui/scroll-view": "^0.
|
|
11
|
+
"@startupjs-ui/button": "^0.3.0",
|
|
12
|
+
"@startupjs-ui/core": "^0.3.0",
|
|
13
|
+
"@startupjs-ui/div": "^0.3.0",
|
|
14
|
+
"@startupjs-ui/modal": "^0.3.0",
|
|
15
|
+
"@startupjs-ui/scroll-view": "^0.3.0",
|
|
16
16
|
"color": "^3.1.2",
|
|
17
17
|
"react-native-color-picker": "^0.6.0"
|
|
18
18
|
},
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"react-native": "*",
|
|
22
22
|
"startupjs": "*"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "8d212b47680af1dfe582f9759b38724b46488e25"
|
|
25
25
|
}
|