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