@instructure/ui-number-input 10.2.3-snapshot-13 → 10.2.3-snapshot-15
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,7 +3,7 @@
|
|
|
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
|
-
## [10.2.3-snapshot-
|
|
6
|
+
## [10.2.3-snapshot-15](https://github.com/instructure/instructure-ui/compare/v10.2.2...v10.2.3-snapshot-15) (2024-10-03)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-number-input
|
|
9
9
|
|
|
@@ -47,7 +47,7 @@ describe('<NumberInput />', () => {
|
|
|
47
47
|
});
|
|
48
48
|
it('sets value on the input', async () => {
|
|
49
49
|
const onChange = vi.fn();
|
|
50
|
-
render(
|
|
50
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
51
51
|
renderLabel: "Label",
|
|
52
52
|
onChange: onChange,
|
|
53
53
|
value: "42"
|
|
@@ -57,7 +57,7 @@ describe('<NumberInput />', () => {
|
|
|
57
57
|
});
|
|
58
58
|
it('should accept a number for the value', async () => {
|
|
59
59
|
const onChange = vi.fn();
|
|
60
|
-
render(
|
|
60
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
61
61
|
renderLabel: "Label",
|
|
62
62
|
onChange: onChange,
|
|
63
63
|
value: 42
|
|
@@ -75,7 +75,7 @@ describe('<NumberInput />', () => {
|
|
|
75
75
|
});
|
|
76
76
|
it('passes the input element to inputRef', async () => {
|
|
77
77
|
const inputRef = vi.fn();
|
|
78
|
-
render(
|
|
78
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
79
79
|
renderLabel: "Label",
|
|
80
80
|
inputRef: inputRef
|
|
81
81
|
}));
|
|
@@ -85,7 +85,7 @@ describe('<NumberInput />', () => {
|
|
|
85
85
|
});
|
|
86
86
|
it('passes change events to onChange handler', async () => {
|
|
87
87
|
const onChange = vi.fn();
|
|
88
|
-
render(
|
|
88
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
89
89
|
renderLabel: "Label",
|
|
90
90
|
onChange: onChange
|
|
91
91
|
}));
|
|
@@ -101,7 +101,7 @@ describe('<NumberInput />', () => {
|
|
|
101
101
|
});
|
|
102
102
|
it('passes keyboard events to the onKeyDown handler', async () => {
|
|
103
103
|
const onKeyDown = vi.fn();
|
|
104
|
-
render(
|
|
104
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
105
105
|
renderLabel: "Label",
|
|
106
106
|
onKeyDown: onKeyDown
|
|
107
107
|
}));
|
|
@@ -113,7 +113,7 @@ describe('<NumberInput />', () => {
|
|
|
113
113
|
});
|
|
114
114
|
it('passes blur events to onBlur handler', async () => {
|
|
115
115
|
const onBlur = vi.fn();
|
|
116
|
-
render(
|
|
116
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
117
117
|
renderLabel: "Label",
|
|
118
118
|
onBlur: onBlur
|
|
119
119
|
}));
|
|
@@ -125,7 +125,7 @@ describe('<NumberInput />', () => {
|
|
|
125
125
|
});
|
|
126
126
|
it('passes focus events to onFocus handler', async () => {
|
|
127
127
|
const onFocus = vi.fn();
|
|
128
|
-
render(
|
|
128
|
+
render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
129
129
|
renderLabel: "Label",
|
|
130
130
|
onFocus: onFocus
|
|
131
131
|
}));
|
|
@@ -154,7 +154,7 @@ describe('<NumberInput />', () => {
|
|
|
154
154
|
});
|
|
155
155
|
it('calls onIncrement when up arrow spinbutton is clicked', async () => {
|
|
156
156
|
const onIncrement = vi.fn();
|
|
157
|
-
const _render4 = render(
|
|
157
|
+
const _render4 = render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
158
158
|
renderLabel: "Label",
|
|
159
159
|
onIncrement: onIncrement
|
|
160
160
|
})),
|
|
@@ -167,7 +167,7 @@ describe('<NumberInput />', () => {
|
|
|
167
167
|
});
|
|
168
168
|
it('does not call onIncrement when `interaction` is set to readonly', async () => {
|
|
169
169
|
const onIncrement = vi.fn();
|
|
170
|
-
const _render5 = render(
|
|
170
|
+
const _render5 = render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
171
171
|
renderLabel: "Label",
|
|
172
172
|
interaction: "readonly",
|
|
173
173
|
onIncrement: onIncrement
|
|
@@ -181,7 +181,7 @@ describe('<NumberInput />', () => {
|
|
|
181
181
|
});
|
|
182
182
|
it('does not call onIncrement when `readOnly` is set', async () => {
|
|
183
183
|
const onIncrement = vi.fn();
|
|
184
|
-
const _render6 = render(
|
|
184
|
+
const _render6 = render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
185
185
|
renderLabel: "Label",
|
|
186
186
|
readOnly: true,
|
|
187
187
|
onIncrement: onIncrement
|
|
@@ -195,7 +195,7 @@ describe('<NumberInput />', () => {
|
|
|
195
195
|
});
|
|
196
196
|
it('calls onDecrement when down arrow spinbutton is clicked', async () => {
|
|
197
197
|
const onDecrement = vi.fn();
|
|
198
|
-
const _render7 = render(
|
|
198
|
+
const _render7 = render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
199
199
|
renderLabel: "Label",
|
|
200
200
|
onDecrement: onDecrement
|
|
201
201
|
})),
|
|
@@ -208,7 +208,7 @@ describe('<NumberInput />', () => {
|
|
|
208
208
|
});
|
|
209
209
|
it('does not call onDecrement when `interaction` is set to readonly', async () => {
|
|
210
210
|
const onDecrement = vi.fn();
|
|
211
|
-
const _render8 = render(
|
|
211
|
+
const _render8 = render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
212
212
|
renderLabel: "Label",
|
|
213
213
|
interaction: "readonly",
|
|
214
214
|
onDecrement: onDecrement
|
|
@@ -222,7 +222,7 @@ describe('<NumberInput />', () => {
|
|
|
222
222
|
});
|
|
223
223
|
it('does not call onDecrement when `readOnly` is set', async () => {
|
|
224
224
|
const onDecrement = vi.fn();
|
|
225
|
-
const _render9 = render(
|
|
225
|
+
const _render9 = render(/*#__PURE__*/React.createElement(NumberInput, {
|
|
226
226
|
renderLabel: "Label",
|
|
227
227
|
readOnly: true,
|
|
228
228
|
onDecrement: onDecrement
|
|
@@ -49,7 +49,7 @@ describe('<NumberInput />', () => {
|
|
|
49
49
|
});
|
|
50
50
|
it('sets value on the input', async () => {
|
|
51
51
|
const onChange = _vitest.vi.fn();
|
|
52
|
-
(0, _react2.render)(
|
|
52
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
53
53
|
renderLabel: "Label",
|
|
54
54
|
onChange: onChange,
|
|
55
55
|
value: "42"
|
|
@@ -59,7 +59,7 @@ describe('<NumberInput />', () => {
|
|
|
59
59
|
});
|
|
60
60
|
it('should accept a number for the value', async () => {
|
|
61
61
|
const onChange = _vitest.vi.fn();
|
|
62
|
-
(0, _react2.render)(
|
|
62
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
63
63
|
renderLabel: "Label",
|
|
64
64
|
onChange: onChange,
|
|
65
65
|
value: 42
|
|
@@ -77,7 +77,7 @@ describe('<NumberInput />', () => {
|
|
|
77
77
|
});
|
|
78
78
|
it('passes the input element to inputRef', async () => {
|
|
79
79
|
const inputRef = _vitest.vi.fn();
|
|
80
|
-
(0, _react2.render)(
|
|
80
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
81
81
|
renderLabel: "Label",
|
|
82
82
|
inputRef: inputRef
|
|
83
83
|
}));
|
|
@@ -87,7 +87,7 @@ describe('<NumberInput />', () => {
|
|
|
87
87
|
});
|
|
88
88
|
it('passes change events to onChange handler', async () => {
|
|
89
89
|
const onChange = _vitest.vi.fn();
|
|
90
|
-
(0, _react2.render)(
|
|
90
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
91
91
|
renderLabel: "Label",
|
|
92
92
|
onChange: onChange
|
|
93
93
|
}));
|
|
@@ -103,7 +103,7 @@ describe('<NumberInput />', () => {
|
|
|
103
103
|
});
|
|
104
104
|
it('passes keyboard events to the onKeyDown handler', async () => {
|
|
105
105
|
const onKeyDown = _vitest.vi.fn();
|
|
106
|
-
(0, _react2.render)(
|
|
106
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
107
107
|
renderLabel: "Label",
|
|
108
108
|
onKeyDown: onKeyDown
|
|
109
109
|
}));
|
|
@@ -115,7 +115,7 @@ describe('<NumberInput />', () => {
|
|
|
115
115
|
});
|
|
116
116
|
it('passes blur events to onBlur handler', async () => {
|
|
117
117
|
const onBlur = _vitest.vi.fn();
|
|
118
|
-
(0, _react2.render)(
|
|
118
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
119
119
|
renderLabel: "Label",
|
|
120
120
|
onBlur: onBlur
|
|
121
121
|
}));
|
|
@@ -127,7 +127,7 @@ describe('<NumberInput />', () => {
|
|
|
127
127
|
});
|
|
128
128
|
it('passes focus events to onFocus handler', async () => {
|
|
129
129
|
const onFocus = _vitest.vi.fn();
|
|
130
|
-
(0, _react2.render)(
|
|
130
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
131
131
|
renderLabel: "Label",
|
|
132
132
|
onFocus: onFocus
|
|
133
133
|
}));
|
|
@@ -156,7 +156,7 @@ describe('<NumberInput />', () => {
|
|
|
156
156
|
});
|
|
157
157
|
it('calls onIncrement when up arrow spinbutton is clicked', async () => {
|
|
158
158
|
const onIncrement = _vitest.vi.fn();
|
|
159
|
-
const _render4 = (0, _react2.render)(
|
|
159
|
+
const _render4 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
160
160
|
renderLabel: "Label",
|
|
161
161
|
onIncrement: onIncrement
|
|
162
162
|
})),
|
|
@@ -169,7 +169,7 @@ describe('<NumberInput />', () => {
|
|
|
169
169
|
});
|
|
170
170
|
it('does not call onIncrement when `interaction` is set to readonly', async () => {
|
|
171
171
|
const onIncrement = _vitest.vi.fn();
|
|
172
|
-
const _render5 = (0, _react2.render)(
|
|
172
|
+
const _render5 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
173
173
|
renderLabel: "Label",
|
|
174
174
|
interaction: "readonly",
|
|
175
175
|
onIncrement: onIncrement
|
|
@@ -183,7 +183,7 @@ describe('<NumberInput />', () => {
|
|
|
183
183
|
});
|
|
184
184
|
it('does not call onIncrement when `readOnly` is set', async () => {
|
|
185
185
|
const onIncrement = _vitest.vi.fn();
|
|
186
|
-
const _render6 = (0, _react2.render)(
|
|
186
|
+
const _render6 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
187
187
|
renderLabel: "Label",
|
|
188
188
|
readOnly: true,
|
|
189
189
|
onIncrement: onIncrement
|
|
@@ -197,7 +197,7 @@ describe('<NumberInput />', () => {
|
|
|
197
197
|
});
|
|
198
198
|
it('calls onDecrement when down arrow spinbutton is clicked', async () => {
|
|
199
199
|
const onDecrement = _vitest.vi.fn();
|
|
200
|
-
const _render7 = (0, _react2.render)(
|
|
200
|
+
const _render7 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
201
201
|
renderLabel: "Label",
|
|
202
202
|
onDecrement: onDecrement
|
|
203
203
|
})),
|
|
@@ -210,7 +210,7 @@ describe('<NumberInput />', () => {
|
|
|
210
210
|
});
|
|
211
211
|
it('does not call onDecrement when `interaction` is set to readonly', async () => {
|
|
212
212
|
const onDecrement = _vitest.vi.fn();
|
|
213
|
-
const _render8 = (0, _react2.render)(
|
|
213
|
+
const _render8 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
214
214
|
renderLabel: "Label",
|
|
215
215
|
interaction: "readonly",
|
|
216
216
|
onDecrement: onDecrement
|
|
@@ -224,7 +224,7 @@ describe('<NumberInput />', () => {
|
|
|
224
224
|
});
|
|
225
225
|
it('does not call onDecrement when `readOnly` is set', async () => {
|
|
226
226
|
const onDecrement = _vitest.vi.fn();
|
|
227
|
-
const _render9 = (0, _react2.render)(
|
|
227
|
+
const _render9 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement(_index.NumberInput, {
|
|
228
228
|
renderLabel: "Label",
|
|
229
229
|
readOnly: true,
|
|
230
230
|
onDecrement: onDecrement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-number-input",
|
|
3
|
-
"version": "10.2.3-snapshot-
|
|
3
|
+
"version": "10.2.3-snapshot-15",
|
|
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,26 +23,26 @@
|
|
|
23
23
|
"ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "10.2.3-snapshot-
|
|
27
|
-
"@instructure/ui-babel-preset": "10.2.3-snapshot-
|
|
28
|
-
"@instructure/ui-scripts": "10.2.3-snapshot-
|
|
29
|
-
"@instructure/ui-test-utils": "10.2.3-snapshot-
|
|
30
|
-
"@instructure/ui-themes": "10.2.3-snapshot-
|
|
26
|
+
"@instructure/ui-axe-check": "10.2.3-snapshot-15",
|
|
27
|
+
"@instructure/ui-babel-preset": "10.2.3-snapshot-15",
|
|
28
|
+
"@instructure/ui-scripts": "10.2.3-snapshot-15",
|
|
29
|
+
"@instructure/ui-test-utils": "10.2.3-snapshot-15",
|
|
30
|
+
"@instructure/ui-themes": "10.2.3-snapshot-15",
|
|
31
31
|
"@testing-library/jest-dom": "^6.4.6",
|
|
32
|
-
"@testing-library/react": "^
|
|
32
|
+
"@testing-library/react": "^16.0.1",
|
|
33
33
|
"@testing-library/user-event": "^14.5.2",
|
|
34
|
-
"vitest": "^2.
|
|
34
|
+
"vitest": "^2.1.1"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@babel/runtime": "^7.
|
|
38
|
-
"@instructure/emotion": "10.2.3-snapshot-
|
|
39
|
-
"@instructure/shared-types": "10.2.3-snapshot-
|
|
40
|
-
"@instructure/ui-form-field": "10.2.3-snapshot-
|
|
41
|
-
"@instructure/ui-icons": "10.2.3-snapshot-
|
|
42
|
-
"@instructure/ui-react-utils": "10.2.3-snapshot-
|
|
43
|
-
"@instructure/ui-testable": "10.2.3-snapshot-
|
|
44
|
-
"@instructure/ui-utils": "10.2.3-snapshot-
|
|
45
|
-
"@instructure/uid": "10.2.3-snapshot-
|
|
37
|
+
"@babel/runtime": "^7.25.6",
|
|
38
|
+
"@instructure/emotion": "10.2.3-snapshot-15",
|
|
39
|
+
"@instructure/shared-types": "10.2.3-snapshot-15",
|
|
40
|
+
"@instructure/ui-form-field": "10.2.3-snapshot-15",
|
|
41
|
+
"@instructure/ui-icons": "10.2.3-snapshot-15",
|
|
42
|
+
"@instructure/ui-react-utils": "10.2.3-snapshot-15",
|
|
43
|
+
"@instructure/ui-testable": "10.2.3-snapshot-15",
|
|
44
|
+
"@instructure/ui-utils": "10.2.3-snapshot-15",
|
|
45
|
+
"@instructure/uid": "10.2.3-snapshot-15",
|
|
46
46
|
"keycode": "^2",
|
|
47
47
|
"prop-types": "^15.8.1"
|
|
48
48
|
},
|