@instructure/ui-text-input 8.16.1-snapshot.3 → 8.17.1-snapshot.16

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,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
+ # [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
7
+
8
+ ### Bug Fixes
9
+
10
+ - remove type:"commonjs" from package.json files ([0b243be](https://github.com/instructure/instructure-ui/commit/0b243bee389ee14493e6b3dbb30a8b660c295d3d))
11
+
6
12
  # [8.16.0](https://github.com/instructure/instructure-ui/compare/v8.15.0...v8.16.0) (2022-02-03)
7
13
 
8
14
  **Note:** Version bump only for package @instructure/ui-text-input
@@ -1,7 +1,7 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["type", "size", "htmlSize", "display", "textAlign", "placeholder", "value", "defaultValue", "isRequired"];
3
3
 
4
- var _dec, _dec2, _class, _class2, _temp;
4
+ var _dec, _dec2, _dec3, _class, _class2, _temp;
5
5
 
6
6
  /*
7
7
  * The MIT License (MIT)
@@ -29,10 +29,9 @@ var _dec, _dec2, _class, _class2, _temp;
29
29
 
30
30
  /** @jsx jsx */
31
31
  import React, { Component } from 'react';
32
- import { callRenderProp, getInteraction, passthroughProps } from '@instructure/ui-react-utils';
32
+ import { callRenderProp, getInteraction, passthroughProps, withDeterministicId } from '@instructure/ui-react-utils';
33
33
  import { isActiveElement } from '@instructure/ui-dom-utils';
34
34
  import { FormField } from '@instructure/ui-form-field';
35
- import { uid } from '@instructure/uid';
36
35
  import { testable } from '@instructure/ui-testable';
37
36
  import { withStyle, jsx } from '@instructure/emotion';
38
37
  import generateStyle from './styles';
@@ -46,7 +45,7 @@ tags: form, field
46
45
  @tsProps
47
46
  **/
48
47
 
49
- let TextInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class TextInput extends Component {
48
+ let TextInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class TextInput extends Component {
50
49
  constructor(props) {
51
50
  super(props);
52
51
  this.ref = null;
@@ -109,8 +108,8 @@ let TextInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
109
108
  this.state = {
110
109
  hasFocus: false
111
110
  };
112
- this._defaultId = uid('TextInput');
113
- this._messagesId = uid('TextInput-messages');
111
+ this._defaultId = props.deterministicId();
112
+ this._messagesId = props.deterministicId('TextInput-messages');
114
113
  }
115
114
 
116
115
  componentDidMount() {
@@ -260,6 +259,6 @@ let TextInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
260
259
  size: 'medium',
261
260
  textAlign: 'start',
262
261
  messages: []
263
- }, _temp)) || _class) || _class);
262
+ }, _temp)) || _class) || _class) || _class);
264
263
  export default TextInput;
265
264
  export { TextInput };
@@ -19,12 +19,12 @@ var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js
19
19
 
20
20
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
21
21
 
22
+ var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
23
+
22
24
  var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
23
25
 
24
26
  var _FormField = require("@instructure/ui-form-field/lib/FormField");
25
27
 
26
- var _uid = require("@instructure/uid");
27
-
28
28
  var _testable = require("@instructure/ui-testable/lib/testable.js");
29
29
 
30
30
  var _emotion = require("@instructure/emotion");
@@ -37,7 +37,7 @@ var _props = require("./props");
37
37
 
38
38
  const _excluded = ["type", "size", "htmlSize", "display", "textAlign", "placeholder", "value", "defaultValue", "isRequired"];
39
39
 
40
- var _dec, _dec2, _class, _class2, _temp;
40
+ var _dec, _dec2, _dec3, _class, _class2, _temp;
41
41
 
42
42
  /**
43
43
  ---
@@ -46,7 +46,7 @@ tags: form, field
46
46
  ---
47
47
  @tsProps
48
48
  **/
49
- let TextInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class TextInput extends _react.Component {
49
+ let TextInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class TextInput extends _react.Component {
50
50
  constructor(props) {
51
51
  super(props);
52
52
  this.ref = null;
@@ -109,8 +109,8 @@ let TextInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
109
109
  this.state = {
110
110
  hasFocus: false
111
111
  };
112
- this._defaultId = (0, _uid.uid)('TextInput');
113
- this._messagesId = (0, _uid.uid)('TextInput-messages');
112
+ this._defaultId = props.deterministicId();
113
+ this._messagesId = props.deterministicId('TextInput-messages');
114
114
  }
115
115
 
116
116
  componentDidMount() {
@@ -259,7 +259,7 @@ let TextInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default)
259
259
  size: 'medium',
260
260
  textAlign: 'start',
261
261
  messages: []
262
- }, _temp)) || _class) || _class);
262
+ }, _temp)) || _class) || _class) || _class);
263
263
  exports.TextInput = TextInput;
264
264
  var _default = TextInput;
