@instructure/ui-text-input 8.56.1 → 8.56.2-pr-snapshot-1721749364069

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 CHANGED
@@ -3,6 +3,14 @@
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
+ ## [8.56.2-pr-snapshot-1721749364069](https://github.com/instructure/instructure-ui/compare/v8.56.1...v8.56.2-pr-snapshot-1721749364069) (2024-07-23)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-text-input
9
+
10
+
11
+
12
+
13
+
6
14
  ## [8.56.1](https://github.com/instructure/instructure-ui/compare/v8.56.0...v8.56.1) (2024-06-13)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-text-input
@@ -8,14 +8,10 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = exports.TextInput = void 0;
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
12
- var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js");
13
- var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
14
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
15
- var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
16
- var _addEventListener = require("@instructure/ui-dom-utils/lib/addEventListener.js");
17
- var _FormField = require("@instructure/ui-form-field/lib/FormField");
18
- var _testable = require("@instructure/ui-testable/lib/testable.js");
11
+ var _uiReactUtils = require("@instructure/ui-react-utils");
12
+ var _uiDomUtils = require("@instructure/ui-dom-utils");
13
+ var _uiFormField = require("@instructure/ui-form-field");
14
+ var _uiTestable = require("@instructure/ui-testable");
19
15
  var _emotion = require("@instructure/emotion");
20
16
  var _styles = _interopRequireDefault(require("./styles"));
21
17
  var _theme = _interopRequireDefault(require("./theme"));
@@ -52,7 +48,7 @@ category: components
52
48
  tags: form, field
53
49
  ---
54
50
  **/
