@instructure/ui-text-input 11.7.3-snapshot-25 → 11.7.3-snapshot-27
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 +5 -2
- package/es/TextInput/v1/index.js +128 -121
- package/es/TextInput/v1/styles.js +12 -8
- package/es/TextInput/v1/theme.js +30 -29
- package/es/TextInput/v2/index.js +104 -102
- package/es/TextInput/v2/styles.js +12 -8
- package/lib/TextInput/v1/index.js +128 -121
- package/lib/TextInput/v1/styles.js +12 -8
- package/lib/TextInput/v1/theme.js +30 -29
- package/lib/TextInput/v2/index.js +104 -102
- package/lib/TextInput/v2/styles.js +12 -8
- package/package.json +14 -14
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
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
|
-
## [11.7.3-snapshot-
|
|
6
|
+
## [11.7.3-snapshot-27](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-27) (2026-05-05)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
package/es/TextInput/v1/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const _excluded = ["type", "size", "htmlSize", "display", "textAlign", "placeholder", "value", "defaultValue", "isRequired", "onFocus"];
|
|
3
|
-
var _dec, _dec2, _class, _TextInput;
|
|
1
|
+
var _dec, _dec2, _class;
|
|
4
2
|
/*
|
|
5
3
|
* The MIT License (MIT)
|
|
6
4
|
*
|
|
@@ -41,72 +39,46 @@ tags: form, field
|
|
|
41
39
|
---
|
|
42
40
|
**/
|
|
43
41
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
44
|
-
let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class =
|
|
42
|
+
let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = class TextInput extends Component {
|
|
43
|
+
static displayName = "TextInput";
|
|
44
|
+
static componentId = 'TextInput';
|
|
45
|
+
static allowedProps = allowedProps;
|
|
46
|
+
static defaultProps = {
|
|
47
|
+
type: 'text',
|
|
48
|
+
// Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
|
|
49
|
+
interaction: undefined,
|
|
50
|
+
isRequired: false,
|
|
51
|
+
display: 'block',
|
|
52
|
+
shouldNotWrap: false,
|
|
53
|
+
size: 'medium',
|
|
54
|
+
textAlign: 'start',
|
|
55
|
+
messages: []
|
|
56
|
+
};
|
|
45
57
|
constructor(props) {
|
|
46
58
|
super(props);
|
|
47
|
-
this.ref = null;
|
|
48
|
-
this._input = null;
|
|
49
|
-
this._afterElement = null;
|
|
50
|
-
this._defaultId = void 0;
|
|
51
|
-
this._messagesId = void 0;
|
|
52
|
-
this._focusListener = null;
|
|
53
|
-
this.handleRef = el => {
|
|
54
|
-
const elementRef = this.props.elementRef;
|
|
55
|
-
this.ref = el;
|
|
56
|
-
if (typeof elementRef === 'function') {
|
|
57
|
-
elementRef(el);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
this.makeStyleProps = () => {
|
|
61
|
-
const interaction = this.interaction;
|
|
62
|
-
const _this$state = this.state,
|
|
63
|
-
hasFocus = _this$state.hasFocus,
|
|
64
|
-
afterElementHasWidth = _this$state.afterElementHasWidth;
|
|
65
|
-
const beforeElement = this.props.renderBeforeInput ? callRenderProp(this.props.renderBeforeInput) : null;
|
|
66
|
-
return {
|
|
67
|
-
disabled: interaction === 'disabled',
|
|
68
|
-
invalid: this.invalid,
|
|
69
|
-
focused: hasFocus,
|
|
70
|
-
afterElementHasWidth: afterElementHasWidth,
|
|
71
|
-
beforeElementExists: !!beforeElement
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
this.handleInputRef = node => {
|
|
75
|
-
this._input = node;
|
|
76
|
-
if (typeof this.props.inputRef === 'function') {
|
|
77
|
-
this.props.inputRef(node);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
this.handleChange = event => {
|
|
81
|
-
if (typeof this.props.onChange === 'function') {
|
|
82
|
-
this.props.onChange(event, event.target.value);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
this.handleBlur = event => {
|
|
86
|
-
if (typeof this.props.onBlur === 'function') {
|
|
87
|
-
this.props.onBlur(event);
|
|
88
|
-
}
|
|
89
|
-
this.setState({
|
|
90
|
-
hasFocus: false
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
this.handleFocus = event => {
|
|
94
|
-
if (typeof this.props.onFocus === 'function') {
|
|
95
|
-
this.props.onFocus(event);
|
|
96
|
-
}
|
|
97
|
-
this.setState({
|
|
98
|
-
hasFocus: true
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
59
|
this.state = {
|
|
102
60
|
hasFocus: false,
|
|
103
|
-
afterElementHasWidth:
|
|
61
|
+
afterElementHasWidth: undefined
|
|
104
62
|
};
|
|
105
63
|
this._defaultId = props.deterministicId();
|
|
106
64
|
this._messagesId = props.deterministicId('TextInput-messages');
|
|
107
65
|
}
|
|
66
|
+
ref = null;
|
|
67
|
+
_input = null;
|
|
68
|
+
_afterElement = null;
|
|
69
|
+
_defaultId;
|
|
70
|
+
_messagesId;
|
|
71
|
+
_focusListener = null;
|
|
72
|
+
handleRef = el => {
|
|
73
|
+
const {
|
|
74
|
+
elementRef
|
|
75
|
+
} = this.props;
|
|
76
|
+
this.ref = el;
|
|
77
|
+
if (typeof elementRef === 'function') {
|
|
78
|
+
elementRef(el);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
108
81
|
componentDidMount() {
|
|
109
|
-
var _this$props$makeStyle, _this$props;
|
|
110
82
|
if (this._input) {
|
|
111
83
|
this._focusListener = addEventListener(this._input, 'focus', this.handleFocus);
|
|
112
84
|
this.setState({
|
|
@@ -114,7 +86,7 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
114
86
|
});
|
|
115
87
|
}
|
|
116
88
|
this.adjustAfterElementHeight();
|
|
117
|
-
|
|
89
|
+
this.props.makeStyles?.(this.makeStyleProps());
|
|
118
90
|
}
|
|
119
91
|
componentWillUnmount() {
|
|
120
92
|
if (this._focusListener) {
|
|
@@ -122,7 +94,6 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
122
94
|
}
|
|
123
95
|
}
|
|
124
96
|
componentDidUpdate(prevProps) {
|
|
125
|
-
var _this$props$makeStyle2, _this$props2;
|
|
126
97
|
if (prevProps.renderAfterInput !== this.props.renderAfterInput) {
|
|
127
98
|
this.setState({
|
|
128
99
|
afterElementHasWidth: this.getElementHasWidth(this._afterElement)
|
|
@@ -137,19 +108,18 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
137
108
|
hasFocus: false
|
|
138
109
|
});
|
|
139
110
|
}
|
|
140
|
-
|
|
111
|
+
this.props.makeStyles?.(this.makeStyleProps());
|
|
141
112
|
}
|
|
142
113
|
adjustAfterElementHeight() {
|
|
143
|
-
|
|
144
|
-
const afterElementChild = (_this$_afterElement = this._afterElement) === null || _this$_afterElement === void 0 ? void 0 : _this$_afterElement.firstElementChild;
|
|
114
|
+
const afterElementChild = this._afterElement?.firstElementChild;
|
|
145
115
|
|
|
146
116
|
// Check if the child is a button, then get the button's first child (the content span)
|
|
147
|
-
const buttonContentSpan =
|
|
117
|
+
const buttonContentSpan = afterElementChild?.tagName === 'BUTTON' ? afterElementChild.firstElementChild : null;
|
|
148
118
|
|
|
149
119
|
// This is a necessary workaround for DateInput2 because it uses a Popover, which has a nested Button as an afterElement
|
|
150
120
|
// Check if the child is a Popover's inner span containing a button, then get the button's first child (the content span)
|
|
151
|
-
const popoverContentSpan =
|
|
152
|
-
const targetSpan = buttonContentSpan
|
|
121
|
+
const popoverContentSpan = afterElementChild?.tagName === 'SPAN' && afterElementChild.firstElementChild?.tagName === 'BUTTON' ? afterElementChild.firstElementChild.firstElementChild : null;
|
|
122
|
+
const targetSpan = buttonContentSpan ?? popoverContentSpan;
|
|
153
123
|
if (targetSpan) {
|
|
154
124
|
// Set the height to 36px (the height of a medium TextInput) to avoid layout shift when the afterElement content changes
|
|
155
125
|
// this temporary workaround is necessary because otherwise the layout breaks, later on IconButton's default height will be adjusted to the TextInput size
|
|
@@ -157,9 +127,25 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
157
127
|
targetSpan.style.height = '36px';
|
|
158
128
|
}
|
|
159
129
|
}
|
|
130
|
+
makeStyleProps = () => {
|
|
131
|
+
const {
|
|
132
|
+
interaction
|
|
133
|
+
} = this;
|
|
134
|
+
const {
|
|
135
|
+
hasFocus,
|
|
136
|
+
afterElementHasWidth
|
|
137
|
+
} = this.state;
|
|
138
|
+
const beforeElement = this.props.renderBeforeInput ? callRenderProp(this.props.renderBeforeInput) : null;
|
|
139
|
+
return {
|
|
140
|
+
disabled: interaction === 'disabled',
|
|
141
|
+
invalid: this.invalid,
|
|
142
|
+
focused: hasFocus,
|
|
143
|
+
afterElementHasWidth: afterElementHasWidth,
|
|
144
|
+
beforeElementExists: !!beforeElement
|
|
145
|
+
};
|
|
146
|
+
};
|
|
160
147
|
focus() {
|
|
161
|
-
|
|
162
|
-
(_this$_input = this._input) === null || _this$_input === void 0 ? void 0 : _this$_input.focus();
|
|
148
|
+
this._input?.focus();
|
|
163
149
|
}
|
|
164
150
|
get interaction() {
|
|
165
151
|
return getInteraction({
|
|
@@ -178,35 +164,63 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
178
164
|
return isActiveElement(this._input);
|
|
179
165
|
}
|
|
180
166
|
get value() {
|
|
181
|
-
|
|
182
|
-
return (_this$_input2 = this._input) === null || _this$_input2 === void 0 ? void 0 : _this$_input2.value;
|
|
167
|
+
return this._input?.value;
|
|
183
168
|
}
|
|
184
169
|
get id() {
|
|
185
170
|
return this.props.id || this._defaultId;
|
|
186
171
|
}
|
|
172
|
+
handleInputRef = node => {
|
|
173
|
+
this._input = node;
|
|
174
|
+
if (typeof this.props.inputRef === 'function') {
|
|
175
|
+
this.props.inputRef(node);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
handleChange = event => {
|
|
179
|
+
if (typeof this.props.onChange === 'function') {
|
|
180
|
+
this.props.onChange(event, event.target.value);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
handleBlur = event => {
|
|
184
|
+
if (typeof this.props.onBlur === 'function') {
|
|
185
|
+
this.props.onBlur(event);
|
|
186
|
+
}
|
|
187
|
+
this.setState({
|
|
188
|
+
hasFocus: false
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
handleFocus = event => {
|
|
192
|
+
if (typeof this.props.onFocus === 'function') {
|
|
193
|
+
this.props.onFocus(event);
|
|
194
|
+
}
|
|
195
|
+
this.setState({
|
|
196
|
+
hasFocus: true
|
|
197
|
+
});
|
|
198
|
+
};
|
|
187
199
|
renderInput() {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
const {
|
|
201
|
+
type,
|
|
202
|
+
size,
|
|
203
|
+
htmlSize,
|
|
204
|
+
display,
|
|
205
|
+
textAlign,
|
|
206
|
+
placeholder,
|
|
207
|
+
value,
|
|
208
|
+
defaultValue,
|
|
209
|
+
isRequired,
|
|
210
|
+
onFocus,
|
|
211
|
+
...rest
|
|
212
|
+
} = this.props;
|
|
201
213
|
const props = passthroughProps(rest);
|
|
202
|
-
const
|
|
214
|
+
const {
|
|
215
|
+
interaction
|
|
216
|
+
} = this;
|
|
203
217
|
let descriptionIds = '';
|
|
204
218
|
if (props['aria-describedby']) {
|
|
205
219
|
descriptionIds = `${props['aria-describedby']}`;
|
|
206
220
|
}
|
|
207
221
|
return _jsx("input", {
|
|
208
222
|
...props,
|
|
209
|
-
css:
|
|
223
|
+
css: this.props.styles?.textInput,
|
|
210
224
|
defaultValue: defaultValue,
|
|
211
225
|
value: value,
|
|
212
226
|
placeholder: placeholder,
|
|
@@ -214,10 +228,10 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
214
228
|
type: type,
|
|
215
229
|
id: this.id,
|
|
216
230
|
required: isRequired,
|
|
217
|
-
"aria-invalid": this.invalid ? 'true' :
|
|
231
|
+
"aria-invalid": this.invalid ? 'true' : undefined,
|
|
218
232
|
disabled: interaction === 'disabled',
|
|
219
233
|
readOnly: interaction === 'readonly',
|
|
220
|
-
"aria-describedby": descriptionIds !== '' ? descriptionIds :
|
|
234
|
+
"aria-describedby": descriptionIds !== '' ? descriptionIds : undefined,
|
|
221
235
|
size: htmlSize,
|
|
222
236
|
onChange: this.handleChange,
|
|
223
237
|
onBlur: this.handleBlur
|
|
@@ -225,15 +239,17 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
225
239
|
}
|
|
226
240
|
getElementHasWidth(element) {
|
|
227
241
|
if (!element) {
|
|
228
|
-
return
|
|
242
|
+
return undefined;
|
|
229
243
|
}
|
|
230
244
|
const computedStyle = getCSSStyleDeclaration(element);
|
|
231
245
|
if (!computedStyle) {
|
|
232
|
-
return
|
|
246
|
+
return undefined;
|
|
233
247
|
}
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
248
|
+
const {
|
|
249
|
+
width,
|
|
250
|
+
paddingInlineStart,
|
|
251
|
+
paddingInlineEnd
|
|
252
|
+
} = computedStyle;
|
|
237
253
|
if (width === 'auto' || width === '') {
|
|
238
254
|
// This is a workaround for an edge-case, when the TextInput's parent
|
|
239
255
|
// is hidden on load, so the element is not visible either.
|
|
@@ -245,23 +261,24 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
245
261
|
return elementWidth > 0;
|
|
246
262
|
}
|
|
247
263
|
render() {
|
|
248
|
-
const
|
|
249
|
-
width
|
|
250
|
-
display
|
|
251
|
-
renderLabel
|
|
252
|
-
renderBeforeInput
|
|
253
|
-
renderAfterInput
|
|
254
|
-
messages
|
|
255
|
-
inputContainerRef
|
|
256
|
-
isRequired
|
|
257
|
-
styles
|
|
264
|
+
const {
|
|
265
|
+
width,
|
|
266
|
+
display,
|
|
267
|
+
renderLabel,
|
|
268
|
+
renderBeforeInput,
|
|
269
|
+
renderAfterInput,
|
|
270
|
+
messages,
|
|
271
|
+
inputContainerRef,
|
|
272
|
+
isRequired,
|
|
273
|
+
styles
|
|
274
|
+
} = this.props;
|
|
258
275
|
const beforeElement = renderBeforeInput ? callRenderProp(renderBeforeInput) : null;
|
|
259
276
|
const afterElement = renderAfterInput ? callRenderProp(renderAfterInput) : null;
|
|
260
|
-
const renderBeforeOrAfter = !!beforeElement || !!afterElement || renderBeforeInput !==
|
|
277
|
+
const renderBeforeOrAfter = !!beforeElement || !!afterElement || renderBeforeInput !== undefined || renderAfterInput !== undefined;
|
|
261
278
|
const rawLabel = callRenderProp(renderLabel);
|
|
262
279
|
const label = hasVisibleChildren(rawLabel) ? _jsxs(Fragment, {
|
|
263
280
|
children: [rawLabel, isRequired && _jsxs("span", {
|
|
264
|
-
css: this.invalid ? styles
|
|
281
|
+
css: this.invalid ? styles?.requiredInvalid : {},
|
|
265
282
|
"aria-hidden": true,
|
|
266
283
|
children: [' ', "*"]
|
|
267
284
|
})]
|
|
@@ -279,13 +296,13 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
279
296
|
margin: this.props.margin,
|
|
280
297
|
"data-cid": "TextInput",
|
|
281
298
|
children: _jsx("span", {
|
|
282
|
-
css: styles
|
|
299
|
+
css: styles?.facade,
|
|
283
300
|
children: renderBeforeOrAfter ? _jsxs("span", {
|
|
284
|
-
css: styles
|
|
301
|
+
css: styles?.layout,
|
|
285
302
|
children: [beforeElement, _jsxs("span", {
|
|
286
|
-
css: styles
|
|
303
|
+
css: styles?.inputLayout,
|
|
287
304
|
children: [this.renderInput(), afterElement && _jsx("span", {
|
|
288
|
-
css: styles
|
|
305
|
+
css: styles?.afterElement,
|
|
289
306
|
ref: e => {
|
|
290
307
|
this._afterElement = e;
|
|
291
308
|
},
|
|
@@ -297,16 +314,6 @@ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
297
314
|
})
|
|
298
315
|
});
|
|
299
316
|
}
|
|
300
|
-
}
|
|
301
|
-
type: 'text',
|
|
302
|
-
// Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
|
|
303
|
-
interaction: void 0,
|
|
304
|
-
isRequired: false,
|
|
305
|
-
display: 'block',
|
|
306
|
-
shouldNotWrap: false,
|
|
307
|
-
size: 'medium',
|
|
308
|
-
textAlign: 'start',
|
|
309
|
-
messages: []
|
|
310
|
-
}, _TextInput)) || _class) || _class);
|
|
317
|
+
}) || _class) || _class);
|
|
311
318
|
export default TextInput;
|
|
312
319
|
export { TextInput };
|
|
@@ -33,14 +33,18 @@
|
|
|
33
33
|
* @return {Object} The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
35
|
const generateStyle = (componentTheme, props, state) => {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
const {
|
|
37
|
+
size,
|
|
38
|
+
textAlign,
|
|
39
|
+
shouldNotWrap
|
|
40
|
+
} = props;
|
|
41
|
+
const {
|
|
42
|
+
disabled,
|
|
43
|
+
invalid,
|
|
44
|
+
focused,
|
|
45
|
+
afterElementHasWidth,
|
|
46
|
+
beforeElementExists
|
|
47
|
+
} = state;
|
|
44
48
|
const sizeVariants = {
|
|
45
49
|
small: {
|
|
46
50
|
fontSize: componentTheme.smallFontSize,
|
package/es/TextInput/v1/theme.js
CHANGED
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
typography
|
|
34
|
-
borders
|
|
35
|
-
spacing
|
|
36
|
-
forms
|
|
37
|
-
themeName
|
|
31
|
+
const {
|
|
32
|
+
colors,
|
|
33
|
+
typography,
|
|
34
|
+
borders,
|
|
35
|
+
spacing,
|
|
36
|
+
forms,
|
|
37
|
+
key: themeName
|
|
38
|
+
} = theme;
|
|
38
39
|
const themeSpecificStyle = {
|
|
39
40
|
canvas: {
|
|
40
41
|
color: theme['ic-brand-font-color-dark'],
|
|
@@ -42,28 +43,28 @@ const generateComponentTheme = theme => {
|
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
45
|
const componentVariables = {
|
|
45
|
-
fontFamily: typography
|
|
46
|
-
fontWeight: typography
|
|
47
|
-
borderWidth: borders
|
|
48
|
-
borderStyle: borders
|
|
49
|
-
borderColor: colors
|
|
50
|
-
borderRadius: borders
|
|
51
|
-
color: colors
|
|
52
|
-
background: colors
|
|
53
|
-
requiredInvalidColor: colors
|
|
54
|
-
padding: spacing
|
|
55
|
-
focusOutlineWidth: borders
|
|
56
|
-
focusOutlineStyle: borders
|
|
57
|
-
focusOutlineColor: colors
|
|
58
|
-
errorBorderColor: colors
|
|
59
|
-
errorOutlineColor: colors
|
|
60
|
-
placeholderColor: colors
|
|
61
|
-
smallFontSize: typography
|
|
62
|
-
smallHeight: forms
|
|
63
|
-
mediumFontSize: typography
|
|
64
|
-
mediumHeight: forms
|
|
65
|
-
largeFontSize: typography
|
|
66
|
-
largeHeight: forms
|
|
46
|
+
fontFamily: typography?.fontFamily,
|
|
47
|
+
fontWeight: typography?.fontWeightNormal,
|
|
48
|
+
borderWidth: borders?.widthSmall,
|
|
49
|
+
borderStyle: borders?.style,
|
|
50
|
+
borderColor: colors?.contrasts?.grey3045,
|
|
51
|
+
borderRadius: borders?.radiusMedium,
|
|
52
|
+
color: colors?.contrasts?.grey125125,
|
|
53
|
+
background: colors?.contrasts?.white1010,
|
|
54
|
+
requiredInvalidColor: colors?.contrasts?.red5782,
|
|
55
|
+
padding: spacing?.small,
|
|
56
|
+
focusOutlineWidth: borders?.widthMedium,
|
|
57
|
+
focusOutlineStyle: borders?.style,
|
|
58
|
+
focusOutlineColor: colors?.contrasts?.blue4570,
|
|
59
|
+
errorBorderColor: colors?.contrasts?.red4570,
|
|
60
|
+
errorOutlineColor: colors?.contrasts?.red4570,
|
|
61
|
+
placeholderColor: colors?.contrasts?.grey4570,
|
|
62
|
+
smallFontSize: typography?.fontSizeSmall,
|
|
63
|
+
smallHeight: forms?.inputHeightSmall,
|
|
64
|
+
mediumFontSize: typography?.fontSizeMedium,
|
|
65
|
+
mediumHeight: forms?.inputHeightMedium,
|
|
66
|
+
largeFontSize: typography?.fontSizeLarge,
|
|
67
|
+
largeHeight: forms?.inputHeightLarge
|
|
67
68
|
};
|
|
68
69
|
return {
|
|
69
70
|
...componentVariables,
|