@instructure/ui-form-field 8.17.1-snapshot.21 → 8.17.1-snapshot.30
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/es/FormFieldGroup/index.js +7 -11
- package/es/FormFieldGroup/theme.js +5 -5
- package/es/FormFieldLabel/index.js +6 -10
- package/es/FormFieldLabel/theme.js +5 -5
- package/es/FormFieldLayout/index.js +7 -11
- package/es/FormFieldMessage/index.js +6 -10
- package/es/FormFieldMessage/theme.js +7 -7
- package/es/FormFieldMessages/index.js +7 -11
- package/es/FormFieldMessages/theme.js +1 -1
- package/lib/FormFieldGroup/index.js +7 -11
- package/lib/FormFieldGroup/theme.js +5 -5
- package/lib/FormFieldLabel/index.js +6 -10
- package/lib/FormFieldLabel/theme.js +5 -5
- package/lib/FormFieldLayout/index.js +7 -11
- package/lib/FormFieldMessage/index.js +6 -10
- package/lib/FormFieldMessage/theme.js +7 -7
- package/lib/FormFieldMessages/index.js +7 -11
- package/lib/FormFieldMessages/theme.js +1 -1
- package/package.json +15 -15
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -59,15 +59,11 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
componentDidMount() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, this.makeStylesVariables);
|
|
62
|
+
this.props.makeStyles?.(this.makeStylesVariables);
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
componentDidUpdate() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, this.makeStylesVariables);
|
|
66
|
+
this.props.makeStyles?.(this.makeStylesVariables);
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
get makeStylesVariables() {
|
|
@@ -104,15 +100,15 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
104
100
|
const styles = this.props.styles;
|
|
105
101
|
return jsx("span", {
|
|
106
102
|
key: "fields",
|
|
107
|
-
css: styles
|
|
103
|
+
css: styles?.formFieldGroup
|
|
108
104
|
}, this.renderChildren());
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
render() {
|
|
112
|
-
const _this$
|
|
113
|
-
styles = _this$
|
|
114
|
-
makeStyles = _this$
|
|
115
|
-
props = _objectWithoutProperties(_this$
|
|
108
|
+
const _this$props = this.props,
|
|
109
|
+
styles = _this$props.styles,
|
|
110
|
+
makeStyles = _this$props.makeStyles,
|
|
111
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
116
112
|
|
|
117
113
|
return jsx(FormFieldLayout, Object.assign({}, omitProps(props, FormFieldGroup.allowedProps), pickProps(props, FormFieldLayout.allowedProps), {
|
|
118
114
|
vAlign: props.vAlign,
|
|
@@ -32,12 +32,12 @@ const generateComponentTheme = theme => {
|
|
|
32
32
|
colors = theme.colors,
|
|
33
33
|
spacing = theme.spacing;
|
|
34
34
|
const componentVariables = {
|
|
35
|
-
borderWidth: borders
|
|
36
|
-
borderStyle: borders
|
|
35
|
+
borderWidth: borders?.widthSmall,
|
|
36
|
+
borderStyle: borders?.style,
|
|
37
37
|
borderColor: 'transparent',
|
|
38
|
-
borderRadius: borders
|
|
39
|
-
errorBorderColor: colors
|
|
40
|
-
errorFieldsPadding: spacing
|
|
38
|
+
borderRadius: borders?.radiusMedium,
|
|
39
|
+
errorBorderColor: colors?.borderDanger,
|
|
40
|
+
errorFieldsPadding: spacing?.xSmall
|
|
41
41
|
};
|
|
42
42
|
return { ...componentVariables
|
|
43
43
|
};
|
|
@@ -60,25 +60,21 @@ let FormFieldLabel = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
componentDidMount() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
63
|
+
this.props.makeStyles?.();
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
componentDidUpdate() {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
67
|
+
this.props.makeStyles?.();
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
render() {
|
|
75
71
|
const ElementType = getElementType(FormFieldLabel, this.props);
|
|
76
|
-
const _this$
|
|
77
|
-
styles = _this$
|
|
78
|
-
children = _this$
|
|
72
|
+
const _this$props = this.props,
|
|
73
|
+
styles = _this$props.styles,
|
|
74
|
+
children = _this$props.children;
|
|
79
75
|
return jsx(ElementType //@ts-expect-error too complex union type
|
|
80
76
|
, Object.assign({}, omitProps(this.props, FormFieldLabel.allowedProps), {
|
|
81
|
-
css: styles
|
|
77
|
+
css: styles?.formFieldLabel,
|
|
82
78
|
ref: this.handleRef
|
|
83
79
|
}), children);
|
|
84
80
|
}
|
|
@@ -37,11 +37,11 @@ const generateComponentTheme = theme => {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const componentVariables = {
|
|
40
|
-
color: colors
|
|
41
|
-
fontFamily: typography
|
|
42
|
-
fontWeight: typography
|
|
43
|
-
fontSize: typography
|
|
44
|
-
lineHeight: typography
|
|
40
|
+
color: colors?.textDarkest,
|
|
41
|
+
fontFamily: typography?.fontFamily,
|
|
42
|
+
fontWeight: typography?.fontWeightBold,
|
|
43
|
+
fontSize: typography?.fontSizeMedium,
|
|
44
|
+
lineHeight: typography?.lineHeightFit
|
|
45
45
|
};
|
|
46
46
|
return { ...componentVariables,
|
|
47
47
|
...themeSpecificStyle[themeName]
|
|
@@ -73,15 +73,11 @@ let FormFieldLayout = (_dec = withDeterministicId(), _dec2 = withStyle(generateS
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
componentDidMount() {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
76
|
+
this.props.makeStyles?.();
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
componentDidUpdate() {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
80
|
+
this.props.makeStyles?.();
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
get hasVisibleLabel() {
|
|
@@ -141,16 +137,16 @@ let FormFieldLayout = (_dec = withDeterministicId(), _dec2 = withStyle(generateS
|
|
|
141
137
|
// any cast is needed to prevent Expression produces a union type that is too complex to represent errors
|
|
142
138
|
const ElementType = this.elementType;
|
|
143
139
|
|
|
144
|
-
const _this$
|
|
145
|
-
makeStyles = _this$
|
|
146
|
-
styles = _this$
|
|
147
|
-
props = _objectWithoutProperties(_this$
|
|
140
|
+
const _this$props = this.props,
|
|
141
|
+
makeStyles = _this$props.makeStyles,
|
|
142
|
+
styles = _this$props.styles,
|
|
143
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
|
148
144
|
|
|
149
145
|
const width = props.width,
|
|
150
146
|
layout = props.layout,
|
|
151
147
|
children = props.children;
|
|
152
148
|
return jsx(ElementType, Object.assign({}, omitProps(props, [...FormFieldLayout.allowedProps, ...Grid.allowedProps]), {
|
|
153
|
-
css: styles
|
|
149
|
+
css: styles?.formFieldLayout,
|
|
154
150
|
style: {
|
|
155
151
|
width
|
|
156
152
|
},
|
|
@@ -59,23 +59,19 @@ let FormFieldMessage = (_dec = withStyle(generateStyle, generateComponentTheme),
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
componentDidMount() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
62
|
+
this.props.makeStyles?.();
|
|
65
63
|
}
|
|
66
64
|
|
|
67
65
|
componentDidUpdate() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
66
|
+
this.props.makeStyles?.();
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
render() {
|
|
74
|
-
const _this$
|
|
75
|
-
children = _this$
|
|
76
|
-
styles = _this$
|
|
70
|
+
const _this$props = this.props,
|
|
71
|
+
children = _this$props.children,
|
|
72
|
+
styles = _this$props.styles;
|
|
77
73
|
return this.props.variant !== 'screenreader-only' ? jsx("span", {
|
|
78
|
-
css: styles
|
|
74
|
+
css: styles?.formFieldMessage,
|
|
79
75
|
ref: this.handleRef
|
|
80
76
|
}, children) : jsx(ScreenReaderContent, {
|
|
81
77
|
elementRef: this.handleRef
|
|
@@ -37,13 +37,13 @@ const generateComponentTheme = theme => {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const componentVariables = {
|
|
40
|
-
colorHint: colors
|
|
41
|
-
colorError: colors
|
|
42
|
-
colorSuccess: colors
|
|
43
|
-
fontFamily: typography
|
|
44
|
-
fontWeight: typography
|
|
45
|
-
fontSize: typography
|
|
46
|
-
lineHeight: typography
|
|
40
|
+
colorHint: colors?.textDarkest,
|
|
41
|
+
colorError: colors?.textDanger,
|
|
42
|
+
colorSuccess: colors?.textSuccess,
|
|
43
|
+
fontFamily: typography?.fontFamily,
|
|
44
|
+
fontWeight: typography?.fontWeightNormal,
|
|
45
|
+
fontSize: typography?.fontSizeSmall,
|
|
46
|
+
lineHeight: typography?.lineHeight
|
|
47
47
|
};
|
|
48
48
|
return { ...componentVariables,
|
|
49
49
|
...themeSpecificStyle[themeName]
|
|
@@ -63,29 +63,25 @@ let FormFieldMessages = (_dec = withStyle(generateStyle, generateComponentTheme)
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
componentDidMount() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
66
|
+
this.props.makeStyles?.();
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
componentDidUpdate() {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
70
|
+
this.props.makeStyles?.();
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
render() {
|
|
78
|
-
const _this$
|
|
79
|
-
messages = _this$
|
|
80
|
-
styles = _this$
|
|
74
|
+
const _this$props = this.props,
|
|
75
|
+
messages = _this$props.messages,
|
|
76
|
+
styles = _this$props.styles;
|
|
81
77
|
return messages && messages.length > 0 ? jsx("span", Object.assign({
|
|
82
|
-
css: styles
|
|
78
|
+
css: styles?.formFieldMessages
|
|
83
79
|
}, omitProps(this.props, FormFieldMessages.allowedProps), {
|
|
84
80
|
ref: this.handleRef
|
|
85
81
|
}), messages.map((msg, i) => {
|
|
86
82
|
return jsx("span", {
|
|
87
83
|
key: `error${i}`,
|
|
88
|
-
css: styles
|
|
84
|
+
css: styles?.message
|
|
89
85
|
}, jsx(FormFieldMessage, {
|
|
90
86
|
variant: msg.type
|
|
91
87
|
}, msg.text));
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
31
|
const spacing = theme.spacing;
|
|
32
32
|
const componentVariables = {
|
|
33
|
-
topMargin: spacing
|
|
33
|
+
topMargin: spacing?.xxSmall
|
|
34
34
|
};
|
|
35
35
|
return { ...componentVariables
|
|
36
36
|
};
|
|
@@ -53,15 +53,11 @@ let FormFieldGroup = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
componentDidMount() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, this.makeStylesVariables);
|
|
56
|
+
this.props.makeStyles?.(this.makeStylesVariables);
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
componentDidUpdate() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, this.makeStylesVariables);
|
|
60
|
+
this.props.makeStyles?.(this.makeStylesVariables);
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
get makeStylesVariables() {
|
|
@@ -98,15 +94,15 @@ let FormFieldGroup = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
98
94
|
const styles = this.props.styles;
|
|
99
95
|
return (0, _emotion.jsx)("span", {
|
|
100
96
|
key: "fields",
|
|
101
|
-
css: styles
|
|
97
|
+
css: styles?.formFieldGroup
|
|
102
98
|
}, this.renderChildren());
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
render() {
|
|
106
|
-
const _this$
|
|
107
|
-
styles = _this$
|
|
108
|
-
makeStyles = _this$
|
|
109
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
102
|
+
const _this$props = this.props,
|
|
103
|
+
styles = _this$props.styles,
|
|
104
|
+
makeStyles = _this$props.makeStyles,
|
|
105
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
110
106
|
return (0, _emotion.jsx)(_FormFieldLayout.FormFieldLayout, Object.assign({}, (0, _omitProps.omitProps)(props, FormFieldGroup.allowedProps), (0, _pickProps.pickProps)(props, _FormFieldLayout.FormFieldLayout.allowedProps), {
|
|
111
107
|
vAlign: props.vAlign,
|
|
112
108
|
layout: props.layout === 'inline' ? 'inline' : 'stacked',
|
|
@@ -39,12 +39,12 @@ const generateComponentTheme = theme => {
|
|
|
39
39
|
colors = theme.colors,
|
|
40
40
|
spacing = theme.spacing;
|
|
41
41
|
const componentVariables = {
|
|
42
|
-
borderWidth: borders
|
|
43
|
-
borderStyle: borders
|
|
42
|
+
borderWidth: borders?.widthSmall,
|
|
43
|
+
borderStyle: borders?.style,
|
|
44
44
|
borderColor: 'transparent',
|
|
45
|
-
borderRadius: borders
|
|
46
|
-
errorBorderColor: colors
|
|
47
|
-
errorFieldsPadding: spacing
|
|
45
|
+
borderRadius: borders?.radiusMedium,
|
|
46
|
+
errorBorderColor: colors?.borderDanger,
|
|
47
|
+
errorFieldsPadding: spacing?.xSmall
|
|
48
48
|
};
|
|
49
49
|
return { ...componentVariables
|
|
50
50
|
};
|
|
@@ -51,25 +51,21 @@ let FormFieldLabel = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
componentDidMount() {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
54
|
+
this.props.makeStyles?.();
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
componentDidUpdate() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
58
|
+
this.props.makeStyles?.();
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
render() {
|
|
66
62
|
const ElementType = (0, _getElementType.getElementType)(FormFieldLabel, this.props);
|
|
67
|
-
const _this$
|
|
68
|
-
styles = _this$
|
|
69
|
-
children = _this$
|
|
63
|
+
const _this$props = this.props,
|
|
64
|
+
styles = _this$props.styles,
|
|
65
|
+
children = _this$props.children;
|
|
70
66
|
return (0, _emotion.jsx)(ElementType //@ts-expect-error too complex union type
|
|
71
67
|
, Object.assign({}, (0, _omitProps.omitProps)(this.props, FormFieldLabel.allowedProps), {
|
|
72
|
-
css: styles
|
|
68
|
+
css: styles?.formFieldLabel,
|
|
73
69
|
ref: this.handleRef
|
|
74
70
|
}), children);
|
|
75
71
|
}
|
|
@@ -44,11 +44,11 @@ const generateComponentTheme = theme => {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
const componentVariables = {
|
|
47
|
-
color: colors
|
|
48
|
-
fontFamily: typography
|
|
49
|
-
fontWeight: typography
|
|
50
|
-
fontSize: typography
|
|
51
|
-
lineHeight: typography
|
|
47
|
+
color: colors?.textDarkest,
|
|
48
|
+
fontFamily: typography?.fontFamily,
|
|
49
|
+
fontWeight: typography?.fontWeightBold,
|
|
50
|
+
fontSize: typography?.fontSizeMedium,
|
|
51
|
+
lineHeight: typography?.lineHeightFit
|
|
52
52
|
};
|
|
53
53
|
return { ...componentVariables,
|
|
54
54
|
...themeSpecificStyle[themeName]
|
|
@@ -74,15 +74,11 @@ let FormFieldLayout = (_dec = (0, _withDeterministicId.withDeterministicId)(), _
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
componentDidMount() {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
77
|
+
this.props.makeStyles?.();
|
|
80
78
|
}
|
|
81
79
|
|
|
82
80
|
componentDidUpdate() {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
81
|
+
this.props.makeStyles?.();
|
|
86
82
|
}
|
|
87
83
|
|
|
88
84
|
get hasVisibleLabel() {
|
|
@@ -141,15 +137,15 @@ let FormFieldLayout = (_dec = (0, _withDeterministicId.withDeterministicId)(), _
|
|
|
141
137
|
render() {
|
|
142
138
|
// any cast is needed to prevent Expression produces a union type that is too complex to represent errors
|
|
143
139
|
const ElementType = this.elementType;
|
|
144
|
-
const _this$
|
|
145
|
-
makeStyles = _this$
|
|
146
|
-
styles = _this$
|
|
147
|
-
props = (0, _objectWithoutProperties2.default)(_this$
|
|
140
|
+
const _this$props = this.props,
|
|
141
|
+
makeStyles = _this$props.makeStyles,
|
|
142
|
+
styles = _this$props.styles,
|
|
143
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
148
144
|
const width = props.width,
|
|
149
145
|
layout = props.layout,
|
|
150
146
|
children = props.children;
|
|
151
147
|
return (0, _emotion.jsx)(ElementType, Object.assign({}, (0, _omitProps.omitProps)(props, [...FormFieldLayout.allowedProps, ..._Grid.Grid.allowedProps]), {
|
|
152
|
-
css: styles
|
|
148
|
+
css: styles?.formFieldLayout,
|
|
153
149
|
style: {
|
|
154
150
|
width
|
|
155
151
|
},
|
|
@@ -48,23 +48,19 @@ let FormFieldMessage = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.d
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
componentDidMount() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
51
|
+
this.props.makeStyles?.();
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
componentDidUpdate() {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
55
|
+
this.props.makeStyles?.();
|
|
60
56
|
}
|
|
61
57
|
|
|
62
58
|
render() {
|
|
63
|
-
const _this$
|
|
64
|
-
children = _this$
|
|
65
|
-
styles = _this$
|
|
59
|
+
const _this$props = this.props,
|
|
60
|
+
children = _this$props.children,
|
|
61
|
+
styles = _this$props.styles;
|
|
66
62
|
return this.props.variant !== 'screenreader-only' ? (0, _emotion.jsx)("span", {
|
|
67
|
-
css: styles
|
|
63
|
+
css: styles?.formFieldMessage,
|
|
68
64
|
ref: this.handleRef
|
|
69
65
|
}, children) : (0, _emotion.jsx)(_ScreenReaderContent.ScreenReaderContent, {
|
|
70
66
|
elementRef: this.handleRef
|
|
@@ -44,13 +44,13 @@ const generateComponentTheme = theme => {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
const componentVariables = {
|
|
47
|
-
colorHint: colors
|
|
48
|
-
colorError: colors
|
|
49
|
-
colorSuccess: colors
|
|
50
|
-
fontFamily: typography
|
|
51
|
-
fontWeight: typography
|
|
52
|
-
fontSize: typography
|
|
53
|
-
lineHeight: typography
|
|
47
|
+
colorHint: colors?.textDarkest,
|
|
48
|
+
colorError: colors?.textDanger,
|
|
49
|
+
colorSuccess: colors?.textSuccess,
|
|
50
|
+
fontFamily: typography?.fontFamily,
|
|
51
|
+
fontWeight: typography?.fontWeightNormal,
|
|
52
|
+
fontSize: typography?.fontSizeSmall,
|
|
53
|
+
lineHeight: typography?.lineHeight
|
|
54
54
|
};
|
|
55
55
|
return { ...componentVariables,
|
|
56
56
|
...themeSpecificStyle[themeName]
|
|
@@ -53,29 +53,25 @@ let FormFieldMessages = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
componentDidMount() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
56
|
+
this.props.makeStyles?.();
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
componentDidUpdate() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
60
|
+
this.props.makeStyles?.();
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
render() {
|
|
68
|
-
const _this$
|
|
69
|
-
messages = _this$
|
|
70
|
-
styles = _this$
|
|
64
|
+
const _this$props = this.props,
|
|
65
|
+
messages = _this$props.messages,
|
|
66
|
+
styles = _this$props.styles;
|
|
71
67
|
return messages && messages.length > 0 ? (0, _emotion.jsx)("span", Object.assign({
|
|
72
|
-
css: styles
|
|
68
|
+
css: styles?.formFieldMessages
|
|
73
69
|
}, (0, _omitProps.omitProps)(this.props, FormFieldMessages.allowedProps), {
|
|
74
70
|
ref: this.handleRef
|
|
75
71
|
}), messages.map((msg, i) => {
|
|
76
72
|
return (0, _emotion.jsx)("span", {
|
|
77
73
|
key: `error${i}`,
|
|
78
|
-
css: styles
|
|
74
|
+
css: styles?.message
|
|
79
75
|
}, (0, _emotion.jsx)(_FormFieldMessage.FormFieldMessage, {
|
|
80
76
|
variant: msg.type
|
|
81
77
|
}, msg.text));
|
|
@@ -37,7 +37,7 @@ exports.default = void 0;
|
|
|
37
37
|
const generateComponentTheme = theme => {
|
|
38
38
|
const spacing = theme.spacing;
|
|
39
39
|
const componentVariables = {
|
|
40
|
-
topMargin: spacing
|
|
40
|
+
topMargin: spacing?.xxSmall
|
|
41
41
|
};
|
|
42
42
|
return { ...componentVariables
|
|
43
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-form-field",
|
|
3
|
-
"version": "8.17.1-snapshot.
|
|
3
|
+
"version": "8.17.1-snapshot.30+cb1322c25",
|
|
4
4
|
"description": "Form layout components.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,22 +23,22 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.17.1-snapshot.
|
|
27
|
-
"@instructure/ui-test-utils": "8.17.1-snapshot.
|
|
28
|
-
"@instructure/ui-themes": "8.17.1-snapshot.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.30+cb1322c25",
|
|
27
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.30+cb1322c25",
|
|
28
|
+
"@instructure/ui-themes": "8.17.1-snapshot.30+cb1322c25"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.13.10",
|
|
32
|
-
"@instructure/console": "8.17.1-snapshot.
|
|
33
|
-
"@instructure/emotion": "8.17.1-snapshot.
|
|
34
|
-
"@instructure/shared-types": "8.17.1-snapshot.
|
|
35
|
-
"@instructure/ui-a11y-content": "8.17.1-snapshot.
|
|
36
|
-
"@instructure/ui-a11y-utils": "8.17.1-snapshot.
|
|
37
|
-
"@instructure/ui-grid": "8.17.1-snapshot.
|
|
38
|
-
"@instructure/ui-icons": "8.17.1-snapshot.
|
|
39
|
-
"@instructure/ui-react-utils": "8.17.1-snapshot.
|
|
40
|
-
"@instructure/ui-utils": "8.17.1-snapshot.
|
|
41
|
-
"@instructure/uid": "8.17.1-snapshot.
|
|
32
|
+
"@instructure/console": "8.17.1-snapshot.30+cb1322c25",
|
|
33
|
+
"@instructure/emotion": "8.17.1-snapshot.30+cb1322c25",
|
|
34
|
+
"@instructure/shared-types": "8.17.1-snapshot.30+cb1322c25",
|
|
35
|
+
"@instructure/ui-a11y-content": "8.17.1-snapshot.30+cb1322c25",
|
|
36
|
+
"@instructure/ui-a11y-utils": "8.17.1-snapshot.30+cb1322c25",
|
|
37
|
+
"@instructure/ui-grid": "8.17.1-snapshot.30+cb1322c25",
|
|
38
|
+
"@instructure/ui-icons": "8.17.1-snapshot.30+cb1322c25",
|
|
39
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.30+cb1322c25",
|
|
40
|
+
"@instructure/ui-utils": "8.17.1-snapshot.30+cb1322c25",
|
|
41
|
+
"@instructure/uid": "8.17.1-snapshot.30+cb1322c25",
|
|
42
42
|
"prop-types": "^15"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "cb1322c25257139750149d7a817f1fb32571c1ed"
|
|
51
51
|
}
|