@instructure/ui-color-picker 9.5.2-snapshot-1 → 10.0.0

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 CHANGED
@@ -3,9 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [9.5.2-snapshot-1](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2-snapshot-1) (2024-07-31)
6
+ # [10.0.0](https://github.com/instructure/instructure-ui/compare/v9.5.1...v10.0.0) (2024-07-31)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-color-picker
8
+
9
+ ### Features
10
+
11
+ * **many:** rewrite color system ([1e5809e](https://github.com/instructure/instructure-ui/commit/1e5809e28dee8c2a71703a429609b8d2f95d76e6))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **many:** Breaks color overrides in certain cases
9
17
 
10
18
 
11
19
 
@@ -28,6 +28,7 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
31
32
  const colors = theme.colors,
32
33
  typography = theme.typography,
33
34
  spacing = theme.spacing,
@@ -44,9 +45,9 @@ const generateComponentTheme = theme => {
44
45
  colorPreviewTopMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
45
46
  labelBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
46
47
  smallBorder: borders.widthSmall,
47
- successColor: colors.shamrock,
48
- failureColor: colors.crimson,
49
- pickedHexColor: colors.ash
48
+ successColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.green4570,
49
+ failureColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.red4570,
50
+ pickedHexColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey4570
50
51
  };
51
52
  return {
52
53
  ...componentVariables
@@ -30,15 +30,16 @@ export const colorIndicatorBorderColor = '#384A5899';
30
30
  * @return {Object} The final theme object with the overrides and component variables
31
31
  */
32
32
  const generateComponentTheme = theme => {
33
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4;
33
34
  const colors = theme.colors,
34
35
  borders = theme.borders,
35
36
  spacing = theme.spacing;
36
37
  const componentVariables = {
37
38
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
38
- backgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
39
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
40
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
41
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
39
+ backgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214} 25%, transparent 25%),
40
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1214} 25%, transparent 25%),
41
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1214} 75%),
42
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey1214} 75%)`,
42
43
  backgroundSize: '.5rem .5rem',
43
44
  backgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
44
45
  circleIndicatorSize: '1.5rem',
@@ -30,12 +30,13 @@ import { colorIndicatorBorderColor } from '../../ColorIndicator/theme';
30
30
  * @return {Object} The final theme object with the overrides and component variables
31
31
  */
32
32
  const generateComponentTheme = theme => {
33
+ var _colors$contrasts, _colors$contrasts2;
33
34
  const colors = theme.colors,
34
35
  borders = theme.borders,
35
36
  stacking = theme.stacking;
36
37
  const componentVariables = {
37
- indicatorBorderColor: colors.licorice,
38
- whiteColor: colors.white,
38
+ indicatorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
39
+ whiteColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
39
40
  colorIndicatorBorderColor,
40
41
  indicatorBorderWidth: borders.widthSmall,
41
42
  paletteBorderRadius: borders.radiusMedium,
@@ -30,15 +30,16 @@ import { colorIndicatorBorderColor } from '../../ColorIndicator/theme';
30
30
  * @return {Object} The final theme object with the overrides and component variables
31
31
  */
32
32
  const generateComponentTheme = theme => {
33
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5;
33
34
  const colors = theme.colors,
34
35
  borders = theme.borders,
35
36
  stacking = theme.stacking;
36
37
  const componentVariables = {
37
- indicatorBorderColor: colors.licorice,
38
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
39
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
40
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
41
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
38
+ indicatorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
39
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1111} 25%, transparent 25%),
40
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1111} 25%, transparent 25%),
41
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey1111} 75%),
42
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey1111} 75%)`,
42
43
  checkerboardBackgroundSize: '.5rem .5rem',
43
44
  checkerboardBackgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
44
45
  colorIndicatorBorderColor,
@@ -30,28 +30,29 @@ import { colorIndicatorBorderColor } from '../ColorIndicator/theme';
30
30
  * @return {Object} The final theme object with the overrides and component variables
31
31
  */
