@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.
Files changed (201) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +46 -0
  3. package/es/ColorContrast/ColorContrastLocator.js +54 -0
  4. package/es/ColorContrast/index.js +174 -0
  5. package/es/ColorContrast/props.js +40 -0
  6. package/es/ColorContrast/styles.js +99 -0
  7. package/es/ColorContrast/theme.js +55 -0
  8. package/es/ColorIndicator/ColorIndicatorLocator.js +40 -0
  9. package/es/ColorIndicator/index.js +91 -0
  10. package/es/ColorIndicator/props.js +31 -0
  11. package/es/ColorIndicator/styles.js +70 -0
  12. package/es/ColorIndicator/theme.js +53 -0
  13. package/es/ColorMixer/ColorMixerLocator.js +27 -0
  14. package/es/ColorMixer/ColorPalette/index.js +258 -0
  15. package/es/ColorMixer/ColorPalette/props.js +37 -0
  16. package/es/ColorMixer/ColorPalette/styles.js +81 -0
  17. package/es/ColorMixer/ColorPalette/theme.js +48 -0
  18. package/es/ColorMixer/RGBAInput/index.js +148 -0
  19. package/es/ColorMixer/RGBAInput/props.js +39 -0
  20. package/es/ColorMixer/RGBAInput/styles.js +63 -0
  21. package/es/ColorMixer/RGBAInput/theme.js +43 -0
  22. package/es/ColorMixer/Slider/index.js +218 -0
  23. package/es/ColorMixer/Slider/props.js +38 -0
  24. package/es/ColorMixer/Slider/styles.js +95 -0
  25. package/es/ColorMixer/Slider/theme.js +53 -0
  26. package/es/ColorMixer/index.js +232 -0
  27. package/es/ColorMixer/props.js +40 -0
  28. package/es/ColorMixer/styles.js +49 -0
  29. package/es/ColorMixer/utils/shallowCompare.js +32 -0
  30. package/es/ColorPicker/ColorPickerLocator.js +137 -0
  31. package/es/ColorPicker/index.js +487 -0
  32. package/es/ColorPicker/props.js +47 -0
  33. package/es/ColorPicker/styles.js +119 -0
  34. package/es/ColorPicker/theme.js +76 -0
  35. package/es/ColorPreset/ColorPresetLocator.js +27 -0
  36. package/es/ColorPreset/index.js +268 -0
  37. package/es/ColorPreset/props.js +36 -0
  38. package/es/ColorPreset/styles.js +102 -0
  39. package/es/ColorPreset/theme.js +53 -0
  40. package/es/index.js +28 -0
  41. package/lib/ColorContrast/ColorContrastLocator.js +66 -0
  42. package/lib/ColorContrast/index.js +169 -0
  43. package/lib/ColorContrast/props.js +51 -0
  44. package/lib/ColorContrast/styles.js +107 -0
  45. package/lib/ColorContrast/theme.js +63 -0
  46. package/lib/ColorIndicator/ColorIndicatorLocator.js +51 -0
  47. package/lib/ColorIndicator/index.js +82 -0
  48. package/lib/ColorIndicator/props.js +42 -0
  49. package/lib/ColorIndicator/styles.js +78 -0
  50. package/lib/ColorIndicator/theme.js +63 -0
  51. package/lib/ColorMixer/ColorMixerLocator.js +37 -0
  52. package/lib/ColorMixer/ColorPalette/index.js +252 -0
  53. package/lib/ColorMixer/ColorPalette/props.js +48 -0
  54. package/lib/ColorMixer/ColorPalette/styles.js +90 -0
  55. package/lib/ColorMixer/ColorPalette/theme.js +57 -0
  56. package/lib/ColorMixer/RGBAInput/index.js +142 -0
  57. package/lib/ColorMixer/RGBAInput/props.js +50 -0
  58. package/lib/ColorMixer/RGBAInput/styles.js +71 -0
  59. package/lib/ColorMixer/RGBAInput/theme.js +51 -0
  60. package/lib/ColorMixer/Slider/index.js +211 -0
  61. package/lib/ColorMixer/Slider/props.js +49 -0
  62. package/lib/ColorMixer/Slider/styles.js +103 -0
  63. package/lib/ColorMixer/Slider/theme.js +62 -0
  64. package/lib/ColorMixer/index.js +226 -0
  65. package/lib/ColorMixer/props.js +51 -0
  66. package/lib/ColorMixer/styles.js +57 -0
  67. package/lib/ColorMixer/utils/shallowCompare.js +40 -0
  68. package/lib/ColorPicker/ColorPickerLocator.js +151 -0
  69. package/lib/ColorPicker/index.js +500 -0
  70. package/lib/ColorPicker/props.js +58 -0
  71. package/lib/ColorPicker/styles.js +127 -0
  72. package/lib/ColorPicker/theme.js +85 -0
  73. package/lib/ColorPreset/ColorPresetLocator.js +37 -0
  74. package/lib/ColorPreset/index.js +274 -0
  75. package/lib/ColorPreset/props.js +47 -0
  76. package/lib/ColorPreset/styles.js +110 -0
  77. package/lib/ColorPreset/theme.js +61 -0
  78. package/lib/index.js +45 -0
  79. package/lib/package.json +1 -0
  80. package/package.json +62 -0
  81. package/src/ColorContrast/ColorContrastLocator.ts +51 -0
  82. package/src/ColorContrast/README.md +111 -0
  83. package/src/ColorContrast/index.tsx +189 -0
  84. package/src/ColorContrast/props.ts +140 -0
  85. package/src/ColorContrast/styles.ts +102 -0
  86. package/src/ColorContrast/theme.ts +62 -0
  87. package/src/ColorIndicator/ColorIndicatorLocator.ts +41 -0
  88. package/src/ColorIndicator/README.md +76 -0
  89. package/src/ColorIndicator/index.tsx +89 -0
  90. package/src/ColorIndicator/props.ts +68 -0
  91. package/src/ColorIndicator/styles.ts +88 -0
  92. package/src/ColorIndicator/theme.ts +58 -0
  93. package/src/ColorMixer/ColorMixerLocator.ts +29 -0
  94. package/src/ColorMixer/ColorPalette/index.tsx +250 -0
  95. package/src/ColorMixer/ColorPalette/props.ts +87 -0
  96. package/src/ColorMixer/ColorPalette/styles.ts +94 -0
  97. package/src/ColorMixer/ColorPalette/theme.ts +52 -0
  98. package/src/ColorMixer/README.md +98 -0
  99. package/src/ColorMixer/RGBAInput/index.tsx +172 -0
  100. package/src/ColorMixer/RGBAInput/props.ts +93 -0
  101. package/src/ColorMixer/RGBAInput/styles.ts +69 -0
  102. package/src/ColorMixer/RGBAInput/theme.ts +48 -0
  103. package/src/ColorMixer/Slider/index.tsx +242 -0
  104. package/src/ColorMixer/Slider/props.ts +94 -0
  105. package/src/ColorMixer/Slider/styles.ts +114 -0
  106. package/src/ColorMixer/Slider/theme.ts +59 -0
  107. package/src/ColorMixer/index.tsx +221 -0
  108. package/src/ColorMixer/props.ts +169 -0
  109. package/src/ColorMixer/styles.ts +51 -0
  110. package/src/ColorMixer/utils/shallowCompare.ts +35 -0
  111. package/src/ColorPicker/ColorPickerLocator.ts +124 -0
  112. package/src/ColorPicker/README.md +420 -0
  113. package/src/ColorPicker/index.tsx +609 -0
  114. package/src/ColorPicker/props.ts +293 -0
  115. package/src/ColorPicker/styles.ts +131 -0
  116. package/src/ColorPicker/theme.ts +80 -0
  117. package/src/ColorPreset/ColorPresetLocator.ts +29 -0
  118. package/src/ColorPreset/README.md +121 -0
  119. package/src/ColorPreset/index.tsx +328 -0
  120. package/src/ColorPreset/props.ts +162 -0
  121. package/src/ColorPreset/styles.ts +107 -0
  122. package/src/ColorPreset/theme.ts +58 -0
  123. package/src/index.ts +34 -0
  124. package/tsconfig.build.json +36 -0
  125. package/tsconfig.build.tsbuildinfo +1 -0
  126. package/types/ColorContrast/ColorContrastLocator.d.ts +592 -0
  127. package/types/ColorContrast/ColorContrastLocator.d.ts.map +1 -0
  128. package/types/ColorContrast/index.d.ts +61 -0
  129. package/types/ColorContrast/index.d.ts.map +1 -0
  130. package/types/ColorContrast/props.d.ts +62 -0
  131. package/types/ColorContrast/props.d.ts.map +1 -0
  132. package/types/ColorContrast/styles.d.ts +76 -0
  133. package/types/ColorContrast/styles.d.ts.map +1 -0
  134. package/types/ColorContrast/theme.d.ts +10 -0
  135. package/types/ColorContrast/theme.d.ts.map +1 -0
  136. package/types/ColorIndicator/ColorIndicatorLocator.d.ts +577 -0
  137. package/types/ColorIndicator/ColorIndicatorLocator.d.ts.map +1 -0
  138. package/types/ColorIndicator/index.d.ts +35 -0
  139. package/types/ColorIndicator/index.d.ts.map +1 -0
  140. package/types/ColorIndicator/props.d.ts +25 -0
  141. package/types/ColorIndicator/props.d.ts.map +1 -0
  142. package/types/ColorIndicator/styles.d.ts +15 -0
  143. package/types/ColorIndicator/styles.d.ts.map +1 -0
  144. package/types/ColorIndicator/theme.d.ts +11 -0
  145. package/types/ColorIndicator/theme.d.ts.map +1 -0
  146. package/types/ColorMixer/ColorMixerLocator.d.ts +566 -0
  147. package/types/ColorMixer/ColorMixerLocator.d.ts.map +1 -0
  148. package/types/ColorMixer/ColorPalette/index.d.ts +70 -0
  149. package/types/ColorMixer/ColorPalette/index.d.ts.map +1 -0
  150. package/types/ColorMixer/ColorPalette/props.d.ts +29 -0
  151. package/types/ColorMixer/ColorPalette/props.d.ts.map +1 -0
  152. package/types/ColorMixer/ColorPalette/styles.d.ts +15 -0
  153. package/types/ColorMixer/ColorPalette/styles.d.ts.map +1 -0
  154. package/types/ColorMixer/ColorPalette/theme.d.ts +10 -0
  155. package/types/ColorMixer/ColorPalette/theme.d.ts.map +1 -0
  156. package/types/ColorMixer/RGBAInput/index.d.ts +51 -0
  157. package/types/ColorMixer/RGBAInput/index.d.ts.map +1 -0
  158. package/types/ColorMixer/RGBAInput/props.d.ts +28 -0
  159. package/types/ColorMixer/RGBAInput/props.d.ts.map +1 -0
  160. package/types/ColorMixer/RGBAInput/styles.d.ts +15 -0
  161. package/types/ColorMixer/RGBAInput/styles.d.ts.map +1 -0
  162. package/types/ColorMixer/RGBAInput/theme.d.ts +10 -0
  163. package/types/ColorMixer/RGBAInput/theme.d.ts.map +1 -0
  164. package/types/ColorMixer/Slider/index.d.ts +64 -0
  165. package/types/ColorMixer/Slider/index.d.ts.map +1 -0
  166. package/types/ColorMixer/Slider/props.d.ts +26 -0
  167. package/types/ColorMixer/Slider/props.d.ts.map +1 -0
  168. package/types/ColorMixer/Slider/styles.d.ts +15 -0
  169. package/types/ColorMixer/Slider/styles.d.ts.map +1 -0
  170. package/types/ColorMixer/Slider/theme.d.ts +10 -0
  171. package/types/ColorMixer/Slider/theme.d.ts.map +1 -0
  172. package/types/ColorMixer/index.d.ts +59 -0
  173. package/types/ColorMixer/index.d.ts.map +1 -0
  174. package/types/ColorMixer/props.d.ts +91 -0
  175. package/types/ColorMixer/props.d.ts.map +1 -0
  176. package/types/ColorMixer/styles.d.ts +14 -0
  177. package/types/ColorMixer/styles.d.ts.map +1 -0
  178. package/types/ColorMixer/utils/shallowCompare.d.ts +3 -0
  179. package/types/ColorMixer/utils/shallowCompare.d.ts.map +1 -0
  180. package/types/ColorPicker/ColorPickerLocator.d.ts +4113 -0
  181. package/types/ColorPicker/ColorPickerLocator.d.ts.map +1 -0
  182. package/types/ColorPicker/index.d.ts +158 -0
  183. package/types/ColorPicker/index.d.ts.map +1 -0
  184. package/types/ColorPicker/props.d.ts +166 -0
  185. package/types/ColorPicker/props.d.ts.map +1 -0
  186. package/types/ColorPicker/styles.d.ts +17 -0
  187. package/types/ColorPicker/styles.d.ts.map +1 -0
  188. package/types/ColorPicker/theme.d.ts +10 -0
  189. package/types/ColorPicker/theme.d.ts.map +1 -0
  190. package/types/ColorPreset/ColorPresetLocator.d.ts +566 -0
  191. package/types/ColorPreset/ColorPresetLocator.d.ts.map +1 -0
  192. package/types/ColorPreset/index.d.ts +100 -0
  193. package/types/ColorPreset/index.d.ts.map +1 -0
  194. package/types/ColorPreset/props.d.ts +87 -0
  195. package/types/ColorPreset/props.d.ts.map +1 -0
  196. package/types/ColorPreset/styles.d.ts +77 -0
  197. package/types/ColorPreset/styles.d.ts.map +1 -0
  198. package/types/ColorPreset/theme.d.ts +10 -0
  199. package/types/ColorPreset/theme.d.ts.map +1 -0
  200. package/types/index.d.ts +11 -0
  201. package/types/index.d.ts.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorMixerLocator.d.ts","sourceRoot":"","sources":["../../src/ColorMixer/ColorMixerLocator.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sIAA+B,CAAA"}
