@instructure/ui-number-input 8.16.1-snapshot.2 → 8.17.1-snapshot.14

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-number-input
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _class, _class2, _temp, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
1
+ var _dec, _dec2, _dec3, _class, _class2, _temp, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
2
2
 
3
3
  /*
4
4
  * The MIT License (MIT)
@@ -29,9 +29,8 @@ import React, { Component } from 'react';
29
29
  import keycode from 'keycode';
30
30
  import { FormField } from '@instructure/ui-form-field';
31
31
  import { IconArrowOpenDownLine, IconArrowOpenUpLine } from '@instructure/ui-icons';
32
- import { uid } from '@instructure/uid';
33
32
  import { testable } from '@instructure/ui-testable';
34
- import { omitProps, pickProps, callRenderProp, getInteraction } from '@instructure/ui-react-utils';
33
+ import { omitProps, pickProps, callRenderProp, getInteraction, withDeterministicId } from '@instructure/ui-react-utils';
35
34
  import { withStyle, jsx } from '@instructure/emotion';
36
35
  import generateStyle from './styles';
37
36
  import generateComponentTheme from './theme';
@@ -44,7 +43,7 @@ id: NumberInput
44
43
  ---
45
44
  @tsProps
46
45
  **/
47
- let NumberInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class NumberInput extends Component {
46
+ let NumberInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class NumberInput extends Component {
48
47
  constructor() {
49
48
  super(...arguments);
50
49
  this.state = {
@@ -132,7 +131,7 @@ let NumberInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
132
131
  }
133
132
 
134
133
  if (!this._id) {
135
- this._id = uid('NumberInput');
134
+ this._id = this.props.deterministicId();
136
135
  }
137
136
 
138
137
  return this._id;
@@ -256,6 +255,6 @@ let NumberInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec
256
255
  display: 'block',
257
256
  textAlign: 'start',
258
257
  inputMode: 'numeric'
259
- }, _temp)) || _class) || _class);
258
+ }, _temp)) || _class) || _class) || _class);
260
259
  export default NumberInput;
261
260
  export { NumberInput };
@@ -19,8 +19,6 @@ var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDow
19
19
 
20
20
  var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
21
21
 
22
- var _uid = require("@instructure/uid");
23
-
24
22
  var _testable = require("@instructure/ui-testable/lib/testable.js");
25
23
 
26
24
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
@@ -31,6 +29,8 @@ var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js
31
29
 
32
30
  var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js");
33
31
 
32
+ var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
33
+
34
34
  var _emotion = require("@instructure/emotion");
35
35
 
36
36
  var _styles = _interopRequireDefault(require("./styles"));
@@ -39,7 +39,7 @@ var _theme = _interopRequireDefault(require("./theme"));
39
39
 
40
40
  var _props = require("./props");
41
41
 
42
- var _dec, _dec2, _class, _class2, _temp, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
42
+ var _dec, _dec2, _dec3, _class, _class2, _temp, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
43
43
 
44
44
  /**
45
45
  ---
@@ -48,7 +48,7 @@ id: NumberInput
48
48
  ---
49
49
  @tsProps
50
50
  **/
51
- let NumberInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class NumberInput extends _react.Component {
51
+ let NumberInput = (_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 NumberInput extends _react.Component {
52
52
  constructor() {
53
53
  super(...arguments);
54
54
  this.state = {
@@ -136,7 +136,7 @@ let NumberInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
136
136
  }
137
137
 
138
138
  if (!this._id) {
139
- this._id = (0, _uid.uid)('NumberInput');
139
+ this._id = this.props.deterministicId();
140
140
  }
141
141
 
142
142
  return this._id;
@@ -260,7 +260,7 @@ let NumberInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defaul
260
260
  display: 'block',
261
261
  textAlign: 'start',
262
262
  inputMode: 'numeric'
263
- }, _temp)) || _class) || _class);
263
+ }, _temp)) || _class) || _class) || _class);
264
264
  exports.NumberInput = NumberInput;
265
265
  var _default = NumberInput;