32
32
  const generateComponentTheme = theme => {
33
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8, _colors$contrasts9, _colors$contrasts10, _colors$contrasts11;
33
34
  const colors = theme.colors,
34
35
  borders = theme.borders,
35
36
  spacing = theme.spacing,
36
37
  typography = theme.typography;
37
38
  const componentVariables = {
38
- hashMarkColor: colors === null || colors === void 0 ? void 0 : colors.ash,
39
- warningIconColor: colors === null || colors === void 0 ? void 0 : colors.textWarning,
40
- errorIconColor: colors === null || colors === void 0 ? void 0 : colors.textDanger,
41
- successIconColor: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
42
- popoverSeparatorColor: colors === null || colors === void 0 ? void 0 : colors.tiara,
43
- popoverFooterColor: colors === null || colors === void 0 ? void 0 : colors.porcelain,
39
+ hashMarkColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey4570,
40
+ warningIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.orange4570,
41
+ errorIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.red4570,
42
+ successIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.green4570,
43
+ popoverSeparatorColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey1214,
44
+ popoverFooterColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey1111,
44
45
  smallBorder: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
45
46
  smallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.small,
46
47
  xSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
47
48
  xxSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
48
49
  xxxSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
49
50
  xLargeFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXLarge,
50
- checkerboardBackgroundColor: colors.white,
51
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
52
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
53
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
54
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
51
+ checkerboardBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.white1010,
52
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.grey1214} 25%, transparent 25%),
53
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts9 = colors.contrasts) === null || _colors$contrasts9 === void 0 ? void 0 : _colors$contrasts9.grey1214} 25%, transparent 25%),
54
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts10 = colors.contrasts) === null || _colors$contrasts10 === void 0 ? void 0 : _colors$contrasts10.grey1214} 75%),
55
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts11 = colors.contrasts) === null || _colors$contrasts11 === void 0 ? void 0 : _colors$contrasts11.grey1214} 75%)`,
55
56
  checkerboardBackgroundSize: '.5rem .5rem',
56
57
  checkerboardBackgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
57
58
  colorIndicatorBorderColor,
@@ -28,21 +28,22 @@
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
30
  const generateComponentTheme = theme => {
31
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8;
31
32
  const colors = theme.colors,
32
33
  borders = theme.borders,
33
34
  spacing = theme.spacing;
34
35
  const componentVariables = {
35
36
  xxSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
36
37
  smallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.small,
37
- selectedIndicatorBackgroundColor: colors.white,
38
- selectedIndicatorBorderColor: colors.licorice,
39
- popoverDividerColor: colors === null || colors === void 0 ? void 0 : colors.tiara,
38
+ selectedIndicatorBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
39
+ selectedIndicatorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
40
+ popoverDividerColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1214,
40
41
  smallBorder: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
41
- popoverFooterColor: colors === null || colors === void 0 ? void 0 : colors.porcelain,
42
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
43
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
44
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
45
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
42
+ popoverFooterColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey1111,
43
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey4570} 25%, transparent 25%),
44
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey4570} 25%, transparent 25%),
45
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570} 75%),
46
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.grey4570} 75%)`,
46
47
  checkerboardBackgroundSize: '.5rem .5rem',
47
48
  checkerboardBackgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
48
49
  popoverContentBlockTopMargin: spacing === null || spacing === void 0 ? void 0 : spacing.medium,
@@ -34,6 +34,7 @@ exports.default = void 0;
34
34
  * @return {Object} The final theme object with the overrides and component variables
35
35
  */
