@instructure/ui-form-field 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.
Files changed (55) hide show
  1. package/CHANGELOG.md +5 -2
  2. package/es/FormField/v1/index.js +19 -20
  3. package/es/FormField/v2/index.js +19 -20
  4. package/es/FormFieldGroup/v1/index.js +40 -37
  5. package/es/FormFieldGroup/v1/styles.js +6 -2
  6. package/es/FormFieldGroup/v1/theme.js +10 -9
  7. package/es/FormFieldGroup/v2/index.js +40 -37
  8. package/es/FormFieldGroup/v2/styles.js +3 -1
  9. package/es/FormFieldLabel/v1/index.js +20 -20
  10. package/es/FormFieldLabel/v1/styles.js +3 -1
  11. package/es/FormFieldLabel/v1/theme.js +10 -9
  12. package/es/FormFieldLabel/v2/index.js +20 -20
  13. package/es/FormFieldLabel/v2/styles.js +3 -1
  14. package/es/FormFieldLabel/v2/theme.js +10 -9
  15. package/es/FormFieldLayout/v1/index.js +58 -56
  16. package/es/FormFieldLayout/v1/styles.js +14 -10
  17. package/es/FormFieldLayout/v1/theme.js +14 -13
  18. package/es/FormFieldLayout/v2/index.js +35 -47
  19. package/es/FormFieldLayout/v2/styles.js +14 -10
  20. package/es/FormFieldMessage/v1/index.js +23 -23
  21. package/es/FormFieldMessage/v1/styles.js +3 -1
  22. package/es/FormFieldMessage/v1/theme.js +13 -12
  23. package/es/FormFieldMessage/v2/index.js +5 -6
  24. package/es/FormFieldMessage/v2/styles.js +3 -1
  25. package/es/FormFieldMessages/v1/index.js +19 -19
  26. package/es/FormFieldMessages/v1/theme.js +4 -2
  27. package/es/FormFieldMessages/v2/index.js +19 -19
  28. package/lib/FormField/v1/index.js +19 -20
  29. package/lib/FormField/v2/index.js +19 -20
  30. package/lib/FormFieldGroup/v1/index.js +40 -37
  31. package/lib/FormFieldGroup/v1/styles.js +6 -2
  32. package/lib/FormFieldGroup/v1/theme.js +10 -9
  33. package/lib/FormFieldGroup/v2/index.js +40 -37
  34. package/lib/FormFieldGroup/v2/styles.js +3 -1
  35. package/lib/FormFieldLabel/v1/index.js +20 -20
  36. package/lib/FormFieldLabel/v1/styles.js +3 -1
  37. package/lib/FormFieldLabel/v1/theme.js +10 -9
  38. package/lib/FormFieldLabel/v2/index.js +20 -20
  39. package/lib/FormFieldLabel/v2/styles.js +3 -1
  40. package/lib/FormFieldLabel/v2/theme.js +10 -9
  41. package/lib/FormFieldLayout/v1/index.js +58 -56
  42. package/lib/FormFieldLayout/v1/styles.js +14 -10
  43. package/lib/FormFieldLayout/v1/theme.js +14 -13
  44. package/lib/FormFieldLayout/v2/index.js +36 -47
  45. package/lib/FormFieldLayout/v2/styles.js +14 -10
  46. package/lib/FormFieldMessage/v1/index.js +24 -24
  47. package/lib/FormFieldMessage/v1/styles.js +3 -1
  48. package/lib/FormFieldMessage/v1/theme.js +13 -12
  49. package/lib/FormFieldMessage/v2/index.js +6 -6
  50. package/lib/FormFieldMessage/v2/styles.js +3 -1
  51. package/lib/FormFieldMessages/v1/index.js +19 -19
  52. package/lib/FormFieldMessages/v1/theme.js +4 -2
  53. package/lib/FormFieldMessages/v2/index.js +19 -19
  54. package/package.json +15 -15
  55. 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-7](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-7) (2026-04-29)