266
266
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-number-input",
3
- "version": "8.16.1-snapshot.2+25359e770",
3
+ "version": "8.17.1-snapshot.14+f0b03679c",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "homepage": "https://instructure.github.io/instructure-ui/",
@@ -23,21 +23,21 @@
23
23
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
24
24
  },
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.16.1-snapshot.2+25359e770",
27
- "@instructure/ui-test-locator": "8.16.1-snapshot.2+25359e770",
28
- "@instructure/ui-test-utils": "8.16.1-snapshot.2+25359e770",
29
- "@instructure/ui-themes": "8.16.1-snapshot.2+25359e770"
26
+ "@instructure/ui-babel-preset": "8.17.1-snapshot.14+f0b03679c",
27
+ "@instructure/ui-test-locator": "8.17.1-snapshot.14+f0b03679c",
28
+ "@instructure/ui-test-utils": "8.17.1-snapshot.14+f0b03679c",
29
+ "@instructure/ui-themes": "8.17.1-snapshot.14+f0b03679c"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/emotion": "8.16.1-snapshot.2+25359e770",
34
- "@instructure/shared-types": "8.16.1-snapshot.2+25359e770",
35
- "@instructure/ui-form-field": "8.16.1-snapshot.2+25359e770",
36
- "@instructure/ui-icons": "8.16.1-snapshot.2+25359e770",
37
- "@instructure/ui-react-utils": "8.16.1-snapshot.2+25359e770",
38
- "@instructure/ui-testable": "8.16.1-snapshot.2+25359e770",
39
- "@instructure/ui-utils": "8.16.1-snapshot.2+25359e770",
40
- "@instructure/uid": "8.16.1-snapshot.2+25359e770",
33
+ "@instructure/emotion": "8.17.1-snapshot.14+f0b03679c",
34
+ "@instructure/shared-types": "8.17.1-snapshot.14+f0b03679c",
35
+ "@instructure/ui-form-field": "8.17.1-snapshot.14+f0b03679c",
36
+ "@instructure/ui-icons": "8.17.1-snapshot.14+f0b03679c",
37
+ "@instructure/ui-react-utils": "8.17.1-snapshot.14+f0b03679c",
38
+ "@instructure/ui-testable": "8.17.1-snapshot.14+f0b03679c",
39
+ "@instructure/ui-utils": "8.17.1-snapshot.14+f0b03679c",
40
+ "@instructure/uid": "8.17.1-snapshot.14+f0b03679c",
41
41
  "keycode": "^2",
42
42
  "prop-types": "^15"
43
43
  },
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "sideEffects": false,
51
- "gitHead": "25359e77043270cf26e92b14f396b498f1540c62"
51
+ "gitHead": "f0b03679c4c4d05d4d650d22646ac1dc6791e935"
52
52
  }
@@ -31,13 +31,13 @@ import {
31
31
  IconArrowOpenDownLine,
32
32
  IconArrowOpenUpLine
33
33
  } from '@instructure/ui-icons'
34
- import { uid } from '@instructure/uid'
35
34
  import { testable } from '@instructure/ui-testable'
36
35
  import {
37
36
  omitProps,
38
37
  pickProps,
39
38
  callRenderProp,
40
- getInteraction
39
+ getInteraction,
40
+ withDeterministicId
41
41
  } from '@instructure/ui-react-utils'
42
42
 
43
43
  import { withStyle, jsx } from '@instructure/emotion'
@@ -59,6 +59,7 @@ id: NumberInput
59
59
  ---
60
60
  @tsProps
61
61
  **/
62
+ @withDeterministicId()
62
63
  @withStyle(generateStyle, generateComponentTheme)
63
64
  @testable()
64
65
  class NumberInput extends Component<NumberInputProps, NumberInputState> {
@@ -93,7 +94,7 @@ class NumberInput extends Component<NumberInputProps, NumberInputState> {
93
94
  return this.props.id
94
95
  }
95
96
  if (!this._id) {
96
- this._id = uid('NumberInput')
97
+ this._id = this.props.deterministicId!()
97
98
  }
98
99
  return this._id
99
100
  }
@@ -37,6 +37,7 @@ import type {
37
37
  import type { InteractionType } from '@instructure/ui-react-utils'
38
38
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
39
39
  import type { FormFieldOwnProps, FormMessage } from '@instructure/ui-form-field'
40
+ import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
40
41
 
41
42
  type NumberInputOwnProps = {
42
43
  /**
@@ -178,12 +179,13 @@ type NumberInputProps =
178
179
  FormFieldOwnProps,
179
180
  'label' | 'inline' | 'id' | 'elementRef'
180
181
  > &
181
- NumberInputOwnProps &
182
- WithStyleProps<NumberInputTheme, NumberInputStyle> &
183
- OtherHTMLAttributes<
184
- NumberInputOwnProps,
185
- InputHTMLAttributes<NumberInputOwnProps>
186
- >
182
+ NumberInputOwnProps &
183
+ WithStyleProps<NumberInputTheme, NumberInputStyle> &
184
+ OtherHTMLAttributes<
185
+ NumberInputOwnProps,
186
+ InputHTMLAttributes<NumberInputOwnProps>
187
+ >
188
+ & WithDeterministicIdProps
187
189
 
188
190
  type NumberInputStyle = ComponentStyle<
189
191
  | 'numberInput'