36
36
  const generateComponentTheme = theme => {
37
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
37
38
  const colors = theme.colors,
38
39
  typography = theme.typography,
39
40
  spacing = theme.spacing,
@@ -50,9 +51,9 @@ const generateComponentTheme = theme => {
50
51
  colorPreviewTopMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
51
52
  labelBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
52
53
  smallBorder: borders.widthSmall,
53
- successColor: colors.shamrock,
54
- failureColor: colors.crimson,
55
- pickedHexColor: colors.ash
54
+ successColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.green4570,
55
+ failureColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.red4570,
56
+ pickedHexColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey4570
56
57
  };
57
58
  return {
58
59
  ...componentVariables
@@ -36,15 +36,16 @@ const colorIndicatorBorderColor = exports.colorIndicatorBorderColor = '#384A5899
36
36
  * @return {Object} The final theme object with the overrides and component variables
37
37
  */
38
38
  const generateComponentTheme = theme => {
39
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4;
39
40
  const colors = theme.colors,
40
41
  borders = theme.borders,
41
42
  spacing = theme.spacing;
42
43
  const componentVariables = {
43
44
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
44
- backgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
45
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
46
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
47
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
45
+ backgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214} 25%, transparent 25%),
46
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1214} 25%, transparent 25%),
47
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1214} 75%),
48
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey1214} 75%)`,
48
49
  backgroundSize: '.5rem .5rem',
49
50
  backgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
50
51
  circleIndicatorSize: '1.5rem',
@@ -35,12 +35,13 @@ var _theme = require("../../ColorIndicator/theme");
35
35
  * @return {Object} The final theme object with the overrides and component variables
36
36
  */
37
37
  const generateComponentTheme = theme => {
38
+ var _colors$contrasts, _colors$contrasts2;
38
39
  const colors = theme.colors,
39
40
  borders = theme.borders,
40
41
  stacking = theme.stacking;
41
42
  const componentVariables = {
42
- indicatorBorderColor: colors.licorice,
43
- whiteColor: colors.white,
43
+ indicatorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
44
+ whiteColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.white1010,
44
45
  colorIndicatorBorderColor: _theme.colorIndicatorBorderColor,
45
46
  indicatorBorderWidth: borders.widthSmall,
46
47
  paletteBorderRadius: borders.radiusMedium,
@@ -35,15 +35,16 @@ var _theme = require("../../ColorIndicator/theme");
35
35
  * @return {Object} The final theme object with the overrides and component variables
36
36
  */
37
37
  const generateComponentTheme = theme => {
38
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5;
38
39
  const colors = theme.colors,
39
40
  borders = theme.borders,
40
41
  stacking = theme.stacking;
41
42
  const componentVariables = {
42
- indicatorBorderColor: colors.licorice,
43
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
44
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
45
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
46
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
43
+ indicatorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
44
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey1111} 25%, transparent 25%),
45
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1111} 25%, transparent 25%),
46
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey1111} 75%),
47
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey1111} 75%)`,
47
48
  checkerboardBackgroundSize: '.5rem .5rem',
48
49
  checkerboardBackgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
49
50
  colorIndicatorBorderColor: _theme.colorIndicatorBorderColor,
@@ -35,28 +35,29 @@ var _theme = require("../ColorIndicator/theme");
35
35
  * @return {Object} The final theme object with the overrides and component variables
36
36
  */
37
37
  const generateComponentTheme = theme => {
38
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8, _colors$contrasts9, _colors$contrasts10, _colors$contrasts11;
38
39
  const colors = theme.colors,
39
40
  borders = theme.borders,
40
41
  spacing = theme.spacing,
41
42
  typography = theme.typography;
42
43
  const componentVariables = {
43
- hashMarkColor: colors === null || colors === void 0 ? void 0 : colors.ash,
44
- warningIconColor: colors === null || colors === void 0 ? void 0 : colors.textWarning,
45
- errorIconColor: colors === null || colors === void 0 ? void 0 : colors.textDanger,
46
- successIconColor: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
47
- popoverSeparatorColor: colors === null || colors === void 0 ? void 0 : colors.tiara,
48
- popoverFooterColor: colors === null || colors === void 0 ? void 0 : colors.porcelain,
44
+ hashMarkColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey4570,
45
+ warningIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.orange4570,
46
+ errorIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.red4570,
47
+ successIconColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.green4570,
48
+ popoverSeparatorColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey1214,
49
+ popoverFooterColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey1111,
49
50
  smallBorder: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
50
51
  smallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.small,
51
52
  xSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall,
52
53
  xxSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
53
54
  xxxSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xxxSmall,
54
55
  xLargeFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeXLarge,
55
- checkerboardBackgroundColor: colors.white,
56
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
57
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
58
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
59
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
56
+ checkerboardBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.white1010,
57
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.grey1214} 25%, transparent 25%),
58
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts9 = colors.contrasts) === null || _colors$contrasts9 === void 0 ? void 0 : _colors$contrasts9.grey1214} 25%, transparent 25%),
59
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts10 = colors.contrasts) === null || _colors$contrasts10 === void 0 ? void 0 : _colors$contrasts10.grey1214} 75%),
60
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts11 = colors.contrasts) === null || _colors$contrasts11 === void 0 ? void 0 : _colors$contrasts11.grey1214} 75%)`,
60
61
  checkerboardBackgroundSize: '.5rem .5rem',
61
62
  checkerboardBackgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
62
63
  colorIndicatorBorderColor: _theme.colorIndicatorBorderColor,
@@ -34,21 +34,22 @@ exports.default = void 0;
34
34
  * @return {Object} The final theme object with the overrides and component variables
35
35
  */
36
36
  const generateComponentTheme = theme => {
37
+ var _colors$contrasts, _colors$contrasts2, _colors$contrasts3, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7, _colors$contrasts8;
37
38
  const colors = theme.colors,
38
39
  borders = theme.borders,
39
40
  spacing = theme.spacing;
40
41
  const componentVariables = {
41
42
  xxSmallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.xxSmall,
42
43
  smallSpacing: spacing === null || spacing === void 0 ? void 0 : spacing.small,
43
- selectedIndicatorBackgroundColor: colors.white,
44
- selectedIndicatorBorderColor: colors.licorice,
45
- popoverDividerColor: colors === null || colors === void 0 ? void 0 : colors.tiara,
44
+ selectedIndicatorBackgroundColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.white1010,
45
+ selectedIndicatorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
46
+ popoverDividerColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.grey1214,
46
47
  smallBorder: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
47
- popoverFooterColor: colors === null || colors === void 0 ? void 0 : colors.porcelain,
48
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
49
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
50
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
51
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
48
+ popoverFooterColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.grey1111,
49
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.grey4570} 25%, transparent 25%),
50
+ linear-gradient(-45deg, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.grey4570} 25%, transparent 25%),
51
+ linear-gradient(45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570} 75%),
52
+ linear-gradient(-45deg, transparent 75%, ${colors === null || colors === void 0 ? void 0 : (_colors$contrasts8 = colors.contrasts) === null || _colors$contrasts8 === void 0 ? void 0 : _colors$contrasts8.grey4570} 75%)`,
52
53
  checkerboardBackgroundSize: '.5rem .5rem',
