@instructure/ui-number-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 +6 -0
- package/es/NumberInput/index.js +5 -6
- package/lib/NumberInput/index.js +6 -6
- package/package.json +14 -14
- package/src/NumberInput/index.tsx +4 -3
- package/src/NumberInput/props.ts +8 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/NumberInput/index.d.ts.map +1 -1
- package/types/NumberInput/props.d.ts +2 -1
- package/types/NumberInput/props.d.ts.map +1 -1
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
|
package/es/NumberInput/index.js
CHANGED
|
@@ -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),
|
|
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 =
|
|
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 };
|
package/lib/NumberInput/index.js
CHANGED
|
@@ -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),
|
|
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 =
|
|
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.
|
|
3
|
+
"version": "8.17.1-snapshot.16+274440f27",
|
|
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.
|
|
27
|
-
"@instructure/ui-test-locator": "8.
|
|
28
|
-
"@instructure/ui-test-utils": "8.
|
|
29
|
-
"@instructure/ui-themes": "8.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.17.1-snapshot.16+274440f27",
|
|
27
|
+
"@instructure/ui-test-locator": "8.17.1-snapshot.16+274440f27",
|
|
28
|
+
"@instructure/ui-test-utils": "8.17.1-snapshot.16+274440f27",
|
|
29
|
+
"@instructure/ui-themes": "8.17.1-snapshot.16+274440f27"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/emotion": "8.
|
|
34
|
-
"@instructure/shared-types": "8.
|
|
35
|
-
"@instructure/ui-form-field": "8.
|
|
36
|
-
"@instructure/ui-icons": "8.
|
|
37
|
-
"@instructure/ui-react-utils": "8.
|
|
38
|
-
"@instructure/ui-testable": "8.
|
|
39
|
-
"@instructure/ui-utils": "8.
|
|
40
|
-
"@instructure/uid": "8.
|
|
33
|
+
"@instructure/emotion": "8.17.1-snapshot.16+274440f27",
|
|
34
|
+
"@instructure/shared-types": "8.17.1-snapshot.16+274440f27",
|
|
35
|
+
"@instructure/ui-form-field": "8.17.1-snapshot.16+274440f27",
|
|
36
|
+
"@instructure/ui-icons": "8.17.1-snapshot.16+274440f27",
|
|
37
|
+
"@instructure/ui-react-utils": "8.17.1-snapshot.16+274440f27",
|
|
38
|
+
"@instructure/ui-testable": "8.17.1-snapshot.16+274440f27",
|
|
39
|
+
"@instructure/ui-utils": "8.17.1-snapshot.16+274440f27",
|
|
40
|
+
"@instructure/uid": "8.17.1-snapshot.16+274440f27",
|
|
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": "
|
|
51
|
+
"gitHead": "274440f2739f438237b6fb67919545e2d4e04d59"
|
|
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 =
|
|
97
|
+
this._id = this.props.deterministicId!()
|
|
97
98
|
}
|
|
98
99
|
return this._id
|
|
99
100
|
}
|
package/src/NumberInput/props.ts
CHANGED
|
@@ -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
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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'
|