@instructure/ui-color-picker 8.25.1-snapshot-20
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 +17 -0
- package/README.md +46 -0
- package/es/ColorContrast/ColorContrastLocator.js +54 -0
- package/es/ColorContrast/index.js +174 -0
- package/es/ColorContrast/props.js +40 -0
- package/es/ColorContrast/styles.js +99 -0
- package/es/ColorContrast/theme.js +55 -0
- package/es/ColorIndicator/ColorIndicatorLocator.js +40 -0
- package/es/ColorIndicator/index.js +91 -0
- package/es/ColorIndicator/props.js +31 -0
- package/es/ColorIndicator/styles.js +70 -0
- package/es/ColorIndicator/theme.js +53 -0
- package/es/ColorMixer/ColorMixerLocator.js +27 -0
- package/es/ColorMixer/ColorPalette/index.js +258 -0
- package/es/ColorMixer/ColorPalette/props.js +37 -0
- package/es/ColorMixer/ColorPalette/styles.js +81 -0
- package/es/ColorMixer/ColorPalette/theme.js +48 -0
- package/es/ColorMixer/RGBAInput/index.js +148 -0
- package/es/ColorMixer/RGBAInput/props.js +39 -0
- package/es/ColorMixer/RGBAInput/styles.js +63 -0
- package/es/ColorMixer/RGBAInput/theme.js +43 -0
- package/es/ColorMixer/Slider/index.js +218 -0
- package/es/ColorMixer/Slider/props.js +38 -0
- package/es/ColorMixer/Slider/styles.js +95 -0
- package/es/ColorMixer/Slider/theme.js +53 -0
- package/es/ColorMixer/index.js +232 -0
- package/es/ColorMixer/props.js +40 -0
- package/es/ColorMixer/styles.js +49 -0
- package/es/ColorMixer/utils/shallowCompare.js +32 -0
- package/es/ColorPicker/ColorPickerLocator.js +137 -0
- package/es/ColorPicker/index.js +487 -0
- package/es/ColorPicker/props.js +47 -0
- package/es/ColorPicker/styles.js +119 -0
- package/es/ColorPicker/theme.js +76 -0
- package/es/ColorPreset/ColorPresetLocator.js +27 -0
- package/es/ColorPreset/index.js +268 -0
- package/es/ColorPreset/props.js +36 -0
- package/es/ColorPreset/styles.js +102 -0
- package/es/ColorPreset/theme.js +53 -0
- package/es/index.js +28 -0
- package/lib/ColorContrast/ColorContrastLocator.js +66 -0
- package/lib/ColorContrast/index.js +169 -0
- package/lib/ColorContrast/props.js +51 -0
- package/lib/ColorContrast/styles.js +107 -0
- package/lib/ColorContrast/theme.js +63 -0
- package/lib/ColorIndicator/ColorIndicatorLocator.js +51 -0
- package/lib/ColorIndicator/index.js +82 -0
- package/lib/ColorIndicator/props.js +42 -0
- package/lib/ColorIndicator/styles.js +78 -0
- package/lib/ColorIndicator/theme.js +63 -0
- package/lib/ColorMixer/ColorMixerLocator.js +37 -0
- package/lib/ColorMixer/ColorPalette/index.js +252 -0
- package/lib/ColorMixer/ColorPalette/props.js +48 -0
- package/lib/ColorMixer/ColorPalette/styles.js +90 -0
- package/lib/ColorMixer/ColorPalette/theme.js +57 -0
- package/lib/ColorMixer/RGBAInput/index.js +142 -0
- package/lib/ColorMixer/RGBAInput/props.js +50 -0
- package/lib/ColorMixer/RGBAInput/styles.js +71 -0
- package/lib/ColorMixer/RGBAInput/theme.js +51 -0
- package/lib/ColorMixer/Slider/index.js +211 -0
- package/lib/ColorMixer/Slider/props.js +49 -0
- package/lib/ColorMixer/Slider/styles.js +103 -0
- package/lib/ColorMixer/Slider/theme.js +62 -0
- package/lib/ColorMixer/index.js +226 -0
- package/lib/ColorMixer/props.js +51 -0
- package/lib/ColorMixer/styles.js +57 -0
- package/lib/ColorMixer/utils/shallowCompare.js +40 -0
- package/lib/ColorPicker/ColorPickerLocator.js +151 -0
- package/lib/ColorPicker/index.js +500 -0
- package/lib/ColorPicker/props.js +58 -0
- package/lib/ColorPicker/styles.js +127 -0
- package/lib/ColorPicker/theme.js +85 -0
- package/lib/ColorPreset/ColorPresetLocator.js +37 -0
- package/lib/ColorPreset/index.js +274 -0
- package/lib/ColorPreset/props.js +47 -0
- package/lib/ColorPreset/styles.js +110 -0
- package/lib/ColorPreset/theme.js +61 -0
- package/lib/index.js +45 -0
- package/lib/package.json +1 -0
- package/package.json +62 -0
- package/src/ColorContrast/ColorContrastLocator.ts +51 -0
- package/src/ColorContrast/README.md +111 -0
- package/src/ColorContrast/index.tsx +189 -0
- package/src/ColorContrast/props.ts +140 -0
- package/src/ColorContrast/styles.ts +102 -0
- package/src/ColorContrast/theme.ts +62 -0
- package/src/ColorIndicator/ColorIndicatorLocator.ts +41 -0
- package/src/ColorIndicator/README.md +76 -0
- package/src/ColorIndicator/index.tsx +89 -0
- package/src/ColorIndicator/props.ts +68 -0
- package/src/ColorIndicator/styles.ts +88 -0
- package/src/ColorIndicator/theme.ts +58 -0
- package/src/ColorMixer/ColorMixerLocator.ts +29 -0
- package/src/ColorMixer/ColorPalette/index.tsx +250 -0
- package/src/ColorMixer/ColorPalette/props.ts +87 -0
- package/src/ColorMixer/ColorPalette/styles.ts +94 -0
- package/src/ColorMixer/ColorPalette/theme.ts +52 -0
- package/src/ColorMixer/README.md +98 -0
- package/src/ColorMixer/RGBAInput/index.tsx +172 -0
- package/src/ColorMixer/RGBAInput/props.ts +93 -0
- package/src/ColorMixer/RGBAInput/styles.ts +69 -0
- package/src/ColorMixer/RGBAInput/theme.ts +48 -0
- package/src/ColorMixer/Slider/index.tsx +242 -0
- package/src/ColorMixer/Slider/props.ts +94 -0
- package/src/ColorMixer/Slider/styles.ts +114 -0
- package/src/ColorMixer/Slider/theme.ts +59 -0
- package/src/ColorMixer/index.tsx +221 -0
- package/src/ColorMixer/props.ts +169 -0
- package/src/ColorMixer/styles.ts +51 -0
- package/src/ColorMixer/utils/shallowCompare.ts +35 -0
- package/src/ColorPicker/ColorPickerLocator.ts +124 -0
- package/src/ColorPicker/README.md +420 -0
- package/src/ColorPicker/index.tsx +609 -0
- package/src/ColorPicker/props.ts +293 -0
- package/src/ColorPicker/styles.ts +131 -0
- package/src/ColorPicker/theme.ts +80 -0
- package/src/ColorPreset/ColorPresetLocator.ts +29 -0
- package/src/ColorPreset/README.md +121 -0
- package/src/ColorPreset/index.tsx +328 -0
- package/src/ColorPreset/props.ts +162 -0
- package/src/ColorPreset/styles.ts +107 -0
- package/src/ColorPreset/theme.ts +58 -0
- package/src/index.ts +34 -0
- package/tsconfig.build.json +36 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/types/ColorContrast/ColorContrastLocator.d.ts +592 -0
- package/types/ColorContrast/ColorContrastLocator.d.ts.map +1 -0
- package/types/ColorContrast/index.d.ts +61 -0
- package/types/ColorContrast/index.d.ts.map +1 -0
- package/types/ColorContrast/props.d.ts +62 -0
- package/types/ColorContrast/props.d.ts.map +1 -0
- package/types/ColorContrast/styles.d.ts +76 -0
- package/types/ColorContrast/styles.d.ts.map +1 -0
- package/types/ColorContrast/theme.d.ts +10 -0
- package/types/ColorContrast/theme.d.ts.map +1 -0
- package/types/ColorIndicator/ColorIndicatorLocator.d.ts +577 -0
- package/types/ColorIndicator/ColorIndicatorLocator.d.ts.map +1 -0
- package/types/ColorIndicator/index.d.ts +35 -0
- package/types/ColorIndicator/index.d.ts.map +1 -0
- package/types/ColorIndicator/props.d.ts +25 -0
- package/types/ColorIndicator/props.d.ts.map +1 -0
- package/types/ColorIndicator/styles.d.ts +15 -0
- package/types/ColorIndicator/styles.d.ts.map +1 -0
- package/types/ColorIndicator/theme.d.ts +11 -0
- package/types/ColorIndicator/theme.d.ts.map +1 -0
- package/types/ColorMixer/ColorMixerLocator.d.ts +566 -0
- package/types/ColorMixer/ColorMixerLocator.d.ts.map +1 -0
- package/types/ColorMixer/ColorPalette/index.d.ts +70 -0
- package/types/ColorMixer/ColorPalette/index.d.ts.map +1 -0
- package/types/ColorMixer/ColorPalette/props.d.ts +29 -0
- package/types/ColorMixer/ColorPalette/props.d.ts.map +1 -0
- package/types/ColorMixer/ColorPalette/styles.d.ts +15 -0
- package/types/ColorMixer/ColorPalette/styles.d.ts.map +1 -0
- package/types/ColorMixer/ColorPalette/theme.d.ts +10 -0
- package/types/ColorMixer/ColorPalette/theme.d.ts.map +1 -0
- package/types/ColorMixer/RGBAInput/index.d.ts +51 -0
- package/types/ColorMixer/RGBAInput/index.d.ts.map +1 -0
- package/types/ColorMixer/RGBAInput/props.d.ts +28 -0
- package/types/ColorMixer/RGBAInput/props.d.ts.map +1 -0
- package/types/ColorMixer/RGBAInput/styles.d.ts +15 -0
- package/types/ColorMixer/RGBAInput/styles.d.ts.map +1 -0
- package/types/ColorMixer/RGBAInput/theme.d.ts +10 -0
- package/types/ColorMixer/RGBAInput/theme.d.ts.map +1 -0
- package/types/ColorMixer/Slider/index.d.ts +64 -0
- package/types/ColorMixer/Slider/index.d.ts.map +1 -0
- package/types/ColorMixer/Slider/props.d.ts +26 -0
- package/types/ColorMixer/Slider/props.d.ts.map +1 -0
- package/types/ColorMixer/Slider/styles.d.ts +15 -0
- package/types/ColorMixer/Slider/styles.d.ts.map +1 -0
- package/types/ColorMixer/Slider/theme.d.ts +10 -0
- package/types/ColorMixer/Slider/theme.d.ts.map +1 -0
- package/types/ColorMixer/index.d.ts +59 -0
- package/types/ColorMixer/index.d.ts.map +1 -0
- package/types/ColorMixer/props.d.ts +91 -0
- package/types/ColorMixer/props.d.ts.map +1 -0
- package/types/ColorMixer/styles.d.ts +14 -0
- package/types/ColorMixer/styles.d.ts.map +1 -0
- package/types/ColorMixer/utils/shallowCompare.d.ts +3 -0
- package/types/ColorMixer/utils/shallowCompare.d.ts.map +1 -0
- package/types/ColorPicker/ColorPickerLocator.d.ts +4113 -0
- package/types/ColorPicker/ColorPickerLocator.d.ts.map +1 -0
- package/types/ColorPicker/index.d.ts +158 -0
- package/types/ColorPicker/index.d.ts.map +1 -0
- package/types/ColorPicker/props.d.ts +166 -0
- package/types/ColorPicker/props.d.ts.map +1 -0
- package/types/ColorPicker/styles.d.ts +17 -0
- package/types/ColorPicker/styles.d.ts.map +1 -0
- package/types/ColorPicker/theme.d.ts +10 -0
- package/types/ColorPicker/theme.d.ts.map +1 -0
- package/types/ColorPreset/ColorPresetLocator.d.ts +566 -0
- package/types/ColorPreset/ColorPresetLocator.d.ts.map +1 -0
- package/types/ColorPreset/index.d.ts +100 -0
- package/types/ColorPreset/index.d.ts.map +1 -0
- package/types/ColorPreset/props.d.ts +87 -0
- package/types/ColorPreset/props.d.ts.map +1 -0
- package/types/ColorPreset/styles.d.ts +77 -0
- package/types/ColorPreset/styles.d.ts.map +1 -0
- package/types/ColorPreset/theme.d.ts +10 -0
- package/types/ColorPreset/theme.d.ts.map +1 -0
- package/types/index.d.ts +11 -0
- package/types/index.d.ts.map +1 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import PropTypes from 'prop-types'
|
|
26
|
+
|
|
27
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
28
|
+
import type {
|
|
29
|
+
OtherHTMLAttributes,
|
|
30
|
+
PropValidators,
|
|
31
|
+
ColorMixerSliderTheme
|
|
32
|
+
} from '@instructure/shared-types'
|
|
33
|
+
|
|
34
|
+
type SliderOwnProps = {
|
|
35
|
+
isColorSlider?: boolean
|
|
36
|
+
onChange: (position: number) => void
|
|
37
|
+
width: number
|
|
38
|
+
value: number
|
|
39
|
+
minValue: number
|
|
40
|
+
maxValue: number
|
|
41
|
+
indicatorRadius: number
|
|
42
|
+
height: number
|
|
43
|
+
elementRef?: (element: Element | null) => void
|
|
44
|
+
navigationExplanationScreenReaderLabel: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type PropKeys = keyof SliderOwnProps
|
|
48
|
+
|
|
49
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
50
|
+
|
|
51
|
+
type SliderProps = SliderOwnProps &
|
|
52
|
+
WithStyleProps<ColorMixerSliderTheme, SliderStyle> &
|
|
53
|
+
OtherHTMLAttributes<SliderOwnProps>
|
|
54
|
+
|
|
55
|
+
type SliderStyleProps = {
|
|
56
|
+
sliderPositionFromValue: number
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type SliderStyle = ComponentStyle<
|
|
60
|
+
| 'colorSlider'
|
|
61
|
+
| 'indicator'
|
|
62
|
+
| 'slider'
|
|
63
|
+
| 'sliderBackground'
|
|
64
|
+
| 'disabledOverlay'
|
|
65
|
+
>
|
|
66
|
+
|
|
67
|
+
const propTypes: PropValidators<PropKeys> = {
|
|
68
|
+
isColorSlider: PropTypes.bool,
|
|
69
|
+
onChange: PropTypes.func.isRequired,
|
|
70
|
+
width: PropTypes.number.isRequired,
|
|
71
|
+
value: PropTypes.number.isRequired,
|
|
72
|
+
minValue: PropTypes.number.isRequired,
|
|
73
|
+
maxValue: PropTypes.number.isRequired,
|
|
74
|
+
indicatorRadius: PropTypes.number.isRequired,
|
|
75
|
+
height: PropTypes.number.isRequired,
|
|
76
|
+
elementRef: PropTypes.func,
|
|
77
|
+
navigationExplanationScreenReaderLabel: PropTypes.string.isRequired
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const allowedProps: AllowedPropKeys = [
|
|
81
|
+
'isColorSlider',
|
|
82
|
+
'onChange',
|
|
83
|
+
'width',
|
|
84
|
+
'value',
|
|
85
|
+
'minValue',
|
|
86
|
+
'maxValue',
|
|
87
|
+
'indicatorRadius',
|
|
88
|
+
'height',
|
|
89
|
+
'elementRef',
|
|
90
|
+
'navigationExplanationScreenReaderLabel'
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
export type { SliderProps, SliderStyle, SliderStyleProps }
|
|
94
|
+
export { propTypes, allowedProps }
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import type { ColorMixerSliderTheme } from '@instructure/shared-types'
|
|
26
|
+
import type { SliderStyle, SliderProps, SliderStyleProps } from './props'
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* ---
|
|
30
|
+
* private: true
|
|
31
|
+
* ---
|
|
32
|
+
* Generates the style object from the theme and provided additional information
|
|
33
|
+
* @param {Object} componentTheme The theme variable object.
|
|
34
|
+
* @param {Object} props the props of the component, the style is applied to
|
|
35
|
+
* @param {Object} state the state of the component, the style is applied to
|
|
36
|
+
* @return {Object} The final style object, which will be used in the component
|
|
37
|
+
*/
|
|
38
|
+
const generateStyle = (
|
|
39
|
+
componentTheme: ColorMixerSliderTheme,
|
|
40
|
+
props: SliderProps,
|
|
41
|
+
state: SliderStyleProps
|
|
42
|
+
): SliderStyle => {
|
|
43
|
+
const sliderBackground = props.isColorSlider
|
|
44
|
+
? {
|
|
45
|
+
background:
|
|
46
|
+
'linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)'
|
|
47
|
+
}
|
|
48
|
+
: {
|
|
49
|
+
background: componentTheme.checkerboardBackgroundImage,
|
|
50
|
+
backgroundSize: componentTheme.checkerboardBackgroundSize,
|
|
51
|
+
backgroundPosition: componentTheme.checkerboardBackgroundPosition
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
colorSlider: {
|
|
56
|
+
label: 'colorMixerSlider'
|
|
57
|
+
},
|
|
58
|
+
indicator: {
|
|
59
|
+
label: 'colorMixerSlider__indicator',
|
|
60
|
+
width: `${props.indicatorRadius / 8}rem`,
|
|
61
|
+
height: `${props.indicatorRadius / 8}rem`,
|
|
62
|
+
borderRadius: `${props.indicatorRadius / 8}rem`,
|
|
63
|
+
background: 'white',
|
|
64
|
+
position: 'absolute',
|
|
65
|
+
borderStyle: 'solid',
|
|
66
|
+
borderWidth: componentTheme.indicatorBorderWidth,
|
|
67
|
+
borderColor: componentTheme.indicatorBorderColor,
|
|
68
|
+
top: `-0.1875rem`,
|
|
69
|
+
left: `${
|
|
70
|
+
(state?.sliderPositionFromValue - props.indicatorRadius) / 16
|
|
71
|
+
}rem`,
|
|
72
|
+
zIndex: componentTheme.indicatorZIndex
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
sliderBackground: {
|
|
76
|
+
label: 'colorMixerSlider__sliderBackground',
|
|
77
|
+
borderRadius: `${props.height / 16}rem`,
|
|
78
|
+
width: `${props.width / 16}rem`,
|
|
79
|
+
height: `${props.height / 16}rem`,
|
|
80
|
+
boxSizing: 'border-box',
|
|
81
|
+
...sliderBackground
|
|
82
|
+
},
|
|
83
|
+
slider: {
|
|
84
|
+
label: 'colorMixerSlider__slider',
|
|
85
|
+
width: `${props.width / 16}rem`,
|
|
86
|
+
height: `${props.height / 16}rem`,
|
|
87
|
+
background: props.isColorSlider
|
|
88
|
+
? 'transparent'
|
|
89
|
+
: `linear-gradient(to right, rgba(255,0,0,0), ${props.color?.slice(
|
|
90
|
+
0,
|
|
91
|
+
-2
|
|
92
|
+
)})`,
|
|
93
|
+
borderRadius: `${props.height / 16}rem`,
|
|
94
|
+
|
|
95
|
+
boxSizing: 'border-box',
|
|
96
|
+
|
|
97
|
+
borderStyle: 'solid',
|
|
98
|
+
borderColor: componentTheme.colorIndicatorBorderColor,
|
|
99
|
+
borderWidth: componentTheme.sliderBorderWidth
|
|
100
|
+
},
|
|
101
|
+
disabledOverlay: {
|
|
102
|
+
label: 'colorMixerSlider__disabledOverlay',
|
|
103
|
+
background: 'rgba(255,255,255,.5)',
|
|
104
|
+
zIndex: componentTheme.disabledOverlayZIndex,
|
|
105
|
+
width: `${props.width / 16 + 1}rem`,
|
|
106
|
+
height: `${props.height / 16 + 1}rem`,
|
|
107
|
+
position: 'absolute',
|
|
108
|
+
top: '-.5rem',
|
|
109
|
+
left: '-.5rem'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export default generateStyle
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import type { Theme } from '@instructure/ui-themes'
|
|
26
|
+
import type { ColorMixerSliderTheme } from '@instructure/shared-types'
|
|
27
|
+
import { colorIndicatorBorderColor } from '../../ColorIndicator/theme'
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generates the theme object for the component from the theme and provided additional information
|
|
31
|
+
* @param {Object} theme The actual theme object.
|
|
32
|
+
* @return {Object} The final theme object with the overrides and component variables
|
|
33
|
+
*/
|
|
34
|
+
const generateComponentTheme = (theme: Theme): ColorMixerSliderTheme => {
|
|
35
|
+
const { colors, borders, stacking } = theme
|
|
36
|
+
|
|
37
|
+
const componentVariables = {
|
|
38
|
+
indicatorBorderColor: colors.licorice,
|
|
39
|
+
|
|
40
|
+
checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
|
|
41
|
+
linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
|
|
42
|
+
linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
|
|
43
|
+
linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
|
|
44
|
+
checkerboardBackgroundSize: '.5rem .5rem',
|
|
45
|
+
checkerboardBackgroundPosition:
|
|
46
|
+
'0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
|
|
47
|
+
colorIndicatorBorderColor,
|
|
48
|
+
indicatorBorderWidth: borders.widthSmall,
|
|
49
|
+
sliderBorderWidth: borders.widthSmall,
|
|
50
|
+
indicatorZIndex: stacking.above,
|
|
51
|
+
disabledOverlayZIndex: stacking.topmost
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
...componentVariables
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export default generateComponentTheme
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** @jsx jsx */
|
|
26
|
+
import { Component } from 'react'
|
|
27
|
+
|
|
28
|
+
import { withStyle, jsx } from '@instructure/emotion'
|
|
29
|
+
import { passthroughProps } from '@instructure/ui-react-utils'
|
|
30
|
+
import { testable } from '@instructure/ui-testable'
|
|
31
|
+
import {
|
|
32
|
+
colorToHex8,
|
|
33
|
+
colorToHsva,
|
|
34
|
+
colorToRGB
|
|
35
|
+
} from '@instructure/ui-color-utils'
|
|
36
|
+
|
|
37
|
+
import ColorPalette from './ColorPalette'
|
|
38
|
+
import Slider from './Slider'
|
|
39
|
+
import RGBAInput from './RGBAInput'
|
|
40
|
+
|
|
41
|
+
import type { ColorMixerProps, ColorMixerState, HSVType } from './props'
|
|
42
|
+
import { propTypes, allowedProps } from './props'
|
|
43
|
+
import generateStyle from './styles'
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
---
|
|
47
|
+
category: components
|
|
48
|
+
---
|
|
49
|
+
@tsProps
|
|
50
|
+
**/
|
|
51
|
+
@withStyle(generateStyle, null)
|
|
52
|
+
@testable()
|
|
53
|
+
class ColorMixer extends Component<ColorMixerProps, ColorMixerState> {
|
|
54
|
+
static propTypes = propTypes
|
|
55
|
+
static allowedProps = allowedProps
|
|
56
|
+
static readonly componentId = 'ColorMixer'
|
|
57
|
+
|
|
58
|
+
static defaultProps = {
|
|
59
|
+
withAlpha: false,
|
|
60
|
+
disabled: false
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
constructor(props: ColorMixerProps) {
|
|
64
|
+
super(props)
|
|
65
|
+
this.state = {
|
|
66
|
+
h: 0,
|
|
67
|
+
s: 0,
|
|
68
|
+
v: 0,
|
|
69
|
+
a: 1
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
ref: HTMLDivElement | null = null
|
|
74
|
+
|
|
75
|
+
private _width = 272
|
|
76
|
+
private _paletteHeight = 160
|
|
77
|
+
private _sliderHeight = 8
|
|
78
|
+
private _sliderIndicatorRadius = 6
|
|
79
|
+
private _paletteIndicatorRadius = 6
|
|
80
|
+
|
|
81
|
+
handleRef = (el: HTMLDivElement | null) => {
|
|
82
|
+
const { elementRef } = this.props
|
|
83
|
+
|
|
84
|
+
this.ref = el
|
|
85
|
+
|
|
86
|
+
if (typeof elementRef === 'function') {
|
|
87
|
+
elementRef(el)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
componentDidMount() {
|
|
92
|
+
this.props.makeStyles?.()
|
|
93
|
+
if (this.props.value) {
|
|
94
|
+
this.setState({
|
|
95
|
+
...colorToHsva(this.props.value)
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
componentDidUpdate(prevProps: ColorMixerProps, prevState: ColorMixerState) {
|
|
101
|
+
this.props.makeStyles?.()
|
|
102
|
+
const { h, s, v, a } = this.state
|
|
103
|
+
if (
|
|
104
|
+
prevState.h !== h ||
|
|
105
|
+
prevState.s !== s ||
|
|
106
|
+
prevState.v !== v ||
|
|
107
|
+
prevState.a !== a
|
|
108
|
+
) {
|
|
109
|
+
this.props.onChange(colorToHex8({ h, s, v, a }))
|
|
110
|
+
}
|
|
111
|
+
if (
|
|
112
|
+
prevProps.value !== this.props.value &&
|
|
113
|
+
colorToHex8({ h, s, v, a }) !== this.props.value
|
|
114
|
+
) {
|
|
115
|
+
this.setState({
|
|
116
|
+
...colorToHsva(this.props.value)
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
render() {
|
|
122
|
+
const {
|
|
123
|
+
disabled,
|
|
124
|
+
onChange,
|
|
125
|
+
value,
|
|
126
|
+
elementRef,
|
|
127
|
+
styles,
|
|
128
|
+
withAlpha,
|
|
129
|
+
rgbRedInputScreenReaderLabel,
|
|
130
|
+
rgbGreenInputScreenReaderLabel,
|
|
131
|
+
rgbBlueInputScreenReaderLabel,
|
|
132
|
+
rgbAlphaInputScreenReaderLabel,
|
|
133
|
+
colorSliderNavigationExplanationScreenReaderLabel,
|
|
134
|
+
alphaSliderNavigationExplanationScreenReaderLabel,
|
|
135
|
+
colorPaletteNavigationExplanationScreenReaderLabel,
|
|
136
|
+
...props
|
|
137
|
+
} = this.props
|
|
138
|
+
const { h, s, v, a } = this.state
|
|
139
|
+
return (
|
|
140
|
+
<div
|
|
141
|
+
{...passthroughProps(props)}
|
|
142
|
+
aria-disabled={disabled}
|
|
143
|
+
ref={this.handleRef}
|
|
144
|
+
css={styles?.colorMixer}
|
|
145
|
+
>
|
|
146
|
+
<span
|
|
147
|
+
css={styles?.sliderAndPaletteContainer}
|
|
148
|
+
aria-label={`${colorToHex8({ h, s, v, a })}`}
|
|
149
|
+
aria-live="polite"
|
|
150
|
+
>
|
|
151
|
+
<ColorPalette
|
|
152
|
+
disabled={disabled}
|
|
153
|
+
width={this._width}
|
|
154
|
+
height={this._paletteHeight}
|
|
155
|
+
indicatorRadius={this._paletteIndicatorRadius}
|
|
156
|
+
hue={h}
|
|
157
|
+
color={{
|
|
158
|
+
h,
|
|
159
|
+
s,
|
|
160
|
+
v
|
|
161
|
+
}}
|
|
162
|
+
onChange={(color: HSVType) => {
|
|
163
|
+
this.setState({ s: color.s, v: color.v })
|
|
164
|
+
}}
|
|
165
|
+
navigationExplanationScreenReaderLabel={
|
|
166
|
+
colorPaletteNavigationExplanationScreenReaderLabel
|
|
167
|
+
}
|
|
168
|
+
/>
|
|
169
|
+
<Slider
|
|
170
|
+
disabled={disabled}
|
|
171
|
+
isColorSlider
|
|
172
|
+
width={this._width}
|
|
173
|
+
height={this._sliderHeight}
|
|
174
|
+
indicatorRadius={this._sliderIndicatorRadius}
|
|
175
|
+
value={h}
|
|
176
|
+
minValue={0}
|
|
177
|
+
maxValue={359}
|
|
178
|
+
color={colorToHex8({ h, s, v, a })}
|
|
179
|
+
onChange={(hue: number) => {
|
|
180
|
+
this.setState({ h: hue })
|
|
181
|
+
}}
|
|
182
|
+
navigationExplanationScreenReaderLabel={
|
|
183
|
+
colorSliderNavigationExplanationScreenReaderLabel
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
{withAlpha && (
|
|
187
|
+
<Slider
|
|
188
|
+
disabled={disabled}
|
|
189
|
+
width={this._width}
|
|
190
|
+
height={this._sliderHeight}
|
|
191
|
+
indicatorRadius={this._sliderIndicatorRadius}
|
|
192
|
+
color={colorToHex8({ h, s, v })}
|
|
193
|
+
value={a}
|
|
194
|
+
minValue={0}
|
|
195
|
+
maxValue={1}
|
|
196
|
+
onChange={(opacity) => this.setState({ a: opacity / 100 })}
|
|
197
|
+
navigationExplanationScreenReaderLabel={
|
|
198
|
+
alphaSliderNavigationExplanationScreenReaderLabel
|
|
199
|
+
}
|
|
200
|
+
/>
|
|
201
|
+
)}
|
|
202
|
+
</span>
|
|
203
|
+
<RGBAInput
|
|
204
|
+
disabled={disabled}
|
|
205
|
+
label={withAlpha ? 'RGBA' : 'RGB'}
|
|
206
|
+
width={this._width}
|
|
207
|
+
value={colorToRGB({ h, s, v, a })}
|
|
208
|
+
onChange={(color) => this.setState({ ...colorToHsva(color) })}
|
|
209
|
+
withAlpha={withAlpha}
|
|
210
|
+
rgbRedInputScreenReaderLabel={rgbRedInputScreenReaderLabel}
|
|
211
|
+
rgbGreenInputScreenReaderLabel={rgbGreenInputScreenReaderLabel}
|
|
212
|
+
rgbBlueInputScreenReaderLabel={rgbBlueInputScreenReaderLabel}
|
|
213
|
+
rgbAlphaInputScreenReaderLabel={rgbAlphaInputScreenReaderLabel}
|
|
214
|
+
/>
|
|
215
|
+
</div>
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export { ColorMixer }
|
|
221
|
+
export default ColorMixer
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import PropTypes from 'prop-types'
|
|
26
|
+
|
|
27
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
28
|
+
import type {
|
|
29
|
+
OtherHTMLAttributes,
|
|
30
|
+
PropValidators
|
|
31
|
+
} from '@instructure/shared-types'
|
|
32
|
+
|
|
33
|
+
type RGBType = {
|
|
34
|
+
r: number
|
|
35
|
+
g: number
|
|
36
|
+
b: number
|
|
37
|
+
}
|
|
38
|
+
type HSVType = {
|
|
39
|
+
h: number
|
|
40
|
+
s: number
|
|
41
|
+
v: number
|
|
42
|
+
}
|
|
43
|
+
type HSLType = {
|
|
44
|
+
h: number
|
|
45
|
+
s: number
|
|
46
|
+
l: number
|
|
47
|
+
}
|
|
48
|
+
type RGBAType = {
|
|
49
|
+
r: number
|
|
50
|
+
g: number
|
|
51
|
+
b: number
|
|
52
|
+
a: number
|
|
53
|
+
}
|
|
54
|
+
type ColorMixerOwnProps = {
|
|
55
|
+
/**
|
|
56
|
+
* Makes the component uninteractable
|
|
57
|
+
*/
|
|
58
|
+
disabled?: boolean
|
|
59
|
+
/**
|
|
60
|
+
* Provides a reference to the component's underlying html element.
|
|
61
|
+
*/
|
|
62
|
+
elementRef?: (element: Element | null) => void
|
|
63
|
+
/**
|
|
64
|
+
* Gets called each time the color changes
|
|
65
|
+
*/
|
|
66
|
+
onChange: (hex: string) => void
|
|
67
|
+
/**
|
|
68
|
+
* Sets the value of the component. If changes, the color changes inside the component as well
|
|
69
|
+
*/
|
|
70
|
+
value: string
|
|
71
|
+
/**
|
|
72
|
+
* Toggles alpha. If true, alpha slider will appear
|
|
73
|
+
*/
|
|
74
|
+
withAlpha: boolean
|
|
75
|
+
/**
|
|
76
|
+
* screenReaderLabel for the RGBA input's red input field
|
|
77
|
+
*/
|
|
78
|
+
rgbRedInputScreenReaderLabel: string
|
|
79
|
+
/**
|
|
80
|
+
* screenReaderLabel for the RGBA input's green input field
|
|
81
|
+
*/
|
|
82
|
+
rgbGreenInputScreenReaderLabel: string
|
|
83
|
+
/**
|
|
84
|
+
* screenReaderLabel for the RGBA input's blue input field
|
|
85
|
+
*/
|
|
86
|
+
rgbBlueInputScreenReaderLabel: string
|
|
87
|
+
/**
|
|
88
|
+
* screenReaderLabel for the RGBA input's alpha input field
|
|
89
|
+
*/
|
|
90
|
+
rgbAlphaInputScreenReaderLabel: string
|
|
91
|
+
/**
|
|
92
|
+
* screenReaderLabel for the color slider. It should explain how to navigate the slider
|
|
93
|
+
* with the keyboard ('A' for left, 'D' for right)
|
|
94
|
+
*/
|
|
95
|
+
colorSliderNavigationExplanationScreenReaderLabel: string
|
|
96
|
+
/**
|
|
97
|
+
* screenReaderLabel for the alpha slider. It should explain how to navigate the slider
|
|
98
|
+
* with the keyboard ('A' for left, 'D' for right)
|
|
99
|
+
*/
|
|
100
|
+
alphaSliderNavigationExplanationScreenReaderLabel: string
|
|
101
|
+
/**
|
|
102
|
+
* screenReaderLabel for the color palette. It should explain how to navigate the palette
|
|
103
|
+
* with the keyboard ('W' for up, 'A' for left, 'S' for down and 'D' for right)
|
|
104
|
+
*/
|
|
105
|
+
colorPaletteNavigationExplanationScreenReaderLabel: string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type ColorMixerState = {
|
|
109
|
+
h: number
|
|
110
|
+
s: number
|
|
111
|
+
v: number
|
|
112
|
+
a: number
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
type PropKeys = keyof ColorMixerOwnProps
|
|
116
|
+
|
|
117
|
+
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
118
|
+
|
|
119
|
+
type ColorMixerProps = ColorMixerOwnProps &
|
|
120
|
+
WithStyleProps<null, ColorMixerStyle> &
|
|
121
|
+
OtherHTMLAttributes<ColorMixerOwnProps>
|
|
122
|
+
|
|
123
|
+
type ColorMixerStyle = ComponentStyle<
|
|
124
|
+
'colorMixer' | 'sliderAndPaletteContainer'
|
|
125
|
+
>
|
|
126
|
+
|
|
127
|
+
const propTypes: PropValidators<PropKeys> = {
|
|
128
|
+
disabled: PropTypes.bool,
|
|
129
|
+
elementRef: PropTypes.func,
|
|
130
|
+
value: PropTypes.string,
|
|
131
|
+
onChange: PropTypes.func,
|
|
132
|
+
withAlpha: PropTypes.bool,
|
|
133
|
+
rgbRedInputScreenReaderLabel: PropTypes.string.isRequired,
|
|
134
|
+
rgbGreenInputScreenReaderLabel: PropTypes.string.isRequired,
|
|
135
|
+
rgbBlueInputScreenReaderLabel: PropTypes.string.isRequired,
|
|
136
|
+
rgbAlphaInputScreenReaderLabel: PropTypes.string.isRequired,
|
|
137
|
+
colorSliderNavigationExplanationScreenReaderLabel:
|
|
138
|
+
PropTypes.string.isRequired,
|
|
139
|
+
alphaSliderNavigationExplanationScreenReaderLabel:
|
|
140
|
+
PropTypes.string.isRequired,
|
|
141
|
+
colorPaletteNavigationExplanationScreenReaderLabel:
|
|
142
|
+
PropTypes.string.isRequired
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const allowedProps: AllowedPropKeys = [
|
|
146
|
+
'disabled',
|
|
147
|
+
'elementRef',
|
|
148
|
+
'value',
|
|
149
|
+
'onChange',
|
|
150
|
+
'withAlpha',
|
|
151
|
+
'rgbRedInputScreenReaderLabel',
|
|
152
|
+
'rgbGreenInputScreenReaderLabel',
|
|
153
|
+
'rgbBlueInputScreenReaderLabel',
|
|
154
|
+
'rgbAlphaInputScreenReaderLabel',
|
|
155
|
+
'colorSliderNavigationExplanationScreenReaderLabel',
|
|
156
|
+
'alphaSliderNavigationExplanationScreenReaderLabel',
|
|
157
|
+
'colorPaletteNavigationExplanationScreenReaderLabel'
|
|
158
|
+
]
|
|
159
|
+
|
|
160
|
+
export type {
|
|
161
|
+
ColorMixerProps,
|
|
162
|
+
ColorMixerStyle,
|
|
163
|
+
ColorMixerState,
|
|
164
|
+
RGBType,
|
|
165
|
+
RGBAType,
|
|
166
|
+
HSVType,
|
|
167
|
+
HSLType
|
|
168
|
+
}
|
|
169
|
+
export { propTypes, allowedProps }
|