265
265
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-text-input",
3
- "version": "8.16.1-snapshot.3+4935fa840",
3
+ "version": "8.17.1-snapshot.16+274440f27",
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,25 +23,23 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.16.1-snapshot.3+4935fa840",
27
- "@instructure/ui-badge": "8.16.1-snapshot.3+4935fa840",
28
- "@instructure/ui-color-utils": "8.16.1-snapshot.3+4935fa840",
29
- "@instructure/ui-test-utils": "8.16.1-snapshot.3+4935fa840",
30
- "@instructure/ui-themes": "8.16.1-snapshot.3+4935fa840"
26
+ "@instructure/ui-babel-preset": "8.17.1-snapshot.16+274440f27",
27
+ "@instructure/ui-badge": "8.17.1-snapshot.16+274440f27",
28
+ "@instructure/ui-color-utils": "8.17.1-snapshot.16+274440f27",
29
+ "@instructure/ui-test-utils": "8.17.1-snapshot.16+274440f27",
30
+ "@instructure/ui-themes": "8.17.1-snapshot.16+274440f27"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/emotion": "8.16.1-snapshot.3+4935fa840",
35
- "@instructure/shared-types": "8.16.1-snapshot.3+4935fa840",
36
- "@instructure/ui-dom-utils": "8.16.1-snapshot.3+4935fa840",
37
- "@instructure/ui-form-field": "8.16.1-snapshot.3+4935fa840",
38
- "@instructure/ui-icons": "8.16.1-snapshot.3+4935fa840",
39
- "@instructure/ui-prop-types": "8.16.1-snapshot.3+4935fa840",
40
- "@instructure/ui-react-utils": "8.16.1-snapshot.3+4935fa840",
41
- "@instructure/ui-tag": "8.16.1-snapshot.3+4935fa840",
42
- "@instructure/ui-testable": "8.16.1-snapshot.3+4935fa840",
43
- "@instructure/ui-utils": "8.16.1-snapshot.3+4935fa840",
44
- "@instructure/uid": "8.16.1-snapshot.3+4935fa840",
34
+ "@instructure/emotion": "8.17.1-snapshot.16+274440f27",
35
+ "@instructure/shared-types": "8.17.1-snapshot.16+274440f27",
36
+ "@instructure/ui-dom-utils": "8.17.1-snapshot.16+274440f27",
37
+ "@instructure/ui-form-field": "8.17.1-snapshot.16+274440f27",
38
+ "@instructure/ui-icons": "8.17.1-snapshot.16+274440f27",
39
+ "@instructure/ui-prop-types": "8.17.1-snapshot.16+274440f27",
40
+ "@instructure/ui-react-utils": "8.17.1-snapshot.16+274440f27",
41
+ "@instructure/ui-tag": "8.17.1-snapshot.16+274440f27",
42
+ "@instructure/ui-testable": "8.17.1-snapshot.16+274440f27",
45
43
  "prop-types": "^15"
46
44
  },
47
45
  "peerDependencies": {
@@ -51,5 +49,5 @@
51
49
  "access": "public"
52
50
  },
53
51
  "sideEffects": false,
54
- "gitHead": "4935fa840983f4e6f8333d450e2dc965f8c08dbc"
52
+ "gitHead": "274440f2739f438237b6fb67919545e2d4e04d59"
55
53
  }
@@ -28,11 +28,11 @@ import React, { Component } from 'react'
28
28
  import {
29
29
  callRenderProp,
30
30
  getInteraction,
31
- passthroughProps
31
+ passthroughProps,
32
+ withDeterministicId
32
33
  } from '@instructure/ui-react-utils'
33
34
  import { isActiveElement } from '@instructure/ui-dom-utils'
34
35
  import { FormField } from '@instructure/ui-form-field'
35
- import { uid } from '@instructure/uid'
36
36
  import { testable } from '@instructure/ui-testable'
37
37
  import { withStyle, jsx } from '@instructure/emotion'
38
38
 
@@ -52,6 +52,7 @@ tags: form, field
52
52
  ---
53
53
  @tsProps
54
54
  **/
55
+ @withDeterministicId()
55
56
  @withStyle(generateStyle, generateComponentTheme)
56
57
  @testable()
57
58
  class TextInput extends Component<TextInputProps, TextInputState> {
@@ -75,8 +76,8 @@ class TextInput extends Component<TextInputProps, TextInputState> {
75
76
  constructor(props: TextInputProps) {
76
77
  super(props)
77
78
  this.state = { hasFocus: false }
78
- this._defaultId = uid('TextInput')
79
- this._messagesId = uid('TextInput-messages')
79
+ this._defaultId = props.deterministicId!()
80
+ this._messagesId = props.deterministicId!('TextInput-messages')
80
81
  }
81
82
 
82
83
  ref: Element | null = null
@@ -36,6 +36,7 @@ import type {
36
36
  TextInputTheme
37
37
  } from '@instructure/shared-types'
38
38
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
39
+ import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
39
40
 
40
41
  type TextInputOwnProps = {
41
42
  /**
@@ -182,7 +183,7 @@ type TextInputProps = TextInputOwnProps &
182
183
  > &
183
184
  // The component will handle pass this prop to FormField, but it shouldn't be
184
185
  // listed as a prop
185
- Pick<FormFieldProps, 'layout'>
186
+ Pick<FormFieldProps, 'layout'> & WithDeterministicIdProps
186
187
 
187
188
  type TextInputStyle = ComponentStyle<
188
189
  | 'textInput'
@@ -21,7 +21,6 @@
21
21
  { "path": "../ui-react-utils/tsconfig.build.json" },
22
22
  { "path": "../ui-tag/tsconfig.build.json" },
23
23
  { "path": "../ui-testable/tsconfig.build.json" },
24
- { "path": "../ui-utils/tsconfig.build.json" },
25
24
  { "path": "../uid/tsconfig.build.json" }
26
25
  ]
27
26
  }