@instructure/ui-text-input 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-text-input
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, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7;
31
32
  const colors = theme.colors,
32
33
  typography = theme.typography,
33
34
  borders = theme.borders,
@@ -45,17 +46,17 @@ const generateComponentTheme = theme => {
45
46
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
46
47
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
47
48
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
48
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
49
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
49
50
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
50
- color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
51
- background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
51
+ color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
52
+ background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.white1010,
52
53
  padding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
53
54
  focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
54
55
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style,
55
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
56
- errorBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
57
- errorOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
58
- placeholderColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
56
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
57
+ errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.red4570,
58
+ errorOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.red4570,
59
+ placeholderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570,
59
60
  smallFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
60
61
  smallHeight: forms === null || forms === void 0 ? void 0 : forms.inputHeightSmall,
61
62
  mediumFontSize: 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, _colors$contrasts4, _colors$contrasts5, _colors$contrasts6, _colors$contrasts7;
37
38
  const colors = theme.colors,
38
39
  typography = theme.typography,
39
40
  borders = theme.borders,
@@ -51,17 +52,17 @@ const generateComponentTheme = theme => {
51
52
  fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
52
53
  borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
53
54
  borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
54
- borderColor: colors === null || colors === void 0 ? void 0 : colors.borderMedium,
55
+ borderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey1214,
55
56
  borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
56
- color: colors === null || colors === void 0 ? void 0 : colors.textDarkest,
57
- background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
57
+ color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.grey125125,
58
+ background: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.white1010,
58
59
  padding: spacing === null || spacing === void 0 ? void 0 : spacing.small,
59
60
  focusOutlineWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
60
61
  focusOutlineStyle: borders === null || borders === void 0 ? void 0 : borders.style,
61
- focusOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderBrand,
62
- errorBorderColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
63
- errorOutlineColor: colors === null || colors === void 0 ? void 0 : colors.borderDanger,
64
- placeholderColor: colors === null || colors === void 0 ? void 0 : colors.textDark,
62
+ focusOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts4 = colors.contrasts) === null || _colors$contrasts4 === void 0 ? void 0 : _colors$contrasts4.blue4570,
63
+ errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts5 = colors.contrasts) === null || _colors$contrasts5 === void 0 ? void 0 : _colors$contrasts5.red4570,
64
+ errorOutlineColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts6 = colors.contrasts) === null || _colors$contrasts6 === void 0 ? void 0 : _colors$contrasts6.red4570,
65
+ placeholderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts7 = colors.contrasts) === null || _colors$contrasts7 === void 0 ? void 0 : _colors$contrasts7.grey4570,
65
66
  smallFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
66
67
  smallHeight: forms === null || forms === void 0 ? void 0 : forms.inputHeightSmall,
67
68
  mediumFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-text-input",
3
- "version": "9.5.2-snapshot-1",
3
+ "version": "10.0.0",
4
4
  "description": "A styled HTML text input component.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,24 +23,24 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "9.5.2-snapshot-1",
27
- "@instructure/ui-badge": "9.5.2-snapshot-1",
28
- "@instructure/ui-color-utils": "9.5.2-snapshot-1",
29
- "@instructure/ui-test-utils": "9.5.2-snapshot-1",
30
- "@instructure/ui-themes": "9.5.2-snapshot-1",
26
+ "@instructure/ui-babel-preset": "10.0.0",
27
+ "@instructure/ui-badge": "10.0.0",
28
+ "@instructure/ui-color-utils": "10.0.0",
29
+ "@instructure/ui-test-utils": "10.0.0",
30
+ "@instructure/ui-themes": "10.0.0",
31
31
  "react-dom": "^18.3.1"
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.24.5",
35
- "@instructure/emotion": "9.5.2-snapshot-1",
36
- "@instructure/shared-types": "9.5.2-snapshot-1",
37
- "@instructure/ui-dom-utils": "9.5.2-snapshot-1",
38
- "@instructure/ui-form-field": "9.5.2-snapshot-1",
39
- "@instructure/ui-icons": "9.5.2-snapshot-1",
40
- "@instructure/ui-prop-types": "9.5.2-snapshot-1",
41
- "@instructure/ui-react-utils": "9.5.2-snapshot-1",
42
- "@instructure/ui-tag": "9.5.2-snapshot-1",
43
- "@instructure/ui-testable": "9.5.2-snapshot-1",
35
+ "@instructure/emotion": "10.0.0",
36
+ "@instructure/shared-types": "10.0.0",
37
+ "@instructure/ui-dom-utils": "10.0.0",
38
+ "@instructure/ui-form-field": "10.0.0",
39
+ "@instructure/ui-icons": "10.0.0",
40
+ "@instructure/ui-prop-types": "10.0.0",
41
+ "@instructure/ui-react-utils": "10.0.0",
42
+ "@instructure/ui-tag": "10.0.0",
43
+ "@instructure/ui-testable": "10.0.0",
44
44
  "prop-types": "^15.8.1"
45
45
  },
46
46
  "peerDependencies": {
@@ -46,22 +46,22 @@ const generateComponentTheme = (theme: Theme): TextInputTheme => {
46
46
 
47
47
  borderWidth: borders?.widthSmall,
48
48
  borderStyle: borders?.style,
49
- borderColor: colors?.borderMedium,
49
+ borderColor: colors?.contrasts?.grey1214,
50
50
  borderRadius: borders?.radiusMedium,
51
51
 
52
- color: colors?.textDarkest,
53
- background: colors?.backgroundLightest,
52
+ color: colors?.contrasts?.grey125125,
53
+ background: colors?.contrasts?.white1010,
54
54
 
55
55
  padding: spacing?.small,
56
56
 
57
57
  focusOutlineWidth: borders?.widthMedium,
58
58
  focusOutlineStyle: borders?.style,
59
- focusOutlineColor: colors?.borderBrand,
59
+ focusOutlineColor: colors?.contrasts?.blue4570,
60
60
 
61
- errorBorderColor: colors?.borderDanger,
62
- errorOutlineColor: colors?.borderDanger,
61
+ errorBorderColor: colors?.contrasts?.red4570,
62
+ errorOutlineColor: colors?.contrasts?.red4570,
63
63
 
64
- placeholderColor: colors?.textDark,
64
+ placeholderColor: colors?.contrasts?.grey4570,
65
65
 
66
66
  smallFontSize: typography?.fontSizeSmall,
67
67
  smallHeight: forms?.inputHeightSmall,