6
+ ## [11.7.3-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-26) (2026-05-05)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-form-field
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
 
@@ -33,17 +33,25 @@ category: components
33
33
  ---
34
34
  **/
35
35
  class FormField extends Component {
36
- constructor(...args) {
37
- super(...args);
38
- this.ref = null;
39
- this.handleRef = el => {
40
- const elementRef = this.props.elementRef;
41
- this.ref = el;
42
- if (typeof elementRef === 'function') {
43
- elementRef(el);
44
- }
45
- };
46
- }
36
+ static displayName = "FormField";
37
+ static componentId = 'FormField';
38
+ static allowedProps = allowedProps;
39
+ static defaultProps = {
40
+ inline: false,
41
+ layout: 'stacked',
42
+ labelAlign: 'end',
43
+ vAlign: 'middle'
44
+ };
45
+ ref = null;
46
+ handleRef = el => {
47
+ const {
48
+ elementRef
49
+ } = this.props;
50
+ this.ref = el;
51
+ if (typeof elementRef === 'function') {
52
+ elementRef(el);
53
+ }
54
+ };
47
55
  render() {
48
56
  return _jsx(FormFieldLayout, {
49
57
  ...omitProps(this.props, FormField.allowedProps),
@@ -61,14 +69,5 @@ class FormField extends Component {
61
69
  });
62
70
  }
63
71
  }
64
- FormField.displayName = "FormField";
65
- FormField.componentId = 'FormField';
66
- FormField.allowedProps = allowedProps;
67
- FormField.defaultProps = {
68
- inline: false,
69
- layout: 'stacked',
70
- labelAlign: 'end',
71
- vAlign: 'middle'
72
- };
73
72
  export default FormField;
74
73
  export { FormField };
@@ -34,17 +34,25 @@ category: components
34
34
  ---
35
35
  **/
36
36
  class FormField extends Component {
37
- constructor(...args) {
38
- super(...args);
39
- this.ref = null;
40
- this.handleRef = el => {
41
- const elementRef = this.props.elementRef;
42
- this.ref = el;
43
- if (typeof elementRef === 'function') {
44
- elementRef(el);
45
- }
46
- };
47
- }
37
+ static displayName = "FormField";
38
+ static componentId = 'FormField';
39
+ static allowedProps = allowedProps;
40
+ static defaultProps = {
41
+ inline: false,
42
+ layout: 'stacked',
43
+ labelAlign: 'end',
44
+ vAlign: 'middle'
45
+ };
46
+ ref = null;
47
+ handleRef = el => {
48
+ const {
49
+ elementRef
50
+ } = this.props;
51
+ this.ref = el;
52
+ if (typeof elementRef === 'function') {
53
+ elementRef(el);
54
+ }
55
+ };
48
56
  render() {
49
57
  return _jsx(FormFieldLayout, {
50
58
  ...omitProps(this.props, FormField.allowedProps),
@@ -65,14 +73,5 @@ class FormField extends Component {
65
73
  });
66
74
  }
67
75
  }
68
- FormField.displayName = "FormField";
69
- FormField.componentId = 'FormField';
70
- FormField.allowedProps = allowedProps;
71
- FormField.defaultProps = {
72
- inline: false,
73
- layout: 'stacked',
74
- labelAlign: 'end',
75
- vAlign: 'middle'
76
- };
77
76
  export default FormField;
78
77
  export { FormField };
@@ -1,6 +1,5 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["styles", "makeStyles", "isGroup"];
3
- var _dec, _class, _FormFieldGroup;
1
+ var _dec, _class;
2
+ import "core-js/modules/es.array.includes.js";
4
3
  /*
5
4
  * The MIT License (MIT)
6
5
  *
@@ -40,25 +39,33 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
40
39
  category: components
41
40
  ---
42
41
  **/
43
- let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_FormFieldGroup = class FormFieldGroup extends Component {
44
- constructor(...args) {
45
- super(...args);
46
- this.ref = null;
47
- this.handleRef = el => {
48
- const elementRef = this.props.elementRef;
49
- this.ref = el;
50
- if (typeof elementRef === 'function') {
51
- elementRef(el);
52
- }
53
- };
54
- }
42
+ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class FormFieldGroup extends Component {
43
+ static displayName = "FormFieldGroup";
44
+ static componentId = 'FormFieldGroup';
45
+ static allowedProps = allowedProps;
46
+ static defaultProps = {
47
+ as: 'fieldset',
48
+ disabled: false,
49
+ rowSpacing: 'medium',
50
+ colSpacing: 'small',
51
+ vAlign: 'middle',
52
+ isGroup: true
53
+ };
54
+ ref = null;
55
+ handleRef = el => {
56
+ const {
57
+ elementRef
58
+ } = this.props;
59
+ this.ref = el;
60
+ if (typeof elementRef === 'function') {
61
+ elementRef(el);
62
+ }
63
+ };
55
64
  componentDidMount() {
56
- var _this$props$makeStyle, _this$props;
57
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props, this.makeStylesVariables);
65
+ this.props.makeStyles?.(this.makeStylesVariables);
58
66
  }
59
67
  componentDidUpdate() {
60
- var _this$props$makeStyle2, _this$props2;
61
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2, this.makeStylesVariables);
68
+ this.props.makeStyles?.(this.makeStylesVariables);
62
69
  }
63
70
  get makeStylesVariables() {
64
71
  // new form errors dont need borders
@@ -77,7 +84,7 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
77
84
  renderColumns() {
78
85
  return Children.map(this.props.children, (child, index) => {
79
86
  return child ? _jsx(Grid.Col, {
80
- width: child.props && child.props.width ? 'auto' : void 0,
87
+ width: child.props && child.props.width ? 'auto' : undefined,
81
88
  children: child
82
89
  }, index) : null;
83
90
  });
@@ -94,24 +101,27 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
94
101
  });
95
102
  }
96
103
  renderFields() {
97
- const styles = this.props.styles;
104
+ const {
105
+ styles
106
+ } = this.props;
98
107
  return _jsx("span", {
99
- css: styles === null || styles === void 0 ? void 0 : styles.formFieldGroup,
108
+ css: styles?.formFieldGroup,
100
109
  children: this.renderChildren()
101
110
  }, "fields");
102
111
  }
103
112
  render() {
104
- const _this$props3 = this.props,
105
- styles = _this$props3.styles,
106
- makeStyles = _this$props3.makeStyles,
107
- isGroup = _this$props3.isGroup,
108
- props = _objectWithoutProperties(_this$props3, _excluded);
113
+ const {
114
+ styles,
115
+ makeStyles,
116
+ isGroup,
117
+ ...props
118
+ } = this.props;
109
119
  // This is quite ugly, but according to ARIA spec the `aria-invalid` prop
110
120
  // can only be used with certain roles see
111
121
  // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid#associated_roles
112
122
  // `aria-invalid` is put on in FormFieldLayout because the error message
113
123
  // DOM part gets there its ID.
114
- let ariaInvalid = void 0;
124
+ let ariaInvalid = undefined;
115
125
  if (this.props.role && this.invalid && ['application', 'checkbox', 'combobox', 'gridcell', 'listbox', 'radiogroup', 'slider', 'spinbutton', 'textbox', 'tree', 'columnheader', 'rowheader', 'searchbox', 'switch', 'treegrid'].includes(this.props.role)) {
116
126
  ariaInvalid = 'true';
117
127
  }
@@ -121,20 +131,13 @@ let FormFieldGroup = (_dec = withStyle(generateStyle, generateComponentTheme), _
121
131
  vAlign: props.vAlign,
122
132
  layout: props.layout === 'inline' ? 'inline' : 'stacked',
123
133
  label: props.description,
124
- "aria-disabled": props.disabled ? 'true' : void 0,
134
+ "aria-disabled": props.disabled ? 'true' : undefined,
125
135
  "aria-invalid": ariaInvalid,
126
136
  elementRef: this.handleRef,
127
137
  isGroup: isGroup,
128
138
  children: this.renderFields()
129
139
  });
130
140
  }