55
- let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class TextInput extends _react.Component {
51
+ let TextInput = exports.TextInput = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class TextInput extends _react.Component {
56
52
  constructor(props) {
57
53
  super(props);
58
54
  this.ref = null;
@@ -121,7 +117,7 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
121
117
  componentDidMount() {
122
118
  var _this$props$makeStyle, _this$props;
123
119
  if (this._input) {
124
- this._focusListener = (0, _addEventListener.addEventListener)(this._input, 'focus', this.handleFocus);
120
+ this._focusListener = (0, _uiDomUtils.addEventListener)(this._input, 'focus', this.handleFocus);
125
121
  this.setState({
126
122
  beforeElementHasWidth: this.getElementHasWidth(this._beforeElement),
127
123
  afterElementHasWidth: this.getElementHasWidth(this._afterElement)
@@ -146,9 +142,9 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
146
142
  afterElementHasWidth: this.getElementHasWidth(this._afterElement)
147
143
  });
148
144
  }
149
- if ((0, _getInteraction.getInteraction)({
145
+ if ((0, _uiReactUtils.getInteraction)({
150
146
  props: prevProps
151
- }) !== 'disabled' && (0, _getInteraction.getInteraction)({
147
+ }) !== 'disabled' && (0, _uiReactUtils.getInteraction)({
152
148
  props: this.props
153
149
  }) === 'disabled') {
154
150
  this.setState({
@@ -162,7 +158,7 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
162
158
  (_this$_input = this._input) === null || _this$_input === void 0 ? void 0 : _this$_input.focus();
163
159
  }
164
160
  get interaction() {
165
- return (0, _getInteraction.getInteraction)({
161
+ return (0, _uiReactUtils.getInteraction)({
166
162
  props: this.props
167
163
  });
168
164
  }
@@ -175,7 +171,7 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
175
171
  }) >= 0;
176
172
  }
177
173
  get focused() {
178
- return (0, _isActiveElement.isActiveElement)(this._input);
174
+ return (0, _uiDomUtils.isActiveElement)(this._input);
179
175
  }
180
176
  get value() {
181
177
  var _this$_input2;
@@ -198,7 +194,7 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
198
194
  isRequired = _this$props3.isRequired,
199
195
  onFocus = _this$props3.onFocus,
200
196
  rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
201
- const props = (0, _passthroughProps.passthroughProps)(rest);
197
+ const props = (0, _uiReactUtils.passthroughProps)(rest);
202
198
  const interaction = this.interaction;
203
199
  let descriptionIds = '';
204
200
  if (props['aria-describedby']) {
@@ -253,12 +249,12 @@ let TextInput = exports.TextInput = (_dec = (0, _withDeterministicId.withDetermi
253
249
  messages = _this$props4.messages,
254
250
  inputContainerRef = _this$props4.inputContainerRef,
255
251
  styles = _this$props4.styles;
256
- const beforeElement = renderBeforeInput ? (0, _callRenderProp.callRenderProp)(renderBeforeInput) : null;
257
- const afterElement = renderAfterInput ? (0, _callRenderProp.callRenderProp)(renderAfterInput) : null;
252
+ const beforeElement = renderBeforeInput ? (0, _uiReactUtils.callRenderProp)(renderBeforeInput) : null;
253
+ const afterElement = renderAfterInput ? (0, _uiReactUtils.callRenderProp)(renderAfterInput) : null;
258
254
  const renderBeforeOrAfter = !!beforeElement || !!afterElement;
259
- return (0, _emotion.jsx)(_FormField.FormField, {
255
+ return (0, _emotion.jsx)(_uiFormField.FormField, {
260
256
  id: this.id,
261
- label: (0, _callRenderProp.callRenderProp)(renderLabel),
257
+ label: (0, _uiReactUtils.callRenderProp)(renderLabel),
262
258
  messagesId: this._messagesId,
263
259
  messages: messages,
264
260
  inline: display === 'inline-block',
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.propTypes = exports.allowedProps = void 0;
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
10
- var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
9
+ var _uiFormField = require("@instructure/ui-form-field");
10
+ var _uiPropTypes = require("@instructure/ui-prop-types");
11
11
  /*
12
12
  * The MIT License (MIT)
13
13
  *
@@ -36,10 +36,10 @@ const propTypes = exports.propTypes = {
36
36
  renderLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
37
37
  type: _propTypes.default.oneOf(['text', 'email', 'url', 'tel', 'search', 'password']),
38
38
  id: _propTypes.default.string,
39
- value: (0, _controllable.controllable)(_propTypes.default.string),
39
+ value: (0, _uiPropTypes.controllable)(_propTypes.default.string),
40
40
  defaultValue: _propTypes.default.string,
41
41
  interaction: _propTypes.default.oneOf(['enabled', 'disabled', 'readonly']),
42
- messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
42
+ messages: _propTypes.default.arrayOf(_uiFormField.FormPropTypes.message),
43
43
  size: _propTypes.default.oneOf(['small', 'medium', 'large']),
44
44
  textAlign: _propTypes.default.oneOf(['start', 'center']),
45
45
  width: _propTypes.default.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-text-input",
3
- "version": "8.56.1",
3
+ "version": "8.56.2-pr-snapshot-1721749364069",
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,24 +23,24 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.56.1",
27
- "@instructure/ui-badge": "8.56.1",
28
- "@instructure/ui-color-utils": "8.56.1",
29
- "@instructure/ui-test-utils": "8.56.1",
30
- "@instructure/ui-themes": "8.56.1",
26
+ "@instructure/ui-babel-preset": "8.56.2-pr-snapshot-1721749364069",
27
+ "@instructure/ui-badge": "8.56.2-pr-snapshot-1721749364069",
28
+ "@instructure/ui-color-utils": "8.56.2-pr-snapshot-1721749364069",
29
+ "@instructure/ui-test-utils": "8.56.2-pr-snapshot-1721749364069",
30
+ "@instructure/ui-themes": "8.56.2-pr-snapshot-1721749364069",
31
31
  "react-dom": "^18.2.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.23.2",
35
- "@instructure/emotion": "8.56.1",
36
- "@instructure/shared-types": "8.56.1",
37
- "@instructure/ui-dom-utils": "8.56.1",
38
- "@instructure/ui-form-field": "8.56.1",
39
- "@instructure/ui-icons": "8.56.1",
40
- "@instructure/ui-prop-types": "8.56.1",
41
- "@instructure/ui-react-utils": "8.56.1",
42
- "@instructure/ui-tag": "8.56.1",
43
- "@instructure/ui-testable": "8.56.1",
35
+ "@instructure/emotion": "8.56.2-pr-snapshot-1721749364069",
36
+ "@instructure/shared-types": "8.56.2-pr-snapshot-1721749364069",
37
+ "@instructure/ui-dom-utils": "8.56.2-pr-snapshot-1721749364069",
38
+ "@instructure/ui-form-field": "8.56.2-pr-snapshot-1721749364069",
39
+ "@instructure/ui-icons": "8.56.2-pr-snapshot-1721749364069",
40
+ "@instructure/ui-prop-types": "8.56.2-pr-snapshot-1721749364069",
41
+ "@instructure/ui-react-utils": "8.56.2-pr-snapshot-1721749364069",
42
+ "@instructure/ui-tag": "8.56.2-pr-snapshot-1721749364069",
43
+ "@instructure/ui-testable": "8.56.2-pr-snapshot-1721749364069",
44
44
  "prop-types": "^15.8.1"
45
45
  },
46
46
  "peerDependencies": {