@instructure/ui-text-input
Advanced tools
Comparing version 8.56.5-pr-snapshot-1729507712924 to 8.56.5-pr-snapshot-1729546148514
@@ -6,3 +6,3 @@ # Change Log | ||
## [8.56.5-pr-snapshot-1729507712924](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1729507712924) (2024-10-21) | ||
## [8.56.5-pr-snapshot-1729546148514](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1729546148514) (2024-10-21) | ||
@@ -9,0 +9,0 @@ **Note:** Version bump only for package @instructure/ui-text-input |
@@ -11,10 +11,6 @@ "use strict"; | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js"); | ||
var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js"); | ||
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js"); | ||
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js"); | ||
var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js"); | ||
var _addEventListener = require("@instructure/ui-dom-utils/lib/addEventListener.js"); | ||
var _FormField = require("@instructure/ui-form-field/lib/FormField"); | ||
var _testable = require("@instructure/ui-testable/lib/testable.js"); | ||
var _uiReactUtils = require("@instructure/ui-react-utils"); | ||
var _uiDomUtils = require("@instructure/ui-dom-utils"); | ||
var _uiFormField = require("@instructure/ui-form-field"); | ||
var _uiTestable = require("@instructure/ui-testable"); | ||
var _emotion = require("@instructure/emotion"); | ||
@@ -56,3 +52,3 @@ var _styles = _interopRequireDefault(require("./styles")); | ||
**/ | ||
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 { | ||
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 { | ||
constructor(props) { | ||
@@ -126,3 +122,3 @@ super(props); | ||
if (this._input) { | ||
this._focusListener = (0, _addEventListener.addEventListener)(this._input, 'focus', this.handleFocus); | ||
this._focusListener = (0, _uiDomUtils.addEventListener)(this._input, 'focus', this.handleFocus); | ||
this.setState({ | ||
@@ -152,5 +148,5 @@ beforeElementHasWidth: this.getElementHasWidth(this._beforeElement), | ||
} | ||
if ((0, _getInteraction.getInteraction)({ | ||
if ((0, _uiReactUtils.getInteraction)({ | ||
props: prevProps | ||
}) !== 'disabled' && (0, _getInteraction.getInteraction)({ | ||
}) !== 'disabled' && (0, _uiReactUtils.getInteraction)({ | ||
props: this.props | ||
@@ -169,3 +165,3 @@ }) === 'disabled') { | ||
get interaction() { | ||
return (0, _getInteraction.getInteraction)({ | ||
return (0, _uiReactUtils.getInteraction)({ | ||
props: this.props | ||
@@ -183,3 +179,3 @@ }); | ||
get focused() { | ||
return (0, _isActiveElement.isActiveElement)(this._input); | ||
return (0, _uiDomUtils.isActiveElement)(this._input); | ||
} | ||
@@ -207,3 +203,3 @@ get value() { | ||
rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded); | ||
const props = (0, _passthroughProps.passthroughProps)(rest); | ||
const props = (0, _uiReactUtils.passthroughProps)(rest); | ||
const interaction = this.interaction; | ||
@@ -263,8 +259,8 @@ let descriptionIds = ''; | ||
styles = _this$props4.styles; | ||
const beforeElement = renderBeforeInput ? (0, _callRenderProp.callRenderProp)(renderBeforeInput) : null; | ||
const afterElement = renderAfterInput ? (0, _callRenderProp.callRenderProp)(renderAfterInput) : null; | ||
const beforeElement = renderBeforeInput ? (0, _uiReactUtils.callRenderProp)(renderBeforeInput) : null; | ||
const afterElement = renderAfterInput ? (0, _uiReactUtils.callRenderProp)(renderAfterInput) : null; | ||
const renderBeforeOrAfter = !!beforeElement || !!afterElement; | ||
return (0, _emotion.jsx)(_FormField.FormField, { | ||
return (0, _emotion.jsx)(_uiFormField.FormField, { | ||
id: this.id, | ||
label: (0, _callRenderProp.callRenderProp)(renderLabel), | ||
label: (0, _uiReactUtils.callRenderProp)(renderLabel), | ||
messagesId: this._messagesId, | ||
@@ -271,0 +267,0 @@ messages: messages, |
@@ -9,4 +9,4 @@ "use strict"; | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js"); | ||
var _controllable = require("@instructure/ui-prop-types/lib/controllable.js"); | ||
var _uiFormField = require("@instructure/ui-form-field"); | ||
var _uiPropTypes = require("@instructure/ui-prop-types"); | ||
/* | ||
@@ -40,6 +40,6 @@ * The MIT License (MIT) | ||
id: _propTypes.default.string, | ||
value: (0, _controllable.controllable)(_propTypes.default.string), | ||
value: (0, _uiPropTypes.controllable)(_propTypes.default.string), | ||
defaultValue: _propTypes.default.string, | ||
interaction: _propTypes.default.oneOf(['enabled', 'disabled', 'readonly']), | ||
messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message), | ||
messages: _propTypes.default.arrayOf(_uiFormField.FormPropTypes.message), | ||
size: _propTypes.default.oneOf(['small', 'medium', 'large']), | ||
@@ -46,0 +46,0 @@ textAlign: _propTypes.default.oneOf(['start', 'center']), |
{ | ||
"name": "@instructure/ui-text-input", | ||
"version": "8.56.5-pr-snapshot-1729507712924", | ||
"version": "8.56.5-pr-snapshot-1729546148514", | ||
"description": "A styled HTML text input component.", | ||
@@ -26,7 +26,7 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-badge": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-color-utils": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-test-utils": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-themes": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-babel-preset": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-badge": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-color-utils": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-test-utils": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-themes": "8.56.5-pr-snapshot-1729546148514", | ||
"react-dom": "^18.2.0" | ||
@@ -36,11 +36,11 @@ }, | ||
"@babel/runtime": "^7.23.2", | ||
"@instructure/emotion": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/shared-types": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-form-field": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-icons": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-prop-types": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-react-utils": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-tag": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/ui-testable": "8.56.5-pr-snapshot-1729507712924", | ||
"@instructure/emotion": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/shared-types": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-form-field": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-icons": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-prop-types": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-react-utils": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-tag": "8.56.5-pr-snapshot-1729546148514", | ||
"@instructure/ui-testable": "8.56.5-pr-snapshot-1729546148514", | ||
"prop-types": "^15.8.1" | ||
@@ -47,0 +47,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
359151
2465
+ Added@instructure/canvas-high-contrast-theme@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/canvas-theme@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/console@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/debounce@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/emotion@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/instructure-theme@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/shared-types@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/theme-registry@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-a11y-content@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-a11y-utils@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-color-utils@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-decorator@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-dom-utils@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-form-field@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-grid@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-i18n@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-icons@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-portal@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-position@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-prop-types@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-react-utils@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-svg-images@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-tag@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-testable@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-theme-tokens@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-themes@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-utils@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/ui-view@8.56.5-pr-snapshot-1729546148514(transitive)
+ Added@instructure/uid@8.56.5-pr-snapshot-1729546148514(transitive)
- Removed@instructure/canvas-high-contrast-theme@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/canvas-theme@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/console@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/debounce@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/emotion@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/instructure-theme@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/shared-types@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/theme-registry@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-a11y-content@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-a11y-utils@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-color-utils@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-decorator@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-dom-utils@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-form-field@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-grid@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-i18n@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-icons@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-portal@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-position@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-prop-types@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-react-utils@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-svg-images@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-tag@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-testable@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-theme-tokens@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-themes@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-utils@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/ui-view@8.56.5-pr-snapshot-1729507712924(transitive)
- Removed@instructure/uid@8.56.5-pr-snapshot-1729507712924(transitive)
Updated@instructure/emotion@8.56.5-pr-snapshot-1729546148514
Updated@instructure/shared-types@8.56.5-pr-snapshot-1729546148514
Updated@instructure/ui-dom-utils@8.56.5-pr-snapshot-1729546148514
Updated@instructure/ui-form-field@8.56.5-pr-snapshot-1729546148514
Updated@instructure/ui-icons@8.56.5-pr-snapshot-1729546148514
Updated@instructure/ui-prop-types@8.56.5-pr-snapshot-1729546148514
Updated@instructure/ui-react-utils@8.56.5-pr-snapshot-1729546148514
Updated@instructure/ui-testable@8.56.5-pr-snapshot-1729546148514