@instructure/ui-text-input 8.33.1 → 8.33.2
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 +4 -0
- package/es/TextInput/index.js +25 -67
- package/es/TextInput/props.js +1 -0
- package/es/TextInput/styles.js +10 -9
- package/es/TextInput/theme.js +7 -7
- package/lib/TextInput/index.js +24 -82
- package/lib/TextInput/props.js +1 -5
- package/lib/TextInput/styles.js +10 -10
- package/lib/TextInput/theme.js +7 -8
- package/lib/index.js +0 -1
- package/package.json +15 -15
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TextInput/index.d.ts +2 -2
package/lib/TextInput/styles.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -41,13 +40,13 @@ exports.default = void 0;
|
|
|
41
40
|
*/
|
|
42
41
|
const generateStyle = (componentTheme, props, state) => {
|
|
43
42
|
const size = props.size,
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
textAlign = props.textAlign,
|
|
44
|
+
shouldNotWrap = props.shouldNotWrap;
|
|
46
45
|
const disabled = state.disabled,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
invalid = state.invalid,
|
|
47
|
+
focused = state.focused,
|
|
48
|
+
beforeElementHasWidth = state.beforeElementHasWidth,
|
|
49
|
+
afterElementHasWidth = state.afterElementHasWidth;
|
|
51
50
|
const sizeVariants = {
|
|
52
51
|
small: {
|
|
53
52
|
fontSize: componentTheme.smallFontSize,
|
|
@@ -122,13 +121,15 @@ const generateStyle = (componentTheme, props, state) => {
|
|
|
122
121
|
overflow: 'visible',
|
|
123
122
|
unicodeBidi: 'isolate'
|
|
124
123
|
};
|
|
125
|
-
const flexBase = {
|
|
124
|
+
const flexBase = {
|
|
125
|
+
...viewBase,
|
|
126
126
|
display: 'flex',
|
|
127
127
|
alignItems: 'center',
|
|
128
128
|
justifyContent: 'flex-start',
|
|
129
129
|
flexDirection: 'row'
|
|
130
130
|
};
|
|
131
|
-
const flexItemBase = {
|
|
131
|
+
const flexItemBase = {
|
|
132
|
+
...viewBase,
|
|
132
133
|
flexShrink: 0
|
|
133
134
|
};
|
|
134
135
|
return {
|
|
@@ -207,6 +208,5 @@ const generateStyle = (componentTheme, props, state) => {
|
|
|
207
208
|
}
|
|
208
209
|
};
|
|
209
210
|
};
|
|
210
|
-
|
|
211
211
|
var _default = generateStyle;
|
|
212
212
|
exports.default = _default;
|
package/lib/TextInput/theme.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -36,11 +35,11 @@ exports.default = void 0;
|
|
|
36
35
|
*/
|
|
37
36
|
const generateComponentTheme = theme => {
|
|
38
37
|
const colors = theme.colors,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
typography = theme.typography,
|
|
39
|
+
borders = theme.borders,
|
|
40
|
+
spacing = theme.spacing,
|
|
41
|
+
forms = theme.forms,
|
|
42
|
+
themeName = theme.key;
|
|
44
43
|
const themeSpecificStyle = {
|
|
45
44
|
canvas: {
|
|
46
45
|
color: theme['ic-brand-font-color-dark'],
|
|
@@ -70,10 +69,10 @@ const generateComponentTheme = theme => {
|
|
|
70
69
|
largeFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge,
|
|
71
70
|
largeHeight: forms === null || forms === void 0 ? void 0 : forms.inputHeightLarge
|
|
72
71
|
};
|
|
73
|
-
return {
|
|
72
|
+
return {
|
|
73
|
+
...componentVariables,
|
|
74
74
|
...themeSpecificStyle[themeName]
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
|
|
78
77
|
var _default = generateComponentTheme;
|
|
79
78
|
exports.default = _default;
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-text-input",
|
|
3
|
-
"version": "8.33.
|
|
3
|
+
"version": "8.33.2",
|
|
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,23 +23,23 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.33.
|
|
27
|
-
"@instructure/ui-badge": "8.33.
|
|
28
|
-
"@instructure/ui-color-utils": "8.33.
|
|
29
|
-
"@instructure/ui-test-utils": "8.33.
|
|
30
|
-
"@instructure/ui-themes": "8.33.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.33.2",
|
|
27
|
+
"@instructure/ui-badge": "8.33.2",
|
|
28
|
+
"@instructure/ui-color-utils": "8.33.2",
|
|
29
|
+
"@instructure/ui-test-utils": "8.33.2",
|
|
30
|
+
"@instructure/ui-themes": "8.33.2"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.13.10",
|
|
34
|
-
"@instructure/emotion": "8.33.
|
|
35
|
-
"@instructure/shared-types": "8.33.
|
|
36
|
-
"@instructure/ui-dom-utils": "8.33.
|
|
37
|
-
"@instructure/ui-form-field": "8.33.
|
|
38
|
-
"@instructure/ui-icons": "8.33.
|
|
39
|
-
"@instructure/ui-prop-types": "8.33.
|
|
40
|
-
"@instructure/ui-react-utils": "8.33.
|
|
41
|
-
"@instructure/ui-tag": "8.33.
|
|
42
|
-
"@instructure/ui-testable": "8.33.
|
|
34
|
+
"@instructure/emotion": "8.33.2",
|
|
35
|
+
"@instructure/shared-types": "8.33.2",
|
|
36
|
+
"@instructure/ui-dom-utils": "8.33.2",
|
|
37
|
+
"@instructure/ui-form-field": "8.33.2",
|
|
38
|
+
"@instructure/ui-icons": "8.33.2",
|
|
39
|
+
"@instructure/ui-prop-types": "8.33.2",
|
|
40
|
+
"@instructure/ui-react-utils": "8.33.2",
|
|
41
|
+
"@instructure/ui-tag": "8.33.2",
|
|
42
|
+
"@instructure/ui-testable": "8.33.2",
|
|
43
43
|
"prop-types": "^15"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|