@chayns-components/color-picker 5.5.26 → 5.5.28
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/AGENTS.md +47 -4
- package/package.json +4 -4
package/AGENTS.md
CHANGED
|
@@ -84,7 +84,24 @@ import { ColorPicker } from '@chayns-components/color-picker';
|
|
|
84
84
|
|
|
85
85
|
### Props
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
| name | type | required | description |
|
|
88
|
+
| --- | --- | --- | --- |
|
|
89
|
+
| `alignment` | `PopupAlignment \| undefined` | no | The alignment of the popup |
|
|
90
|
+
| `children` | `ReactNode` | no | The element that should be rendered to trigger the ColorPicker popup on click. |
|
|
91
|
+
| `onPresetColorAdd` | `((presetColor: IPresetColor) => void) \| undefined` | no | Function to be executed when a preset color is added. |
|
|
92
|
+
| `onPresetColorRemove` | `((presetColorId: string) => void) \| undefined` | no | Function to be executed when a preset color is removed. |
|
|
93
|
+
| `onSelect` | `((color: string) => void) \| undefined` | no | Function to be executed when a color is selected. |
|
|
94
|
+
| `presetColors` | `IPresetColor[] \| undefined` | no | Colors the user can select from. |
|
|
95
|
+
| `selectedColor` | `string \| undefined` | no | The color that should be preselected. |
|
|
96
|
+
| `shouldHideColorArea` | `boolean \| undefined` | no | Whether the color area should be displayed. |
|
|
97
|
+
| `shouldHideDefaultPresetColors` | `boolean \| undefined` | no | Whether the default preset colors should be hidden. |
|
|
98
|
+
| `shouldShowAsPopup` | `boolean \| undefined` | no | Whether the ColorPicker should be displayed inside a popup. |
|
|
99
|
+
| `shouldShowMoreOptions` | `boolean \| undefined` | no | Whether the more options accordion should be displayed. |
|
|
100
|
+
| `shouldShowPresetColors` | `boolean \| undefined` | no | Whether the preset colors should be displayed. |
|
|
101
|
+
| `shouldShowPreviewColorString` | `boolean \| undefined` | no | Whether the preview color should be displayed as text. |
|
|
102
|
+
| `shouldShowRoundPreviewColor` | `boolean \| undefined` | no | Whether the preview color should be displayed round. |
|
|
103
|
+
| `shouldShowTransparencySlider` | `boolean \| undefined` | no | Whether the transparency slider should be displayed. |
|
|
104
|
+
| `shouldUseSiteColors` | `boolean \| undefined` | no | Whether presetColors should be got and uploaded to the site storage. |
|
|
88
105
|
|
|
89
106
|
### Types
|
|
90
107
|
|
|
@@ -98,6 +115,7 @@ No additional exported types documented.
|
|
|
98
115
|
### Anti Patterns
|
|
99
116
|
|
|
100
117
|
- Avoid imports from internal paths such as `@chayns-components/color-picker/src/...`; always use the public package export.
|
|
118
|
+
- Avoid incomplete prop objects; follow the documented prop types and required fields.
|
|
101
119
|
## ColorPickerPopup
|
|
102
120
|
|
|
103
121
|
`ColorPickerPopup` is exported by `@chayns-components/color-picker` and should be imported from the public package entry point.
|
|
@@ -118,7 +136,17 @@ import { ColorPickerPopup } from '@chayns-components/color-picker';
|
|
|
118
136
|
|
|
119
137
|
### Props
|
|
120
138
|
|
|
121
|
-
|
|
139
|
+
| name | type | required | description |
|
|
140
|
+
| --- | --- | --- | --- |
|
|
141
|
+
| `onPresetColorAdd` | `((presetColor: IPresetColor) => void) \| undefined` | no | No description available. |
|
|
142
|
+
| `onPresetColorRemove` | `((presetColorId: string) => void) \| undefined` | no | No description available. |
|
|
143
|
+
| `presetColors` | `IPresetColor[] \| undefined` | no | No description available. |
|
|
144
|
+
| `shouldHideColorArea` | `boolean` | yes | No description available. |
|
|
145
|
+
| `shouldHideDefaultPresetColors` | `boolean` | yes | No description available. |
|
|
146
|
+
| `shouldShowMoreOptions` | `boolean` | yes | No description available. |
|
|
147
|
+
| `shouldShowPresetColors` | `boolean` | yes | No description available. |
|
|
148
|
+
| `shouldShowTransparencySlider` | `boolean` | yes | No description available. |
|
|
149
|
+
| `shouldUseSiteColors` | `boolean` | yes | No description available. |
|
|
122
150
|
|
|
123
151
|
### Types
|
|
124
152
|
|
|
@@ -128,10 +156,12 @@ No additional exported types documented.
|
|
|
128
156
|
|
|
129
157
|
- Import `ColorPickerPopup` directly from `@chayns-components/color-picker` instead of internal source paths.
|
|
130
158
|
- Start with one of the documented Storybook examples and adapt the props incrementally for your use case.
|
|
159
|
+
- Pay special attention to required props: `shouldHideColorArea`, `shouldHideDefaultPresetColors`, `shouldShowMoreOptions`, `shouldShowPresetColors`, `shouldShowTransparencySlider`, `shouldUseSiteColors`.
|
|
131
160
|
|
|
132
161
|
### Anti Patterns
|
|
133
162
|
|
|
134
163
|
- Avoid imports from internal paths such as `@chayns-components/color-picker/src/...`; always use the public package export.
|
|
164
|
+
- Avoid incomplete prop objects; follow the documented prop types and required fields.
|
|
135
165
|
## HueSlider
|
|
136
166
|
|
|
137
167
|
`HueSlider` is exported by `@chayns-components/color-picker` and should be imported from the public package entry point.
|
|
@@ -152,7 +182,13 @@ import { HueSlider } from '@chayns-components/color-picker';
|
|
|
152
182
|
|
|
153
183
|
### Props
|
|
154
184
|
|
|
155
|
-
|
|
185
|
+
| name | type | required | description |
|
|
186
|
+
| --- | --- | --- | --- |
|
|
187
|
+
| `color` | `Color \| undefined` | no | The color that should be selected. |
|
|
188
|
+
| `onChange` | `((rgb: Color \| undefined, hsl: Color \| undefined) => void) \| undefined` | no | Function that will be executed when the color is changed. |
|
|
189
|
+
| `onEnd` | `((rgb: Color \| undefined, hsl: Color \| undefined) => void) \| undefined` | no | Function that will be executed when the color is ending to change. |
|
|
190
|
+
| `onStart` | `((rgb: Color \| undefined, hsl: Color \| undefined) => void) \| undefined` | no | Function that will be executed when the color is starting to change. |
|
|
191
|
+
| `opacity` | `number \| undefined` | no | The opacity of the Color. Is used if the color has no opacity value. |
|
|
156
192
|
|
|
157
193
|
### Types
|
|
158
194
|
|
|
@@ -166,6 +202,7 @@ No additional exported types documented.
|
|
|
166
202
|
### Anti Patterns
|
|
167
203
|
|
|
168
204
|
- Avoid imports from internal paths such as `@chayns-components/color-picker/src/...`; always use the public package export.
|
|
205
|
+
- Avoid incomplete prop objects; follow the documented prop types and required fields.
|
|
169
206
|
## TransparencySlider
|
|
170
207
|
|
|
171
208
|
`TransparencySlider` is exported by `@chayns-components/color-picker` and should be imported from the public package entry point.
|
|
@@ -188,7 +225,12 @@ import { TransparencySlider } from '@chayns-components/color-picker';
|
|
|
188
225
|
|
|
189
226
|
### Props
|
|
190
227
|
|
|
191
|
-
|
|
228
|
+
| name | type | required | description |
|
|
229
|
+
| --- | --- | --- | --- |
|
|
230
|
+
| `color` | `string \| undefined` | no | The color that should be selected. |
|
|
231
|
+
| `onChange` | `((color: string) => void) \| undefined` | no | Function that will be executed when the opacity is changed. |
|
|
232
|
+
| `onEnd` | `((color: string) => void) \| undefined` | no | Function that will be executed when the opacity is ending to change. |
|
|
233
|
+
| `onStart` | `((color: string) => void) \| undefined` | no | Function that will be executed when the opacity is starting to change. |
|
|
192
234
|
|
|
193
235
|
### Types
|
|
194
236
|
|
|
@@ -202,3 +244,4 @@ No additional exported types documented.
|
|
|
202
244
|
### Anti Patterns
|
|
203
245
|
|
|
204
246
|
- Avoid imports from internal paths such as `@chayns-components/color-picker/src/...`; always use the public package export.
|
|
247
|
+
- Avoid incomplete prop objects; follow the documented prop types and required fields.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/color-picker",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.28",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"typescript": "^5.9.3"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@chayns-components/core": "^5.5.
|
|
73
|
-
"@chayns-components/textstring": "^5.5.
|
|
72
|
+
"@chayns-components/core": "^5.5.28",
|
|
73
|
+
"@chayns-components/textstring": "^5.5.28",
|
|
74
74
|
"@chayns/colors": "^2.0.2",
|
|
75
75
|
"react-compiler-runtime": "^1.0.0"
|
|
76
76
|
},
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "20b5354c0ee43c56e9919589f6b3bad7cf6b14bb"
|
|
88
88
|
}
|