@@ -0,0 +1,70 @@
1
+ /** @jsx jsx */
2
+ import React, { Component } from 'react';
3
+ import { jsx } from '@instructure/emotion';
4
+ import type { ViewOwnProps } from '@instructure/ui-view';
5
+ import type { ColorPaletteProps, ColorPaletteState } from './props';
6
+ import type { HSVType } from '../props';
7
+ /**
8
+ * ---
9
+ * private: true
10
+ * ---
11
+ * @tsProps
12
+ **/
13
+ declare class ColorPalette extends Component<ColorPaletteProps, ColorPaletteState> {
14
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
15
+ disabled?: boolean | undefined;
16
+ hue: number;
17
+ color: HSVType;
18
+ width: number;
19
+ height: number;
20
+ indicatorRadius: number;
21
+ onChange: (rgb: HSVType) => void;
22
+ elementRef?: ((element: Element | null) => void) | undefined;
23
+ navigationExplanationScreenReaderLabel: string;
24
+ }>;
25
+ static allowedProps: readonly (keyof {
26
+ disabled?: boolean | undefined;
27
+ hue: number;
28
+ color: HSVType;
29
+ width: number;
30
+ height: number;
31
+ indicatorRadius: number;
32
+ onChange: (rgb: HSVType) => void;
33
+ elementRef?: ((element: Element | null) => void) | undefined;
34
+ navigationExplanationScreenReaderLabel: string;
35
+ })[];
36
+ static readonly componentId = "ColorMixer.Palette";
37
+ constructor(props: ColorPaletteProps);
38
+ ref: Element | null;
39
+ private _paletteRef;
40
+ private _mouseMoveListener?;
41
+ private _mouseUpListener?;
42
+ handleRef: (el: Element | null) => void;
43
+ componentDidMount(): void;
44
+ componentDidUpdate(prevProps: ColorPaletteProps): void;
45
+ componentWillUnmount(): void;
46
+ get paletteWidth(): number;
47
+ get paletteHeight(): number;
48
+ calcSaturation: (position: number) => number;
49
+ calcLuminance: (position: number) => number;
50
+ calcPositionFromColor(hsv: HSVType): {
51
+ x: number;
52
+ y: number;
53
+ };
54
+ handlePaletteMouseDown(e: React.MouseEvent<ViewOwnProps, MouseEvent>): void;
55
+ handleMouseUp: () => void;
56
+ removeEventListeners(): void;
57
+ calcColorPosition(clientX: number, clientY: number): {
58
+ newXPosition: number;
59
+ newYPosition: number;
60
+ };
61
+ applyBoundaries(x: number, y: number): {
62
+ newXPosition: number;
63
+ newYPosition: number;
64
+ };
65
+ handleChange: (e: React.MouseEvent<ViewOwnProps, MouseEvent>) => void;
66
+ handleKeyDown(e: React.KeyboardEvent<ViewOwnProps>): void;
67
+ render(): jsx.JSX.Element;
68
+ }
69
+ export default ColorPalette;
70
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/ColorPalette/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAKvC;;;;;IAKI;AACJ,cACM,YAAa,SAAQ,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACxE,MAAM,CAAC,SAAS;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,wBAAuB;gBAEtC,KAAK,EAAE,iBAAiB;IAOpC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAC1B,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAC/C,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAE7C,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAOjB,kBAAkB,CAAC,SAAS,EAAE,iBAAiB;IAS/C,oBAAoB;IAIpB,IAAI,YAAY,WAEf;IAED,IAAI,aAAa,WAEhB;IACD,cAAc,aAAc,MAAM,YACsB;IACxD,aAAa,aAAc,MAAM,YAE5B;IAEL,qBAAqB,CAAC,GAAG,EAAE,OAAO;;;;IAQlC,sBAAsB,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC;IAepE,aAAa,aAEZ;IAED,oBAAoB;IAKpB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;;;;IAMlD,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;;;;IAkBpC,YAAY,MAAO,gBAAgB,CAAC,YAAY,EAAE,UAAU,CAAC,UAgB5D;IAED,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC;IAmClD,MAAM;CA8BP;AAED,eAAe,YAAY,CAAA"}
@@ -0,0 +1,29 @@
1
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
2
+ import type { OtherHTMLAttributes, PropValidators, ColorMixerPaletteTheme } from '@instructure/shared-types';
3
+ import type { HSVType } from '../props';
4
+ declare type ColorPaletteOwnProps = {
5
+ disabled?: boolean;
6
+ hue: number;
7
+ color: HSVType;
8
+ width: number;
9
+ height: number;
10
+ indicatorRadius: number;
11
+ onChange: (rgb: HSVType) => void;
12
+ elementRef?: (element: Element | null) => void;
13
+ navigationExplanationScreenReaderLabel: string;
14
+ };
15
+ declare type ColorPaletteState = {
16
+ colorPosition: {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ };
21
+ declare type PropKeys = keyof ColorPaletteOwnProps;
22
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
23
+ declare type ColorPaletteProps = ColorPaletteOwnProps & WithStyleProps<ColorMixerPaletteTheme, ColorPaletteStyle> & OtherHTMLAttributes<ColorPaletteOwnProps>;
24
+ declare type ColorPaletteStyle = ComponentStyle<'ColorPalette' | 'indicator' | 'palette' | 'disabledOverlay'>;
25
+ declare const propTypes: PropValidators<PropKeys>;
26
+ declare const allowedProps: AllowedPropKeys;
27
+ export type { ColorPaletteProps, ColorPaletteState, ColorPaletteStyle };
28
+ export { propTypes, allowedProps };
29
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/ColorPalette/props.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAEvC,aAAK,oBAAoB,GAAG;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;IAChC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,sCAAsC,EAAE,MAAM,CAAA;CAC/C,CAAA;AAED,aAAK,iBAAiB,GAAG;IACvB,aAAa,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACxC,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,oBAAoB,CAAA;AAE1C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,iBAAiB,GAAG,oBAAoB,GAC3C,cAAc,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,GACzD,mBAAmB,CAAC,oBAAoB,CAAC,CAAA;AAE3C,aAAK,iBAAiB,GAAG,cAAc,CACrC,cAAc,GAAG,WAAW,GAAG,SAAS,GAAG,iBAAiB,CAC7D,CAAA;AACD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAUvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAUnB,CAAA;AAED,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { ColorPaletteStyle, ColorPaletteProps, ColorPaletteState } from './props';
2
+ import type { ColorMixerPaletteTheme } from '@instructure/shared-types';
3
+ /**
4
+ * ---
5
+ * private: true
6
+ * ---
7
+ * Generates the style object from the theme and provided additional information
8
+ * @param {Object} componentTheme The theme variable object.
9
+ * @param {Object} props the props of the component, the style is applied to
10
+ * @param {Object} state the state of the component, the style is applied to
11
+ * @return {Object} The final style object, which will be used in the component
12
+ */
13
+ declare const generateStyle: (componentTheme: ColorMixerPaletteTheme, props: ColorPaletteProps, state: ColorPaletteState) => ColorPaletteStyle;
14
+ export default generateStyle;
15
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/ColorPalette/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAGvE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,sBAAsB,SAC/B,iBAAiB,SACjB,iBAAiB,KACvB,iBA6CF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { Theme } from '@instructure/ui-themes';
2
+ import type { ColorMixerPaletteTheme } from '@instructure/shared-types';
3
+ /**
4
+ * Generates the theme object for the component from the theme and provided additional information
5
+ * @param {Object} theme The actual theme object.
6
+ * @return {Object} The final theme object with the overrides and component variables
7
+ */
8
+ declare const generateComponentTheme: (theme: Theme) => ColorMixerPaletteTheme;
9
+ export default generateComponentTheme;
10
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/ColorPalette/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAGvE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,sBAgB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
@@ -0,0 +1,51 @@
1
+ /** @jsx jsx */
2
+ import React, { Component } from 'react';
3
+ import { jsx } from '@instructure/emotion';
4
+ import type { RGBAInputProps, RGBAInputState } from './props';
5
+ /**
6
+ * ---
7
+ * private: true
8
+ * ---
9
+ * @tsProps
10
+ **/
11
+ declare class RGBAInput extends Component<RGBAInputProps, RGBAInputState> {
12
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
13
+ disabled?: boolean | undefined;
14
+ label?: string | undefined;
15
+ width: number;
16
+ value: import("../props").RGBAType;
17
+ onChange: (rgba: import("../props").RGBAType) => void;
18
+ withAlpha?: boolean | undefined;
19
+ rgbRedInputScreenReaderLabel: string;
20
+ rgbGreenInputScreenReaderLabel: string;
21
+ rgbBlueInputScreenReaderLabel: string;
22
+ rgbAlphaInputScreenReaderLabel: string;
23
+ elementRef?: ((element: Element | null) => void) | undefined;
24
+ }>;
25
+ static allowedProps: readonly (keyof {
26
+ disabled?: boolean | undefined;
27
+ label?: string | undefined;
28
+ width: number;
29
+ value: import("../props").RGBAType;
30
+ onChange: (rgba: import("../props").RGBAType) => void;
31
+ withAlpha?: boolean | undefined;
32
+ rgbRedInputScreenReaderLabel: string;
33
+ rgbGreenInputScreenReaderLabel: string;
34
+ rgbBlueInputScreenReaderLabel: string;
35
+ rgbAlphaInputScreenReaderLabel: string;
36
+ elementRef?: ((element: Element | null) => void) | undefined;
37
+ })[];
38
+ static readonly componentId = "ColorMixer.RGBAInput";
39
+ constructor(props: RGBAInputProps);
40
+ static defaultProps: {
41
+ withAlpha: boolean;
42
+ };
43
+ ref: HTMLDivElement | null;
44
+ handleRef: (el: HTMLDivElement | null) => void;
45
+ componentDidMount(): void;
46
+ componentDidUpdate(prevProps: RGBAInputProps): void;
47
+ handleChange(type: string, e: React.ChangeEvent<HTMLInputElement>): void;
48
+ render(): jsx.JSX.Element;
49
+ }
50
+ export default RGBAInput;
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/RGBAInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAOrD,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7D;;;;;IAKI;AACJ,cACM,SAAU,SAAQ,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC/D,MAAM,CAAC,SAAS;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,0BAAyB;gBAExC,KAAK,EAAE,cAAc;IAOjC,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,cAAc,GAAG,IAAI,CAAO;IAEjC,SAAS,OAAQ,cAAc,GAAG,IAAI,UAQrC;IAED,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,EAAE,cAAc;IAY5C,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;IAajE,MAAM;CAkEP;AAED,eAAe,SAAS,CAAA"}
@@ -0,0 +1,28 @@
1
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
2
+ import type { OtherHTMLAttributes, PropValidators, ColorMixerRGBAInputTheme } from '@instructure/shared-types';
3
+ import type { RGBAType } from '../props';
4
+ declare type RGBAInputOwnProps = {
5
+ disabled?: boolean;
6
+ label?: string;
7
+ width: number;
8
+ value: RGBAType;
9
+ onChange: (rgba: RGBAType) => void;
10
+ withAlpha?: boolean;
11
+ rgbRedInputScreenReaderLabel: string;
12
+ rgbGreenInputScreenReaderLabel: string;
13
+ rgbBlueInputScreenReaderLabel: string;
14
+ rgbAlphaInputScreenReaderLabel: string;
15
+ elementRef?: (element: Element | null) => void;
16
+ };
17
+ declare type RGBAInputState = {
18
+ value: RGBAType;
19
+ };
20
+ declare type PropKeys = keyof RGBAInputOwnProps;
21
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
22
+ declare type RGBAInputProps = RGBAInputOwnProps & WithStyleProps<ColorMixerRGBAInputTheme, RGBAInputStyle> & OtherHTMLAttributes<RGBAInputOwnProps>;
23
+ declare type RGBAInputStyle = ComponentStyle<'RGBAInput' | 'label' | 'inputContainer' | 'rgbInput' | 'aInput'>;
24
+ declare const propTypes: PropValidators<PropKeys>;
25
+ declare const allowedProps: AllowedPropKeys;
26
+ export type { RGBAInputProps, RGBAInputState, RGBAInputStyle };
27
+ export { propTypes, allowedProps };
28
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/RGBAInput/props.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACzB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,aAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,QAAQ,CAAA;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,4BAA4B,EAAE,MAAM,CAAA;IACpC,8BAA8B,EAAE,MAAM,CAAA;IACtC,6BAA6B,EAAE,MAAM,CAAA;IACrC,8BAA8B,EAAE,MAAM,CAAA;IACtC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;CAC/C,CAAA;AAED,aAAK,cAAc,GAAG;IACpB,KAAK,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,iBAAiB,CAAA;AAEvC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,cAAc,GAAG,iBAAiB,GACrC,cAAc,CAAC,wBAAwB,EAAE,cAAc,CAAC,GACxD,mBAAmB,CAAC,iBAAiB,CAAC,CAAA;AAExC,aAAK,cAAc,GAAG,cAAc,CAClC,WAAW,GAAG,OAAO,GAAG,gBAAgB,GAAG,UAAU,GAAG,QAAQ,CACjE,CAAA;AACD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAYvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAYnB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { RGBAInputStyle, RGBAInputProps } from './props';
2
+ import type { ColorMixerRGBAInputTheme } from '@instructure/shared-types';
3
+ /**
4
+ * ---
5
+ * private: true
6
+ * ---
7
+ * Generates the style object from the theme and provided additional information
8
+ * @param {Object} componentTheme The theme variable object.
9
+ * @param {Object} props the props of the component, the style is applied to
10
+ * @param {Object} state the state of the component, the style is applied to
11
+ * @return {Object} The final style object, which will be used in the component
12
+ */
13
+ declare const generateStyle: (componentTheme: ColorMixerRGBAInputTheme, props: RGBAInputProps) => RGBAInputStyle;
14
+ export default generateStyle;
15
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/RGBAInput/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,wBAAwB,SACjC,cAAc,KACpB,cA0BF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { Theme } from '@instructure/ui-themes';
2
+ import { ColorMixerRGBAInputTheme } from '@instructure/shared-types';
3
+ /**
4
+ * Generates the theme object for the component from the theme and provided additional information
5
+ * @param {Object} theme The actual theme object.
6
+ * @return {Object} The final theme object with the overrides and component variables
7
+ */
8
+ declare const generateComponentTheme: (theme: Theme) => ColorMixerRGBAInputTheme;
9
+ export default generateComponentTheme;
10
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/RGBAInput/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEpE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,wBAa9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
@@ -0,0 +1,64 @@
1
+ /** @jsx jsx */
2
+ import React, { Component } from 'react';
3
+ import { jsx } from '@instructure/emotion';
4
+ import type { ViewOwnProps } from '@instructure/ui-view';
5
+ import type { SliderProps, SliderStyleProps } from './props';
6
+ /**
7
+ * ---
8
+ * private: true
9
+ * ---
10
+ * @tsProps
11
+ **/
12
+ declare class Slider extends Component<SliderProps> {
13
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
14
+ isColorSlider?: boolean | undefined;
15
+ onChange: (position: number) => void;
16
+ width: number;
17
+ value: number;
18
+ minValue: number;
19
+ maxValue: number;
20
+ indicatorRadius: number;
21
+ height: number;
22
+ elementRef?: ((element: Element | null) => void) | undefined;
23
+ navigationExplanationScreenReaderLabel: string;
24
+ }>;
25
+ static allowedProps: readonly (keyof {
26
+ isColorSlider?: boolean | undefined;
27
+ onChange: (position: number) => void;
28
+ width: number;
29
+ value: number;
30
+ minValue: number;
31
+ maxValue: number;
32
+ indicatorRadius: number;
33
+ height: number;
34
+ elementRef?: ((element: Element | null) => void) | undefined;
35
+ navigationExplanationScreenReaderLabel: string;
36
+ })[];
37
+ static readonly componentId = "ColorMixer.Slider";
38
+ static defaultProps: {
39
+ isColorSlider: boolean;
40
+ };
41
+ ref: Element | null;
42
+ private _sliderRef;
43
+ private _mouseMoveListener?;
44
+ private _mouseUpListener?;
45
+ handleRef: (el: Element | null) => void;
46
+ componentDidMount(): void;
47
+ componentDidUpdate(): void;
48
+ componentWillUnmount(): void;
49
+ removeEventListeners(): void;
50
+ get sliderPositionFromValue(): number;
51
+ get roundedValue(): number;
52
+ get makeStylesProps(): SliderStyleProps;
53
+ handleMouseDown(e: React.MouseEvent<ViewOwnProps, MouseEvent>): void;
54
+ handleChange: (e: React.MouseEvent<ViewOwnProps, MouseEvent>) => void;
55
+ handleMouseUp: () => void;
56
+ applyBoundaries(x: number): number;
57
+ calcSliderPositionFromCursorPosition: (clientX: number, _sliderRef: HTMLDivElement) => number;
58
+ calcSliderPositionFromValue: (value: number) => number;
59
+ calcValueFromSliderPosition: (position: number) => number;
60
+ handleKeyDown(e: React.KeyboardEvent<ViewOwnProps>): void;
61
+ render(): jsx.JSX.Element;
62
+ }
63
+ export default Slider;
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/Slider/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAK5D;;;;;IAKI;AACJ,cACM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,SAAS;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,uBAAsB;IAEjD,MAAM,CAAC,YAAY;;MAElB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAC1B,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAC/C,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAE7C,SAAS,OAAQ,OAAO,GAAG,IAAI,UAQ9B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,oBAAoB;IAIpB,oBAAoB;IAKpB,IAAI,uBAAuB,WAE1B;IAED,IAAI,YAAY,WAQf;IAED,IAAI,eAAe,IAAI,gBAAgB,CAItC;IAED,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC;IAe7D,YAAY,MAAO,gBAAgB,CAAC,YAAY,EAAE,UAAU,CAAC,UAS5D;IAED,aAAa,aAEZ;IAED,eAAe,CAAC,CAAC,EAAE,MAAM;IAMzB,oCAAoC,YACzB,MAAM,cACH,cAAc,YAc3B;IAED,2BAA2B,UAAW,MAAM,YAM3C;IAED,2BAA2B,aAAc,MAAM,YAY9C;IAED,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC;IAkBlD,MAAM;CAsCP;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
2
+ import type { OtherHTMLAttributes, PropValidators, ColorMixerSliderTheme } from '@instructure/shared-types';
3
+ declare type SliderOwnProps = {
4
+ isColorSlider?: boolean;
5
+ onChange: (position: number) => void;
6
+ width: number;
7
+ value: number;
8
+ minValue: number;
9
+ maxValue: number;
10
+ indicatorRadius: number;
11
+ height: number;
12
+ elementRef?: (element: Element | null) => void;
13
+ navigationExplanationScreenReaderLabel: string;
14
+ };
15
+ declare type PropKeys = keyof SliderOwnProps;
16
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
17
+ declare type SliderProps = SliderOwnProps & WithStyleProps<ColorMixerSliderTheme, SliderStyle> & OtherHTMLAttributes<SliderOwnProps>;
18
+ declare type SliderStyleProps = {
19
+ sliderPositionFromValue: number;
20
+ };
21
+ declare type SliderStyle = ComponentStyle<'colorSlider' | 'indicator' | 'slider' | 'sliderBackground' | 'disabledOverlay'>;
22
+ declare const propTypes: PropValidators<PropKeys>;
23
+ declare const allowedProps: AllowedPropKeys;
24
+ export type { SliderProps, SliderStyle, SliderStyleProps };
25
+ export { propTypes, allowedProps };
26
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/Slider/props.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACtB,MAAM,2BAA2B,CAAA;AAElC,aAAK,cAAc,GAAG;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C,sCAAsC,EAAE,MAAM,CAAA;CAC/C,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,cAAc,CAAA;AAEpC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,WAAW,GAAG,cAAc,GAC/B,cAAc,CAAC,qBAAqB,EAAE,WAAW,CAAC,GAClD,mBAAmB,CAAC,cAAc,CAAC,CAAA;AAErC,aAAK,gBAAgB,GAAG;IACtB,uBAAuB,EAAE,MAAM,CAAA;CAChC,CAAA;AAED,aAAK,WAAW,GAAG,cAAc,CAC7B,aAAa,GACb,WAAW,GACX,QAAQ,GACR,kBAAkB,GAClB,iBAAiB,CACpB,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAWvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAWnB,CAAA;AAED,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { ColorMixerSliderTheme } from '@instructure/shared-types';
2
+ import type { SliderStyle, SliderProps, SliderStyleProps } from './props';
3
+ /**
4
+ * ---
5
+ * private: true
6
+ * ---
7
+ * Generates the style object from the theme and provided additional information
8
+ * @param {Object} componentTheme The theme variable object.
9
+ * @param {Object} props the props of the component, the style is applied to
10
+ * @param {Object} state the state of the component, the style is applied to
11
+ * @return {Object} The final style object, which will be used in the component
12
+ */
13
+ declare const generateStyle: (componentTheme: ColorMixerSliderTheme, props: SliderProps, state: SliderStyleProps) => SliderStyle;
14
+ export default generateStyle;
15
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/Slider/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAEzE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,qBAAqB,SAC9B,WAAW,SACX,gBAAgB,KACtB,WAsEF,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { Theme } from '@instructure/ui-themes';
2
+ import type { ColorMixerSliderTheme } from '@instructure/shared-types';
3
+ /**
4
+ * Generates the theme object for the component from the theme and provided additional information
5
+ * @param {Object} theme The actual theme object.
6
+ * @return {Object} The final theme object with the overrides and component variables
7
+ */
8
+ declare const generateComponentTheme: (theme: Theme) => ColorMixerSliderTheme;
9
+ export default generateComponentTheme;
10
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/Slider/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAGtE;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,qBAuB9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
@@ -0,0 +1,59 @@
1
+ /** @jsx jsx */
2
+ import { Component } from 'react';
3
+ import { jsx } from '@instructure/emotion';
4
+ import type { ColorMixerProps, ColorMixerState } from './props';
5
+ /**
6
+ ---
7
+ category: components
8
+ ---
9
+ @tsProps
10
+ **/
11
+ declare class ColorMixer extends Component<ColorMixerProps, ColorMixerState> {
12
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
13
+ disabled?: boolean | undefined;
14
+ elementRef?: ((element: Element | null) => void) | undefined;
15
+ onChange: (hex: string) => void;
16
+ value: string;
17
+ withAlpha: boolean;
18
+ rgbRedInputScreenReaderLabel: string;
19
+ rgbGreenInputScreenReaderLabel: string;
20
+ rgbBlueInputScreenReaderLabel: string;
21
+ rgbAlphaInputScreenReaderLabel: string;
22
+ colorSliderNavigationExplanationScreenReaderLabel: string;
23
+ alphaSliderNavigationExplanationScreenReaderLabel: string;
24
+ colorPaletteNavigationExplanationScreenReaderLabel: string;
25
+ }>;
26
+ static allowedProps: readonly (keyof {
27
+ disabled?: boolean | undefined;
28
+ elementRef?: ((element: Element | null) => void) | undefined;
29
+ onChange: (hex: string) => void;
30
+ value: string;
31
+ withAlpha: boolean;
32
+ rgbRedInputScreenReaderLabel: string;
33
+ rgbGreenInputScreenReaderLabel: string;
34
+ rgbBlueInputScreenReaderLabel: string;
35
+ rgbAlphaInputScreenReaderLabel: string;
36
+ colorSliderNavigationExplanationScreenReaderLabel: string;
37
+ alphaSliderNavigationExplanationScreenReaderLabel: string;
38
+ colorPaletteNavigationExplanationScreenReaderLabel: string;
39
+ })[];
40
+ static readonly componentId = "ColorMixer";
41
+ static defaultProps: {
42
+ withAlpha: boolean;
43
+ disabled: boolean;
44
+ };
45
+ constructor(props: ColorMixerProps);
46
+ ref: HTMLDivElement | null;
47
+ private _width;
48
+ private _paletteHeight;
49
+ private _sliderHeight;
50
+ private _sliderIndicatorRadius;
51
+ private _paletteIndicatorRadius;
52
+ handleRef: (el: HTMLDivElement | null) => void;
53
+ componentDidMount(): void;
54
+ componentDidUpdate(prevProps: ColorMixerProps, prevState: ColorMixerState): void;
55
+ render(): jsx.JSX.Element;
56
+ }
57
+ export { ColorMixer };
58
+ export default ColorMixer;
59
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ColorMixer/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAarD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAW,MAAM,SAAS,CAAA;AAIxE;;;;;GAKG;AACH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAClE,MAAM,CAAC,SAAS;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,YAAY;;;MAGlB;gBAEW,KAAK,EAAE,eAAe;IAUlC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAO;IAEjC,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,cAAc,CAAM;IAC5B,OAAO,CAAC,aAAa,CAAI;IACzB,OAAO,CAAC,sBAAsB,CAAI;IAClC,OAAO,CAAC,uBAAuB,CAAI;IAEnC,SAAS,OAAQ,cAAc,GAAG,IAAI,UAQrC;IAED,iBAAiB;IASjB,kBAAkB,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe;IAqBzE,MAAM;CAiGP;AAED,OAAO,EAAE,UAAU,EAAE,CAAA;AACrB,eAAe,UAAU,CAAA"}
@@ -0,0 +1,91 @@
1
+ import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
2
+ import type { OtherHTMLAttributes, PropValidators } from '@instructure/shared-types';
3
+ declare type RGBType = {
4
+ r: number;
5
+ g: number;
6
+ b: number;
7
+ };
8
+ declare type HSVType = {
9
+ h: number;
10
+ s: number;
11
+ v: number;
12
+ };
13
+ declare type HSLType = {
14
+ h: number;
15
+ s: number;
16
+ l: number;
17
+ };
18
+ declare type RGBAType = {
19
+ r: number;
20
+ g: number;
21
+ b: number;
22
+ a: number;
23
+ };
24
+ declare type ColorMixerOwnProps = {
25
+ /**
26
+ * Makes the component uninteractable
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Provides a reference to the component's underlying html element.
31
+ */
32
+ elementRef?: (element: Element | null) => void;
33
+ /**
34
+ * Gets called each time the color changes
35
+ */
36
+ onChange: (hex: string) => void;
37
+ /**
38
+ * Sets the value of the component. If changes, the color changes inside the component as well
39
+ */
40
+ value: string;
41
+ /**
42
+ * Toggles alpha. If true, alpha slider will appear
43
+ */
44
+ withAlpha: boolean;
45
+ /**
46
+ * screenReaderLabel for the RGBA input's red input field
47
+ */
48
+ rgbRedInputScreenReaderLabel: string;
49
+ /**
50
+ * screenReaderLabel for the RGBA input's green input field
51
+ */
52
+ rgbGreenInputScreenReaderLabel: string;
53
+ /**
54
+ * screenReaderLabel for the RGBA input's blue input field
55
+ */
56
+ rgbBlueInputScreenReaderLabel: string;
57
+ /**
58
+ * screenReaderLabel for the RGBA input's alpha input field
59
+ */
60
+ rgbAlphaInputScreenReaderLabel: string;
61
+ /**
62
+ * screenReaderLabel for the color slider. It should explain how to navigate the slider
63
+ * with the keyboard ('A' for left, 'D' for right)
64
+ */
65
+ colorSliderNavigationExplanationScreenReaderLabel: string;
66
+ /**
67
+ * screenReaderLabel for the alpha slider. It should explain how to navigate the slider
68
+ * with the keyboard ('A' for left, 'D' for right)
69
+ */
70
+ alphaSliderNavigationExplanationScreenReaderLabel: string;
71
+ /**
72
+ * screenReaderLabel for the color palette. It should explain how to navigate the palette
73
+ * with the keyboard ('W' for up, 'A' for left, 'S' for down and 'D' for right)
74
+ */
75
+ colorPaletteNavigationExplanationScreenReaderLabel: string;
76
+ };
77
+ declare type ColorMixerState = {
78
+ h: number;
79
+ s: number;
80
+ v: number;
81
+ a: number;
82
+ };
83
+ declare type PropKeys = keyof ColorMixerOwnProps;
84
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
85
+ declare type ColorMixerProps = ColorMixerOwnProps & WithStyleProps<null, ColorMixerStyle> & OtherHTMLAttributes<ColorMixerOwnProps>;
86
+ declare type ColorMixerStyle = ComponentStyle<'colorMixer' | 'sliderAndPaletteContainer'>;
87
+ declare const propTypes: PropValidators<PropKeys>;
88
+ declare const allowedProps: AllowedPropKeys;
89
+ export type { ColorMixerProps, ColorMixerStyle, ColorMixerState, RGBType, RGBAType, HSVType, HSLType };
90
+ export { propTypes, allowedProps };
91
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ColorMixer/props.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2BAA2B,CAAA;AAElC,aAAK,OAAO,GAAG;IACb,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AACD,aAAK,OAAO,GAAG;IACb,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AACD,aAAK,OAAO,GAAG;IACb,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AACD,aAAK,QAAQ,GAAG;IACd,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AACD,aAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;OAEG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,4BAA4B,EAAE,MAAM,CAAA;IACpC;;OAEG;IACH,8BAA8B,EAAE,MAAM,CAAA;IACtC;;OAEG;IACH,6BAA6B,EAAE,MAAM,CAAA;IACrC;;OAEG;IACH,8BAA8B,EAAE,MAAM,CAAA;IACtC;;;OAGG;IACH,iDAAiD,EAAE,MAAM,CAAA;IACzD;;;OAGG;IACH,iDAAiD,EAAE,MAAM,CAAA;IACzD;;;OAGG;IACH,kDAAkD,EAAE,MAAM,CAAA;CAC3D,CAAA;AAED,aAAK,eAAe,GAAG;IACrB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GACvC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,GACrC,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;AAEzC,aAAK,eAAe,GAAG,cAAc,CACnC,YAAY,GAAG,2BAA2B,CAC3C,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAgBvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAanB,CAAA;AAED,YAAY,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACR,CAAA;AACD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import type { ColorMixerStyle } from './props';
2
+ /**
3
+ * ---
4
+ * private: true
5
+ * ---
6
+ * Generates the style object from the theme and provided additional information
7
+ * @param {Object} componentTheme The theme variable object.
8
+ * @param {Object} props the props of the component, the style is applied to
9
+ * @param {Object} state the state of the component, the style is applied to
10
+ * @return {Object} The final style object, which will be used in the component
11
+ */
12
+ declare const generateStyle: () => ColorMixerStyle;
13
+ export default generateStyle;
14
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ColorMixer/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,QAAO,eAYzB,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const shallowCompare: (newObj: Record<string, unknown>, prevObj: Record<string, unknown>) => boolean;
2
+ export default shallowCompare;
3
+ //# sourceMappingURL=shallowCompare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shallowCompare.d.ts","sourceRoot":"","sources":["../../../src/ColorMixer/utils/shallowCompare.ts"],"names":[],"mappings":"AAwBA,QAAA,MAAM,cAAc,WACV,OAAO,MAAM,EAAE,OAAO,CAAC,WACtB,OAAO,MAAM,EAAE,OAAO,CAAC,YAMjC,CAAA;AAED,eAAe,cAAc,CAAA"}