53
54
  checkerboardBackgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
54
55
  popoverContentBlockTopMargin: spacing === null || spacing === void 0 ? void 0 : spacing.medium,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-color-picker",
3
- "version": "9.5.2-snapshot-1",
3
+ "version": "10.0.0",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,33 +24,33 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.24.5",
27
- "@instructure/console": "9.5.2-snapshot-1",
28
- "@instructure/emotion": "9.5.2-snapshot-1",
29
- "@instructure/shared-types": "9.5.2-snapshot-1",
30
- "@instructure/ui-a11y-content": "9.5.2-snapshot-1",
31
- "@instructure/ui-buttons": "9.5.2-snapshot-1",
32
- "@instructure/ui-color-utils": "9.5.2-snapshot-1",
33
- "@instructure/ui-dom-utils": "9.5.2-snapshot-1",
34
- "@instructure/ui-drilldown": "9.5.2-snapshot-1",
35
- "@instructure/ui-form-field": "9.5.2-snapshot-1",
36
- "@instructure/ui-icons": "9.5.2-snapshot-1",
37
- "@instructure/ui-pill": "9.5.2-snapshot-1",
38
- "@instructure/ui-popover": "9.5.2-snapshot-1",
39
- "@instructure/ui-react-utils": "9.5.2-snapshot-1",
40
- "@instructure/ui-testable": "9.5.2-snapshot-1",
41
- "@instructure/ui-text": "9.5.2-snapshot-1",
42
- "@instructure/ui-text-input": "9.5.2-snapshot-1",
43
- "@instructure/ui-themes": "9.5.2-snapshot-1",
44
- "@instructure/ui-tooltip": "9.5.2-snapshot-1",
45
- "@instructure/ui-utils": "9.5.2-snapshot-1",
46
- "@instructure/ui-view": "9.5.2-snapshot-1",
27
+ "@instructure/console": "10.0.0",
28
+ "@instructure/emotion": "10.0.0",
29
+ "@instructure/shared-types": "10.0.0",
30
+ "@instructure/ui-a11y-content": "10.0.0",
31
+ "@instructure/ui-buttons": "10.0.0",
32
+ "@instructure/ui-color-utils": "10.0.0",
33
+ "@instructure/ui-dom-utils": "10.0.0",
34
+ "@instructure/ui-drilldown": "10.0.0",
35
+ "@instructure/ui-form-field": "10.0.0",
36
+ "@instructure/ui-icons": "10.0.0",
37
+ "@instructure/ui-pill": "10.0.0",
38
+ "@instructure/ui-popover": "10.0.0",
39
+ "@instructure/ui-react-utils": "10.0.0",
40
+ "@instructure/ui-testable": "10.0.0",
41
+ "@instructure/ui-text": "10.0.0",
42
+ "@instructure/ui-text-input": "10.0.0",
43
+ "@instructure/ui-themes": "10.0.0",
44
+ "@instructure/ui-tooltip": "10.0.0",
45
+ "@instructure/ui-utils": "10.0.0",
46
+ "@instructure/ui-view": "10.0.0",
47
47
  "prop-types": "^15.8.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@instructure/ui-axe-check": "9.5.2-snapshot-1",
