@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 @@
|
|
|
1
|
+
{"version":3,"file":"ColorContrastLocator.d.ts","sourceRoot":"","sources":["../../src/ColorContrast/ColorContrastLocator.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AAUnD,eAAO,MAAM,oBAAoB;;+BACR,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAL,GAAG,EAAE;;;;;8NAe5B,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
/** @jsxFrag React.Fragment */
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
import { jsx } from '@instructure/emotion';
|
|
5
|
+
import type { ColorContrastProps } from './props';
|
|
6
|
+
import type { RGBAType } from '../ColorMixer/props';
|
|
7
|
+
/**
|
|
8
|
+
---
|
|
9
|
+
category: components
|
|
10
|
+
---
|
|
11
|
+
@tsProps
|
|
12
|
+
**/
|
|
13
|
+
declare class ColorContrast extends Component<ColorContrastProps> {
|
|
14
|
+
static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
|
|
15
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
16
|
+
failureLabel: string;
|
|
17
|
+
firstColor: string;
|
|
18
|
+
firstColorLabel?: string | undefined;
|
|
19
|
+
graphicsTextLabel: string;
|
|
20
|
+
label: string;
|
|
21
|
+
largeTextLabel: string;
|
|
22
|
+
normalTextLabel: string;
|
|
23
|
+
secondColor: string;
|
|
24
|
+
secondColorLabel?: string | undefined;
|
|
25
|
+
successLabel: string;
|
|
26
|
+
withoutColorPreview?: boolean | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
static allowedProps: readonly (keyof {
|
|
29
|
+
elementRef?: ((element: Element | null) => void) | undefined;
|
|
30
|
+
failureLabel: string;
|
|
31
|
+
firstColor: string;
|
|
32
|
+
firstColorLabel?: string | undefined;
|
|
33
|
+
graphicsTextLabel: string;
|
|
34
|
+
label: string;
|
|
35
|
+
largeTextLabel: string;
|
|
36
|
+
normalTextLabel: string;
|
|
37
|
+
secondColor: string;
|
|
38
|
+
secondColorLabel?: string | undefined;
|
|
39
|
+
successLabel: string;
|
|
40
|
+
withoutColorPreview?: boolean | undefined;
|
|
41
|
+
})[];
|
|
42
|
+
static readonly componentId = "ColorContrast";
|
|
43
|
+
constructor(props: ColorContrastProps);
|
|
44
|
+
ref: HTMLDivElement | null;
|
|
45
|
+
handleRef: (el: HTMLDivElement | null) => void;
|
|
46
|
+
componentDidMount(): void;
|
|
47
|
+
componentDidUpdate(): void;
|
|
48
|
+
renderStatus: (pass: boolean, description: string) => jsx.JSX.Element;
|
|
49
|
+
renderColorIndicator: (color: string, label: string) => jsx.JSX.Element;
|
|
50
|
+
calcBlendedColor: (c1: RGBAType, c2: RGBAType) => {
|
|
51
|
+
r: number;
|
|
52
|
+
g: number;
|
|
53
|
+
b: number;
|
|
54
|
+
a: number;
|
|
55
|
+
};
|
|
56
|
+
get calcContrast(): number;
|
|
57
|
+
render(): jsx.JSX.Element;
|
|
58
|
+
}
|
|
59
|
+
export { ColorContrast };
|
|
60
|
+
export default ColorContrast;
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ColorContrast/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,8BAA8B;AAC9B,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAWjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;;;;GAKG;AACH,cAEM,aAAc,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IACvD,MAAM,CAAC,SAAS;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,mBAAkB;gBAEjC,KAAK,EAAE,kBAAkB;IAIrC,GAAG,EAAE,cAAc,GAAG,IAAI,CAAO;IAEjC,SAAS,OAAQ,cAAc,GAAG,IAAI,UAQrC;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,YAAY,SAAU,OAAO,eAAe,MAAM,qBAgBjD;IAED,oBAAoB,UAAW,MAAM,SAAS,MAAM,qBAanD;IACD,gBAAgB,OAAQ,QAAQ,MAAM,QAAQ;;;;;MAQ7C;IAID,IAAI,YAAY,WAUf;IACD,MAAM;CA8CP;AAED,OAAO,EAAE,aAAa,EAAE,CAAA;AACxB,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
2
|
+
import type { OtherHTMLAttributes, PropValidators, ColorContrastTheme } from '@instructure/shared-types';
|
|
3
|
+
declare type ColorContrastOwnProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Provides a reference to the component's underlying html element.
|
|
6
|
+
*/
|
|
7
|
+
elementRef?: (element: Element | null) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Text of the failure indicator (Suggested english text: FAIL)
|
|
10
|
+
*/
|
|
11
|
+
failureLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* The first color to compare (HEX code)
|
|
14
|
+
*/
|
|
15
|
+
firstColor: string;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the first color which will be compared
|
|
18
|
+
*/
|
|
19
|
+
firstColorLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Text of the third check (Suggested english text: Graphics text)
|
|
22
|
+
*/
|
|
23
|
+
graphicsTextLabel: string;
|
|
24
|
+
/**
|
|
25
|
+
* Label of the component
|
|
26
|
+
*/
|
|
27
|
+
label: string;
|
|
28
|
+
/**
|
|
29
|
+
* Text of the second check (Suggested english text: Large text)
|
|
30
|
+
*/
|
|
31
|
+
largeTextLabel: string;
|
|
32
|
+
/**
|
|
33
|
+
* Text of the first check (Suggested english text: Normal text)
|
|
34
|
+
*/
|
|
35
|
+
normalTextLabel: string;
|
|
36
|
+
/**
|
|
37
|
+
* The second color to compare (HEX code)
|
|
38
|
+
*/
|
|
39
|
+
secondColor: string;
|
|
40
|
+
/**
|
|
41
|
+
* The name of the second color which will be compared
|
|
42
|
+
*/
|
|
43
|
+
secondColorLabel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Text of the success indicator (Suggested english text: PASS)
|
|
46
|
+
*/
|
|
47
|
+
successLabel: string;
|
|
48
|
+
/**
|
|
49
|
+
* toggles the color preview part of the component
|
|
50
|
+
* if true, firstColorLabel and secondColorLabel is not necessary. Otherwise required
|
|
51
|
+
*/
|
|
52
|
+
withoutColorPreview?: boolean;
|
|
53
|
+
};
|
|
54
|
+
declare type PropKeys = keyof ColorContrastOwnProps;
|
|
55
|
+
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
56
|
+
declare type ColorContrastProps = ColorContrastOwnProps & WithStyleProps<ColorContrastTheme, ColorContrastStyle> & OtherHTMLAttributes<ColorContrastOwnProps>;
|
|
57
|
+
declare type ColorContrastStyle = ComponentStyle<'colorContrast' | 'successDescription' | 'failureDescription' | 'statusWrapper' | 'colorIndicator' | 'statusIndicatorWrapper' | 'colorIndicatorLabel' | 'pickedColorHex' | 'colorPreview' | 'firstColorPreview' | 'secondColorPreview' | 'label'>;
|
|
58
|
+
declare const propTypes: PropValidators<PropKeys>;
|
|
59
|
+
declare const allowedProps: AllowedPropKeys;
|
|
60
|
+
export type { ColorContrastProps, ColorContrastStyle };
|
|
61
|
+
export { propTypes, allowedProps };
|
|
62
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/ColorContrast/props.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAElC,aAAK,qBAAqB,GAAG;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC9C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,cAAc,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,qBAAqB,CAAA;AAE3C,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,kBAAkB,GAAG,qBAAqB,GAC7C,cAAc,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,GACtD,mBAAmB,CAAC,qBAAqB,CAAC,CAAA;AAE5C,aAAK,kBAAkB,GAAG,cAAc,CACpC,eAAe,GACf,oBAAoB,GACpB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,wBAAwB,GACxB,qBAAqB,GACrB,gBAAgB,GAChB,cAAc,GACd,mBAAmB,GACnB,oBAAoB,GACpB,OAAO,CACV,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAavC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAanB,CAAA;AAED,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ColorContrastTheme } from '@instructure/shared-types';
|
|
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: (componentTheme: ColorContrastTheme) => {
|
|
13
|
+
colorContrast: {
|
|
14
|
+
label: string;
|
|
15
|
+
width: string;
|
|
16
|
+
fontFamily: string;
|
|
17
|
+
fontWeight: number;
|
|
18
|
+
lineHeight: string | number;
|
|
19
|
+
fontSize: string | 0;
|
|
20
|
+
};
|
|
21
|
+
statusWrapper: {
|
|
22
|
+
label: string;
|
|
23
|
+
width: string;
|
|
24
|
+
display: string;
|
|
25
|
+
marginBottom: string | 0;
|
|
26
|
+
};
|
|
27
|
+
successDescription: {
|
|
28
|
+
label: string;
|
|
29
|
+
flex: number;
|
|
30
|
+
color: string;
|
|
31
|
+
};
|
|
32
|
+
failureDescription: {
|
|
33
|
+
label: string;
|
|
34
|
+
flex: number;
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
37
|
+
colorIndicator: {
|
|
38
|
+
marginInlineEnd: string | 0;
|
|
39
|
+
};
|
|
40
|
+
statusIndicatorWrapper: {
|
|
41
|
+
label: string;
|
|
42
|
+
flex: number;
|
|
43
|
+
display: string;
|
|
44
|
+
flexDirection: string;
|
|
45
|
+
};
|
|
46
|
+
colorIndicatorLabel: {
|
|
47
|
+
label: string;
|
|
48
|
+
wordBreak: string;
|
|
49
|
+
};
|
|
50
|
+
pickedColorHex: {
|
|
51
|
+
label: string;
|
|
52
|
+
color: string;
|
|
53
|
+
};
|
|
54
|
+
colorPreview: {
|
|
55
|
+
label: string;
|
|
56
|
+
display: string;
|
|
57
|
+
width: string;
|
|
58
|
+
marginBottom: string | 0;
|
|
59
|
+
marginTop: string | 0;
|
|
60
|
+
};
|
|
61
|
+
firstColorPreview: {
|
|
62
|
+
label: string;
|
|
63
|
+
display: string;
|
|
64
|
+
flex: number;
|
|
65
|
+
};
|
|
66
|
+
secondColorPreview: {
|
|
67
|
+
label: string;
|
|
68
|
+
display: string;
|
|
69
|
+
};
|
|
70
|
+
label: {
|
|
71
|
+
label: string;
|
|
72
|
+
marginBottom: string | 0;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export default generateStyle;
|
|
76
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ColorContrast/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACnE;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBAAoB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgExD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Theme } from '@instructure/ui-themes';
|
|
2
|
+
import { ColorContrastTheme } 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) => ColorContrastTheme;
|
|
9
|
+
export default generateComponentTheme;
|
|
10
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/ColorContrast/theme.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;;GAIG;AACH,QAAA,MAAM,sBAAsB,UAAW,KAAK,KAAG,kBA2B9C,CAAA;AAED,eAAe,sBAAsB,CAAA"}
|