@instructure/ui-form-field 9.5.2-snapshot-7 → 9.6.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,17 +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-7](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2-snapshot-7) (2024-07-31)
6
+ # [9.6.0](https://github.com/instructure/instructure-ui/compare/v9.5.2...v9.6.0) (2024-08-14)
7
7
 
8
+ **Note:** Version bump only for package @instructure/ui-form-field
8
9
 
9
- ### Features
10
10
 
11
- * **many:** rewrite color system ([1e5809e](https://github.com/instructure/instructure-ui/commit/1e5809e28dee8c2a71703a429609b8d2f95d76e6))
12
11
 
13
12
 
14
- ### BREAKING CHANGES
15
13
 
16
- * **many:** Breaks color overrides in certain cases
14
+ ## [9.5.2](https://github.com/instructure/instructure-ui/compare/v9.5.1...v9.5.2) (2024-08-05)
15
+
16
+ **Note:** Version bump only for package @instructure/ui-form-field
17
17
 
18
18
 
19
19
 
@@ -28,7 +28,6 @@
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;
32
31
  const borders = theme.borders,
33
32
  colors = theme.colors,
34
33
  spacing = theme.spacing;
@@ -37,7 +36,7 @@ const generateComponentTheme = theme => {
37
36
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
38
37
  borderColor: 'transparent',
39
38
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
40
- errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.red4570,
39
+ errorBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
41
40
  errorFieldsPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall
42
41
  };
43
42
  return {
@@ -28,7 +28,6 @@
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;
32
31
  const colors = theme.colors,
33
32
  typography = theme.typography,
34
33
  themeName = theme.key;
@@ -38,7 +37,7 @@ const generateComponentTheme = theme => {
38
37
  }
39
38
  };
40
39
  const componentVariables = {
41
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
40
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
42
41
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
42
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
44
43
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
@@ -28,7 +28,6 @@
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;
32
31
  const colors = theme.colors,
33
32
  typography = theme.typography,
34
33
  themeName = theme.key;
@@ -38,9 +37,9 @@ const generateComponentTheme = theme => {
38
37
  }
39
38
  };
40
39
  const componentVariables = {
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,
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,
44
43
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
45
44
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
46
45
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
@@ -34,7 +34,6 @@ 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;
38
37
  const borders = theme.borders,
39
38
  colors = theme.colors,
40
39
  spacing = theme.spacing;
@@ -43,7 +42,7 @@ const generateComponentTheme = theme => {
43
42
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
44
43
  borderColor: 'transparent',
45
44
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
46
- errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.red4570,
45
+ errorBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
47
46
  errorFieldsPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall
48
47
  };
49
48
  return {
@@ -34,7 +34,6 @@ 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;
38
37
  const colors = theme.colors,
39
38
  typography = theme.typography,
40
39
  themeName = theme.key;
@@ -44,7 +43,7 @@ const generateComponentTheme = theme => {
44
43
  }
45
44
  };
46
45
  const componentVariables = {
47
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
46
+ color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
48
47
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
49
48
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
50
49
  fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
@@ -34,7 +34,6 @@ 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;
38
37
  const colors = theme.colors,
39
38
  typography = theme.typography,
40
39
  themeName = theme.key;
@@ -44,9 +43,9 @@ const generateComponentTheme = theme => {
44
43
  }
45
44
  };
46
45
  const componentVariables = {
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,
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,
50
49
  fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
51
50
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
52
51
  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-7",
3
+ "version": "9.6.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-7",
27
- "@instructure/ui-babel-preset": "9.5.2-snapshot-7",
28
- "@instructure/ui-test-utils": "9.5.2-snapshot-7",
29
- "@instructure/ui-themes": "9.5.2-snapshot-7",
26
+ "@instructure/ui-axe-check": "9.6.0",
27
+ "@instructure/ui-babel-preset": "9.6.0",
28
+ "@instructure/ui-test-utils": "9.6.0",
29
+ "@instructure/ui-themes": "9.6.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-7",
37
- "@instructure/emotion": "9.5.2-snapshot-7",
38
- "@instructure/shared-types": "9.5.2-snapshot-7",
39
- "@instructure/ui-a11y-content": "9.5.2-snapshot-7",
40
- "@instructure/ui-a11y-utils": "9.5.2-snapshot-7",
41
- "@instructure/ui-grid": "9.5.2-snapshot-7",
42
- "@instructure/ui-icons": "9.5.2-snapshot-7",
43
- "@instructure/ui-react-utils": "9.5.2-snapshot-7",
44
- "@instructure/ui-utils": "9.5.2-snapshot-7",
45
- "@instructure/uid": "9.5.2-snapshot-7",
36
+ "@instructure/console": "9.6.0",
37
+ "@instructure/emotion": "9.6.0",
38
+ "@instructure/shared-types": "9.6.0",
39
+ "@instructure/ui-a11y-content": "9.6.0",
40
+ "@instructure/ui-a11y-utils": "9.6.0",
41
+ "@instructure/ui-grid": "9.6.0",
42
+ "@instructure/ui-icons": "9.6.0",
43
+ "@instructure/ui-react-utils": "9.6.0",
44
+ "@instructure/ui-utils": "9.6.0",
45
+ "@instructure/uid": "9.6.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?.contrasts?.red4570,
42
+ errorBorderColor: colors?.borderDanger,
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?.contrasts?.grey125125,
43
+ color: colors?.textDarkest,
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?.contrasts?.grey125125,
44
- colorError: colors?.contrasts?.red4570,
45
- colorSuccess: colors?.contrasts?.green4570,
43
+ colorHint: colors?.textDarkest,
44
+ colorError: colors?.textDanger,
45
+ colorSuccess: colors?.textSuccess,
46
46
 
47
47
  fontFamily: typography?.fontFamily,
48
48
  fontWeight: typography?.fontWeightNormal,