131
- }, _FormFieldGroup.displayName = "FormFieldGroup", _FormFieldGroup.componentId = 'FormFieldGroup', _FormFieldGroup.allowedProps = allowedProps, _FormFieldGroup.defaultProps = {
132
- as: 'fieldset',
133
- disabled: false,
134
- rowSpacing: 'medium',
135
- colSpacing: 'small',
136
- vAlign: 'middle',
137
- isGroup: true
138
- }, _FormFieldGroup)) || _class);
141
+ }) || _class);
139
142
  export default FormFieldGroup;
140
143
  export { FormFieldGroup };
@@ -33,8 +33,12 @@
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 disabled = props.disabled;
37
- const invalid = state.invalid;
36
+ const {
37
+ disabled
38
+ } = props;
39
+ const {
40
+ invalid
41
+ } = state;
38
42
  return {
39
43
  formFieldGroup: {
40
44
  label: 'formFieldGroup',
@@ -28,17 +28,18 @@
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;
32
- const borders = theme.borders,
33
- colors = theme.colors,
34
- spacing = theme.spacing;
31
+ const {
32
+ borders,
33
+ colors,
34
+ spacing
35
+ } = theme;
35
36
  const componentVariables = {
36
- borderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
37
- borderStyle: borders === null || borders === void 0 ? void 0 : borders.style,
37
+ borderWidth: borders?.widthSmall,
38
+ borderStyle: borders?.style,
38
39
  borderColor: 'transparent',
39
- borderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
40
- errorBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.red4570,
41
- errorFieldsPadding: spacing === null || spacing === void 0 ? void 0 : spacing.xSmall
40
+ borderRadius: borders?.radiusMedium,
41
+ errorBorderColor: colors?.contrasts?.red4570,
42
+ errorFieldsPadding: spacing?.xSmall
42
43
  };
43
44
  return {
44
45
  ...componentVariables
@@ -1,6 +1,5 @@
1
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
- const _excluded = ["styles", "makeStyles", "isGroup"];
3
- var _dec, _class, _FormFieldGroup;
1
+ var _dec, _class;
2
+ import "core-js/modules/es.array.includes.js";
4
3
  /*
5
4
  * The MIT License (MIT)
6
5
  *
@@ -39,25 +38,33 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
39
38
  category: components
40
39
  ---
41
40
  **/
42
- let FormFieldGroup = (_dec = withStyle(generateStyle), _dec(_class = (_FormFieldGroup = class FormFieldGroup extends Component {
43
- constructor(...args) {
44
- super(...args);
45
- this.ref = null;
46
- this.handleRef = el => {
47
- const elementRef = this.props.elementRef;
48
- this.ref = el;
49
- if (typeof elementRef === 'function') {
50
- elementRef(el);
51
- }
52
- };
53
- }
41
+ let FormFieldGroup = (_dec = withStyle(generateStyle), _dec(_class = class FormFieldGroup extends Component {
42
+ static displayName = "FormFieldGroup";
43
+ static componentId = 'FormFieldGroup';
44
+ static allowedProps = allowedProps;
45
+ static defaultProps = {
46
+ as: 'fieldset',
47
+ disabled: false,
48
+ rowSpacing: 'medium',
49
+ colSpacing: 'small',
50
+ vAlign: 'middle',
51
+ isGroup: true
52
+ };
53
+ ref = null;
54
+ handleRef = el => {
55
+ const {
56
+ elementRef
57
+ } = this.props;
58
+ this.ref = el;
59
+ if (typeof elementRef === 'function') {
60
+ elementRef(el);
61
+ }
62
+ };
54
63
  componentDidMount() {
55
- var _this$props$makeStyle, _this$props;
56
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
64
+ this.props.makeStyles?.();
57
65
  }
58
66
  componentDidUpdate() {
59
- var _this$props$makeStyle2, _this$props2;
60
- (_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?.();
61
68
  }
62
69
  get invalid() {
63
70
  return !!this.props.messages && this.props.messages.findIndex(message => {
@@ -67,7 +74,7 @@ let FormFieldGroup = (_dec = withStyle(generateStyle), _dec(_class = (_FormField
67
74
  renderColumns() {
68
75
  return Children.map(this.props.children, (child, index) => {
69
76
  return child ? _jsx(Grid.Col, {
70
- width: child.props && child.props.width ? 'auto' : void 0,
77
+ width: child.props && child.props.width ? 'auto' : undefined,
71
78
  children: child
72
79
  }, index) : null;
73
80
  });
@@ -84,24 +91,27 @@ let FormFieldGroup = (_dec = withStyle(generateStyle), _dec(_class = (_FormField
84
91
  });
85
92
  }
86
93
  renderFields() {
87
- const styles = this.props.styles;
94
+ const {
95
+ styles
96
+ } = this.props;
88
97
  return _jsx("span", {
89
- css: styles === null || styles === void 0 ? void 0 : styles.formFieldGroup,
98
+ css: styles?.formFieldGroup,
90
99
  children: this.renderChildren()
91
100
  }, "fields");
92
101
  }
93
102
  render() {
94
- const _this$props3 = this.props,
95
- styles = _this$props3.styles,
96
- makeStyles = _this$props3.makeStyles,
97
- isGroup = _this$props3.isGroup,
98
- props = _objectWithoutProperties(_this$props3, _excluded);
103
+ const {
104
+ styles,
105
+ makeStyles,
106
+ isGroup,
107
+ ...props
108
+ } = this.props;
99
109
  // This is quite ugly, but according to ARIA spec the `aria-invalid` prop
100
110
  // can only be used with certain roles see
101
111
  // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-invalid#associated_roles
102
112
  // `aria-invalid` is put on in FormFieldLayout because the error message
103
113
  // DOM part gets there its ID.
104
- let ariaInvalid = void 0;
114
+ let ariaInvalid = undefined;
105
115
  if (this.props.role && this.invalid && ['application', 'checkbox', 'combobox', 'gridcell', 'listbox', 'radiogroup', 'slider', 'spinbutton', 'textbox', 'tree', 'columnheader', 'rowheader', 'searchbox', 'switch', 'treegrid'].includes(this.props.role)) {
106
116
  ariaInvalid = 'true';
107
117
  }
@@ -111,20 +121,13 @@ let FormFieldGroup = (_dec = withStyle(generateStyle), _dec(_class = (_FormField
111
121
  vAlign: props.vAlign,
112
122
  layout: props.layout === 'inline' ? 'inline' : 'stacked',
113
123
  label: props.description,
114
- "aria-disabled": props.disabled ? 'true' : void 0,
124
+ "aria-disabled": props.disabled ? 'true' : undefined,
115
125
  "aria-invalid": ariaInvalid,
116
126
  elementRef: this.handleRef,
117
127
  isGroup: isGroup,
118
128
  children: this.renderFields()
119
129
  });
120
130
  }
121
- }, _FormFieldGroup.displayName = "FormFieldGroup", _FormFieldGroup.componentId = 'FormFieldGroup', _FormFieldGroup.allowedProps = allowedProps, _FormFieldGroup.defaultProps = {
122
- as: 'fieldset',
123
- disabled: false,
124
- rowSpacing: 'medium',
125
- colSpacing: 'small',
126
- vAlign: 'middle',
127
- isGroup: true
128
- }, _FormFieldGroup)) || _class);
131
+ }) || _class);
129
132
  export default FormFieldGroup;
130
133
  export { FormFieldGroup };
@@ -32,7 +32,9 @@
32
32
  * @return {Object} The final style object, which will be used in the component
33
33
  */
34
34
  const generateStyle = (_componentTheme, props) => {
35
- const disabled = props.disabled;
35
+ const {
36
+ disabled
37
+ } = props;
36
38
  return {
37
39
  formFieldGroup: {
38
40
  label: 'formFieldGroup',
@@ -1,4 +1,4 @@
1
- var _dec, _class, _FormFieldLabel;
1
+ var _dec, _class;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -48,36 +48,36 @@ type: example
48
48
  @deprecated since version 10. This is an internal component that will be
49
49
  removed in the future
50
50
  **/
51
- let FormFieldLabel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_FormFieldLabel = class FormFieldLabel extends Component {
52
- constructor(...args) {
53
- super(...args);
54
- this.ref = null;
55
- this.handleRef = el => {
56
- this.ref = el;
57
- };
58
- }
51
+ let FormFieldLabel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class FormFieldLabel extends Component {
52
+ static displayName = "FormFieldLabel";
53
+ static componentId = 'FormFieldLabel';
54
+ static allowedProps = allowedProps;
55
+ static defaultProps = {
56
+ as: 'span'
57
+ };
58
+ ref = null;
59
+ handleRef = el => {
60
+ this.ref = el;
61
+ };
59
62
  componentDidMount() {
60
- var _this$props$makeStyle, _this$props;
61
- (_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?.();
62
64
  }
63
65
  componentDidUpdate() {
64
- var _this$props$makeStyle2, _this$props2;
65
- (_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?.();
66
67
  }
67
68
  render() {
68
69
  const ElementType = getElementType(FormFieldLabel, this.props);
69
- const _this$props3 = this.props,
70
- styles = _this$props3.styles,
71
- children = _this$props3.children;
70
+ const {
71
+ styles,
72
+ children
73
+ } = this.props;
72
74
  return _jsx(ElementType, {
73
75
  ...omitProps(this.props, FormFieldLabel.allowedProps),
74
- css: styles === null || styles === void 0 ? void 0 : styles.formFieldLabel,
76
+ css: styles?.formFieldLabel,
75
77
  ref: this.handleRef,
76
78
  children: children
77
79
  });
78
80
  }
79
- }, _FormFieldLabel.displayName = "FormFieldLabel", _FormFieldLabel.componentId = 'FormFieldLabel', _FormFieldLabel.allowedProps = allowedProps, _FormFieldLabel.defaultProps = {
80
- as: 'span'
81
- }, _FormFieldLabel)) || _class);
81
+ }) || _class);
82
82
  export default FormFieldLabel;
83
83
  export { FormFieldLabel };
@@ -34,7 +34,9 @@ import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
34
34
  * @return {Object} The final style object, which will be used in the component
35
35
  */
36
36
  const generateStyle = (componentTheme, props) => {
37
- const children = props.children;
37
+ const {
38
+ children
39
+ } = props;
38
40
  const hasContent = hasVisibleChildren(children);
39
41
  const labelStyles = {
40
42
  all: 'initial',
@@ -28,21 +28,22 @@
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;
32
- const colors = theme.colors,
33
- typography = theme.typography,
34
- themeName = theme.key;
31
+ const {
32
+ colors,
33
+ typography,
34
+ key: themeName
35
+ } = theme;
35
36
  const themeSpecificStyle = {
36
37
  canvas: {
37
38
  color: theme['ic-brand-font-color-dark']
38
39
  }
39
40
  };
40
41
  const componentVariables = {
41
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
42
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
44
- fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
45
- lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightFit
42
+ color: colors?.contrasts?.grey125125,
43
+ fontFamily: typography?.fontFamily,
44
+ fontWeight: typography?.fontWeightBold,
45
+ fontSize: typography?.fontSizeMedium,
46
+ lineHeight: typography?.lineHeightFit
46
47
  };
47
48
  return {
48
49
  ...componentVariables,
@@ -1,4 +1,4 @@
1
- var _dec, _class, _FormFieldLabel;
1
+ var _dec, _class;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -48,36 +48,36 @@ type: example
48
48
  @deprecated since version 10. This is an internal component that will be
49
49
  removed in the future
50
50
  **/
51
- let FormFieldLabel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_FormFieldLabel = class FormFieldLabel extends Component {
52
- constructor(...args) {
53
- super(...args);
54
- this.ref = null;
55
- this.handleRef = el => {
56
- this.ref = el;
57
- };
58
- }
51
+ let FormFieldLabel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class FormFieldLabel extends Component {
52
+ static displayName = "FormFieldLabel";
53
+ static componentId = 'FormFieldLabel';
54
+ static allowedProps = allowedProps;
55
+ static defaultProps = {
56
+ as: 'span'
57
+ };
58
+ ref = null;
59
+ handleRef = el => {
60
+ this.ref = el;
61
+ };
59
62
  componentDidMount() {
60
- var _this$props$makeStyle, _this$props;
61
- (_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?.();
62
64
  }
63
65
  componentDidUpdate() {
64
- var _this$props$makeStyle2, _this$props2;
65
- (_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?.();
66
67
  }
67
68
  render() {
68
69
  const ElementType = getElementType(FormFieldLabel, this.props);
69
- const _this$props3 = this.props,
70
- styles = _this$props3.styles,
71
- children = _this$props3.children;
70
+ const {
71
+ styles,
72
+ children
73
+ } = this.props;
72
74
  return _jsx(ElementType, {
73
75
  ...omitProps(this.props, FormFieldLabel.allowedProps),
74
- css: styles === null || styles === void 0 ? void 0 : styles.formFieldLabel,
76
+ css: styles?.formFieldLabel,
75
77
  ref: this.handleRef,
76
78
  children: children
77
79
  });
78
80
  }
79
- }, _FormFieldLabel.displayName = "FormFieldLabel", _FormFieldLabel.componentId = 'FormFieldLabel', _FormFieldLabel.allowedProps = allowedProps, _FormFieldLabel.defaultProps = {
80
- as: 'span'
81
- }, _FormFieldLabel)) || _class);
81
+ }) || _class);
82
82
  export default FormFieldLabel;
83
83
  export { FormFieldLabel };
@@ -34,7 +34,9 @@ import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
34
34
  * @return {Object} The final style object, which will be used in the component
35
35
  */
36
36
  const generateStyle = (componentTheme, props) => {
37
- const children = props.children;
37
+ const {
38
+ children
39
+ } = props;
38
40
  const hasContent = hasVisibleChildren(children);
39
41
  const labelStyles = {
40
42
  all: 'initial',
@@ -28,21 +28,22 @@
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;
32
- const colors = theme.colors,
33
- typography = theme.typography,
34
- themeName = theme.key;
31
+ const {
32
+ colors,
33
+ typography,
34
+ key: themeName
35
+ } = theme;
35
36
  const themeSpecificStyle = {
36
37
  canvas: {
37
38
  color: theme['ic-brand-font-color-dark']
38
39
  }
39
40
  };
40
41
  const componentVariables = {
41
- color: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.grey125125,
42
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
43
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
44
- fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeMedium,
45
- lineHeight: typography === null || typography === void 0 ? void 0 : typography.lineHeightFit
42
+ color: colors?.contrasts?.grey125125,
43
+ fontFamily: typography?.fontFamily,
44
+ fontWeight: typography?.fontWeightBold,
45
+ fontSize: typography?.fontSizeMedium,
46
+ lineHeight: typography?.lineHeightFit
46
47
  };
47
48
  return {
48
49
  ...componentVariables,