51
- "@instructure/ui-babel-preset": "9.5.2-snapshot-1",
52
- "@instructure/ui-scripts": "9.5.2-snapshot-1",
53
- "@instructure/ui-test-utils": "9.5.2-snapshot-1",
50
+ "@instructure/ui-axe-check": "10.0.0",
51
+ "@instructure/ui-babel-preset": "10.0.0",
52
+ "@instructure/ui-scripts": "10.0.0",
53
+ "@instructure/ui-test-utils": "10.0.0",
54
54
  "@testing-library/jest-dom": "^6.4.5",
55
55
  "@testing-library/react": "^15.0.7",
56
56
  "@testing-library/user-event": "^14.5.2",
@@ -49,9 +49,9 @@ const generateComponentTheme = (theme: Theme): ColorContrastTheme => {
49
49
 
50
50
  smallBorder: borders.widthSmall,
51
51
 
52
- successColor: colors.shamrock,
53
- failureColor: colors.crimson,
54
- pickedHexColor: colors.ash
52
+ successColor: colors?.contrasts?.green4570,
53
+ failureColor: colors?.contrasts?.red4570,
54
+ pickedHexColor: colors?.contrasts?.grey4570
55
55
  }
56
56
 
57
57
  return {
@@ -37,10 +37,10 @@ const generateComponentTheme = (theme: Theme): ColorIndicatorTheme => {
37
37
 
38
38
  const componentVariables = {
39
39
  borderWidth: borders?.widthSmall,
40
- backgroundImage: `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%)`,
40
+ backgroundImage: `linear-gradient(45deg, ${colors?.contrasts?.grey1214} 25%, transparent 25%),
41
+ linear-gradient(-45deg, ${colors?.contrasts?.grey1214} 25%, transparent 25%),
42
+ linear-gradient(45deg, transparent 75%, ${colors?.contrasts?.grey1214} 75%),
43
+ linear-gradient(-45deg, transparent 75%, ${colors?.contrasts?.grey1214} 75%)`,
44
44
  backgroundSize: '.5rem .5rem',
45
45
  backgroundPosition: '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
46
46
  circleIndicatorSize: '1.5rem',
@@ -35,8 +35,8 @@ const generateComponentTheme = (theme: Theme): ColorMixerPaletteTheme => {
35
35
  const { colors, borders, stacking } = theme
36
36
 
37
37
  const componentVariables = {
38
- indicatorBorderColor: colors.licorice,
39
- whiteColor: colors.white,
38
+ indicatorBorderColor: colors?.contrasts?.grey125125,
39
+ whiteColor: colors?.contrasts?.white1010,
40
40
  colorIndicatorBorderColor,
41
41
  indicatorBorderWidth: borders.widthSmall,
42
42
  paletteBorderRadius: borders.radiusMedium,
@@ -35,12 +35,12 @@ const generateComponentTheme = (theme: Theme): ColorMixerSliderTheme => {
35
35
  const { colors, borders, stacking } = theme
36
36
 
37
37
  const componentVariables = {
38
- indicatorBorderColor: colors.licorice,
38
+ indicatorBorderColor: colors?.contrasts?.grey125125,
39
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%)`,
40
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors?.contrasts?.grey1111} 25%, transparent 25%),
41
+ linear-gradient(-45deg, ${colors?.contrasts?.grey1111} 25%, transparent 25%),
42
+ linear-gradient(45deg, transparent 75%, ${colors?.contrasts?.grey1111} 75%),
43
+ linear-gradient(-45deg, transparent 75%, ${colors?.contrasts?.grey1111} 75%)`,
44
44
  checkerboardBackgroundSize: '.5rem .5rem',
45
45
  checkerboardBackgroundPosition:
46
46
  '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
@@ -35,23 +35,23 @@ const generateComponentTheme = (theme: Theme): ColorPickerTheme => {
35
35
  const { colors, borders, spacing, typography } = theme
36
36
 
37
37
  const componentVariables = {
38
- hashMarkColor: colors?.ash,
39
- warningIconColor: colors?.textWarning,
40
- errorIconColor: colors?.textDanger,
41
- successIconColor: colors?.textSuccess,
42
- popoverSeparatorColor: colors?.tiara,
43
- popoverFooterColor: colors?.porcelain,
38
+ hashMarkColor: colors?.contrasts?.grey4570,
39
+ warningIconColor: colors?.contrasts?.orange4570,
40
+ errorIconColor: colors?.contrasts?.red4570,
41
+ successIconColor: colors?.contrasts?.green4570,
42
+ popoverSeparatorColor: colors?.contrasts?.grey1214,
43
+ popoverFooterColor: colors?.contrasts?.grey1111,
44
44
  smallBorder: borders?.widthSmall,
45
45
  smallSpacing: spacing?.small,
46
46
  xSmallSpacing: spacing?.xSmall,
47
47
  xxSmallSpacing: spacing?.xxSmall,
48
48
  xxxSmallSpacing: spacing?.xxxSmall,
49
49
  xLargeFontSize: typography?.fontSizeXLarge,
50
- checkerboardBackgroundColor: colors.white,
51
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
52
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
53
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
54
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
50
+ checkerboardBackgroundColor: colors?.contrasts?.white1010,
51
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors?.contrasts?.grey1214} 25%, transparent 25%),
52
+ linear-gradient(-45deg, ${colors?.contrasts?.grey1214} 25%, transparent 25%),
53
+ linear-gradient(45deg, transparent 75%, ${colors?.contrasts?.grey1214} 75%),
54
+ linear-gradient(-45deg, transparent 75%, ${colors?.contrasts?.grey1214} 75%)`,
55
55
  checkerboardBackgroundSize: '.5rem .5rem',
56
56
  checkerboardBackgroundPosition:
57
57
  '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',
@@ -36,15 +36,15 @@ const generateComponentTheme = (theme: Theme): ColorPresetTheme => {
36
36
  const componentVariables = {
37
37
  xxSmallSpacing: spacing?.xxSmall,
38
38
  smallSpacing: spacing?.small,
39
- selectedIndicatorBackgroundColor: colors.white,
40
- selectedIndicatorBorderColor: colors.licorice,
41
- popoverDividerColor: colors?.tiara,
39
+ selectedIndicatorBackgroundColor: colors?.contrasts?.white1010,
40
+ selectedIndicatorBorderColor: colors?.contrasts?.grey125125,
41
+ popoverDividerColor: colors?.contrasts?.grey1214,
42
42
  smallBorder: borders?.widthSmall,
43
- popoverFooterColor: colors?.porcelain,
44
- checkerboardBackgroundImage: `linear-gradient(45deg, ${colors.tiara} 25%, transparent 25%),
45
- linear-gradient(-45deg, ${colors.tiara} 25%, transparent 25%),
46
- linear-gradient(45deg, transparent 75%, ${colors.tiara} 75%),
47
- linear-gradient(-45deg, transparent 75%, ${colors.tiara} 75%)`,
43
+ popoverFooterColor: colors?.contrasts?.grey1111,
44
+ checkerboardBackgroundImage: `linear-gradient(45deg, ${colors?.contrasts?.grey4570} 25%, transparent 25%),
45
+ linear-gradient(-45deg, ${colors?.contrasts?.grey4570} 25%, transparent 25%),
46
+ linear-gradient(45deg, transparent 75%, ${colors?.contrasts?.grey4570} 75%),
47
+ linear-gradient(-45deg, transparent 75%, ${colors?.contrasts?.grey4570} 75%)`,
48
48
  checkerboardBackgroundSize: '.5rem .5rem',
49
49
  checkerboardBackgroundPosition:
50
50
  '0 0, 0 .25rem, .25rem -0.25rem, -0.25rem 0px',