Commit a4d625e
feat(InputColor): New ColorPicker base component, major overhaul of InputColor (#2013)
* Initial commit
* Utilized basic hsv to string conversion functions from color_format_utils
* Added color prop to accept color state piece
* Added handle to HueSlider
* Added handle to SaturationAndLightnessPreview
* Fixed react preemptive state update bug
* Added drag to HueSlider
* Added drag handler to SaturationAndLightnessPreview
* Removed Box from story
* Added proper click + grab behavior to HueSlider
- Also proper cursor styling
* Added point and grab to Preview element
* Fixed "too many classes generated" bug
* Renamed Light and Saturation preview component
* Moved HueSlider and LightSaturationPreview into InputColor
* Removed LuminositySlider code
* Removed all mentions of ColorWheel code
* Revert "Removed LuminositySlider code"
This reverts commit 07eda61.
* Fixed imports in HueSlider and LSPreview
* Removed unnecessary color and backgroundColor props
* Added ColorPicker component
* Updated InputColor tests
* Reexported ColorWheel and LuminositySlider to fix gatsby
* Luke feedback
* Added comments about transform math
* Removed LuminositySlider and ColorWheel components
* Moved used util functions to separate files
* Renamed color_utils to isValidColor
* Renamed color_utils.test to toPercent.test
* Removed unused color format util functions
* Fixed spelling error on simpleHsvToFormattedColorString name
* Be gone ColorWheel docs
* Remove unused utils & attributes
* Fixed HueSlider color and moved Handle2d to own file
* HueSlider - Removed SLIDER_HEIGHT
* Consolidated HANDLE_HEIGHT and WIDTH to HANDLE_SIZE in Handle2d
* Consolidated types for ColorPicker, HueSlider and LightSatPreview
* Consolidated width to originate from InputColor ColorPicker element
* Moved HueSliderHandle to own file
* DRY-ed up Handle and Handle2d
* Renamed handleClick to handleMouseDown
- Less confusing since this is fed to onMouseDown in div element
* Proposed InputColor test and fix
* Revert "Proposed InputColor test and fix"
This reverts commit 5d033bf.
* Added InputColor click test
* Added blur focus test to InputColor
* Added xtest for InputColor drag event
Co-authored-by: Luke Bowerman <[email protected]>1 parent aa992e6 commit a4d625e
File tree
40 files changed
+720
-2640
lines changed- config
- packages/components/src/Form/Inputs/InputColor
- ColorPicker
- ColorWheel
- __snapshots__
- Handle
- HueSlider
- LightSaturationPreview
- LuminositySlider
- __snapshots__
- Swatch
- __snapshots__
- utils
- www/src
- MDX/Pre
- documentation/components
- content
- fields
40 files changed
+720
-2640
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
Lines changed: 14 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 27 | + | |
0 commit comments