@instructure/ui-form-field 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-form-field
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;
31
32
  const borders = theme.borders,
32
33
  colors = theme.colors,
33
34
  spacing = theme.spacing;
@@ -36,7 +37,7 @@ const generateComponentTheme = theme => {
36
37
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
37
38
  borderColor: 'transparent',
38
39
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
39
- errorBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
40
+ errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.red4570,
40
41
  errorFieldsPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall
41
42
  };
42
43
  return {
@@ -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;
31
32
  const colors = theme.colors,
32
33
  typography = theme.typography,
33
34
  themeName = theme.key;
@@ -37,7 +38,7 @@ const generateComponentTheme = theme => {
37
38
  }
38
39
  };
39
40
  const componentVariables = {
40
- color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
41
+ color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
41
42
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
42
43
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
43
44
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
@@ -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
  themeName = theme.key;
@@ -37,9 +38,9 @@ const generateComponentTheme = theme => {
37
38
  }
38
39
  };
39
40
  const componentVariables = {
40
- colorHint: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
41
- colorError: colors === null || colors === void 0 ? void 0 : colors.textDanger,
42
- colorSuccess: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
41
+ colorHint: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
42
+ colorError: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.red4570,
43
+ colorSuccess: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.green4570,
43
44
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
44
45
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
45
46
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
@@ -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;
37
38
  const borders = theme.borders,
38
39
  colors = theme.colors,
39
40
  spacing = theme.spacing;
@@ -42,7 +43,7 @@ const generateComponentTheme = theme => {
42
43
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
43
44
  borderColor: 'transparent',
44
45
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
45
- errorBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
46
+ errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.red4570,
46
47
  errorFieldsPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall
47
48
  };
48
49
  return {
@@ -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;
37
38
  const colors = theme.colors,
38
39
  typography = theme.typography,
39
40
  themeName = theme.key;
@@ -43,7 +44,7 @@ const generateComponentTheme = theme => {
43
44
  }
44
45
  };
45
46
  const componentVariables = {
46
- color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
47
+ color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
47
48
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
48
49
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
49
50
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
@@ -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
  themeName = theme.key;
@@ -43,9 +44,9 @@ const generateComponentTheme = theme => {
43
44
  }
44
45
  };
45
46
  const componentVariables = {
46
- colorHint: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
47
- colorError: colors === null || colors === void 0 ? void 0 : colors.textDanger,
48
- colorSuccess: colors === null || colors === void 0 ? void 0 : colors.textSuccess,
47
+ colorHint: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
48
+ colorError: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.red4570,
49
+ colorSuccess: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.green4570,
49
50
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
50
51
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
51
52
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-form-field",
3
- "version": "9.5.2-snapshot-1",
3
+ "version": "10.0.0",
4
4
  "description": "Form layout components.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,26 +23,26 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "9.5.2-snapshot-1",
27
- "@instructure/ui-babel-preset": "9.5.2-snapshot-1",
28
- "@instructure/ui-test-utils": "9.5.2-snapshot-1",
29
- "@instructure/ui-themes": "9.5.2-snapshot-1",
26
+ "@instructure/ui-axe-check": "10.0.0",
27
+ "@instructure/ui-babel-preset": "10.0.0",
28
+ "@instructure/ui-test-utils": "10.0.0",
29
+ "@instructure/ui-themes": "10.0.0",
30
30
  "@testing-library/jest-dom": "^6.4.6",
31
31
  "@testing-library/react": "^15.0.7",
32
32
  "vitest": "^2.0.2"
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.24.5",
36
- "@instructure/console": "9.5.2-snapshot-1",
37
- "@instructure/emotion": "9.5.2-snapshot-1",
38
- "@instructure/shared-types": "9.5.2-snapshot-1",
39
- "@instructure/ui-a11y-content": "9.5.2-snapshot-1",
40
- "@instructure/ui-a11y-utils": "9.5.2-snapshot-1",
41
- "@instructure/ui-grid": "9.5.2-snapshot-1",
42
- "@instructure/ui-icons": "9.5.2-snapshot-1",
43
- "@instructure/ui-react-utils": "9.5.2-snapshot-1",
44
- "@instructure/ui-utils": "9.5.2-snapshot-1",
45
- "@instructure/uid": "9.5.2-snapshot-1",
36
+ "@instructure/console": "10.0.0",
37
+ "@instructure/emotion": "10.0.0",
38
+ "@instructure/shared-types": "10.0.0",
39
+ "@instructure/ui-a11y-content": "10.0.0",
40
+ "@instructure/ui-a11y-utils": "10.0.0",
41
+ "@instructure/ui-grid": "10.0.0",
42
+ "@instructure/ui-icons": "10.0.0",
43
+ "@instructure/ui-react-utils": "10.0.0",
44
+ "@instructure/ui-utils": "10.0.0",
45
+ "@instructure/uid": "10.0.0",
46
46
  "prop-types": "^15.8.1"
47
47
  },
48
48
  "peerDependencies": {
@@ -39,7 +39,7 @@ const generateComponentTheme = (theme: Theme): FormFieldGroupTheme => {
39
39
  borderColor: 'transparent',
40
40
  borderRadius: borders?.radiusMedium,
41
41
 
42
- errorBorderColor: colors?.borderDanger,
42
+ errorBorderColor: colors?.contrasts?.red4570,
43
43
  errorFieldsPadding: spacing?.xSmall
44
44
  }
45
45
 
@@ -40,7 +40,7 @@ const generateComponentTheme = (theme: Theme): FormFieldLabelTheme => {
40
40
  }
41
41
 
42
42
  const componentVariables: FormFieldLabelTheme = {
43
- color: colors?.textDarkest,
43
+ color: colors?.contrasts?.grey125125,
44
44
  fontFamily: typography?.fontFamily,
45
45
  fontWeight: typography?.fontWeightBold,
46
46
  fontSize: typography?.fontSizeMedium,
@@ -40,9 +40,9 @@ const generateComponentTheme = (theme: Theme): FormFieldMessageTheme => {
40
40
  }
41
41
 
42
42
  const componentVariables: FormFieldMessageTheme = {
43
- colorHint: colors?.textDarkest,
44
- colorError: colors?.textDanger,
45
- colorSuccess: colors?.textSuccess,
43
+ colorHint: colors?.contrasts?.grey125125,
44
+ colorError: colors?.contrasts?.red4570,
45
+ colorSuccess: colors?.contrasts?.green4570,
46
46
 
47
47
  fontFamily: typography?.fontFamily,
48
48
  fontWeight: typography?.fontWeightNormal,