@instructure/ui-number-input 10.26.1 → 11.0.0

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,9 +3,30 @@
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.26.1](https://github.com/instructure/instructure-ui/compare/v10.26.0...v10.26.1) (2025-10-06)
6
+ # [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
7
7
 
8
- **Note:** Version bump only for package @instructure/ui-number-input
8
+
9
+ ### Features
10
+
11
+ * **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * **many:** InstUI v11 contains the following breaking changes:
17
+ - React 16 and 17 are no longer supported
18
+ - remove `PropTypes` from all packages
19
+ - remove `CodeEditor` component
20
+ - remove `@instui/theme-registry` package
21
+ - remove `@testable`, `@experimental`, `@hack` decorators
22
+ - InstUISettingsProvider's `as` prop is removed
23
+ - `canvas.use()`, `canvasHighContrast.use()` functions are removed
24
+ - `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
25
+ - `variables` field on theme objects are removed
26
+ - remove deprecated props from Table: Row's `isStacked`, Body's
27
+ `isStacked`, `hover`, and `headers`
28
+ - `Table`'s `caption` prop is now required
29
+ - `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
9
30
 
10
31
 
11
32
 
@@ -1,4 +1,4 @@
1
- var _dec, _dec2, _dec3, _class, _NumberInput, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
1
+ var _dec, _dec2, _class, _NumberInput, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
2
2
  /*
3
3
  * The MIT License (MIT)
4
4
  *
@@ -27,13 +27,12 @@ import { Fragment, Component } from 'react';
27
27
  import keycode from 'keycode';
28
28
  import { FormField } from '@instructure/ui-form-field';
29
29
  import { IconArrowOpenDownLine, IconArrowOpenUpLine } from '@instructure/ui-icons';
30
- import { testable } from '@instructure/ui-testable';
31
30
  import { omitProps, pickProps, callRenderProp, getInteraction, withDeterministicId } from '@instructure/ui-react-utils';
32
31
  import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
33
32
  import { withStyle } from '@instructure/emotion';
34
33
  import generateStyle from './styles';
35
34
  import generateComponentTheme from './theme';
36
- import { allowedProps, propTypes } from './props';
35
+ import { allowedProps } from './props';
37
36
  import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
38
37
  /**
39
38
  ---
@@ -41,7 +40,7 @@ category: components
41
40
  id: NumberInput
42
41
  ---
43
42
  **/
44
- let NumberInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_NumberInput = class NumberInput extends Component {
43
+ let NumberInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_NumberInput = class NumberInput extends Component {
45
44
  constructor(...args) {
46
45
  super(...args);
47
46
  this.state = {
@@ -201,6 +200,7 @@ let NumberInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle
201
200
  id: this.id,
202
201
  elementRef: this.handleRef,
203
202
  margin: margin,
203
+ "data-cid": "NumberInput",
204
204
  children: _jsx("span", {
205
205
  css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.inputWidth,
206
206
  style: width ? {
@@ -230,7 +230,7 @@ let NumberInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle
230
230
  })
231
231
  });
232
232
  }
233
- }, _NumberInput.displayName = "NumberInput", _NumberInput.componentId = 'NumberInput', _NumberInput.allowedProps = allowedProps, _NumberInput.propTypes = propTypes, _NumberInput.defaultProps = {
233
+ }, _NumberInput.displayName = "NumberInput", _NumberInput.componentId = 'NumberInput', _NumberInput.allowedProps = allowedProps, _NumberInput.defaultProps = {
234
234
  // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
235
235
  interaction: void 0,
236
236
  messages: [],
@@ -241,6 +241,6 @@ let NumberInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle
241
241
  textAlign: 'start',
242
242
  inputMode: 'numeric',
243
243
  allowStringValue: false
244
- }, _NumberInput)) || _class) || _class) || _class);
244
+ }, _NumberInput)) || _class) || _class);
245
245
  export default NumberInput;
246
246
  export { NumberInput };
@@ -22,35 +22,5 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import PropTypes from 'prop-types';
26
- import { FormPropTypes } from '@instructure/ui-form-field';
27
- const propTypes = {
28
- renderLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
29
- id: PropTypes.string,
30
- interaction: PropTypes.oneOf(['enabled', 'disabled', 'readonly']),
31
- messages: PropTypes.arrayOf(FormPropTypes.message),
32
- placeholder: PropTypes.string,
33
- isRequired: PropTypes.bool,
34
- showArrows: PropTypes.bool,
35
- size: PropTypes.oneOf(['medium', 'large']),
36
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
37
- width: PropTypes.string,
38
- display: PropTypes.oneOf(['inline-block', 'block']),
39
- inputRef: PropTypes.func,
40
- onFocus: PropTypes.func,
41
- onBlur: PropTypes.func,
42
- onChange: PropTypes.func,
43
- onDecrement: PropTypes.func,
44
- onIncrement: PropTypes.func,
45
- onKeyDown: PropTypes.func,
46
- inputMode: PropTypes.oneOf(['numeric', 'decimal', 'tel']),
47
- textAlign: PropTypes.oneOf(['start', 'center']),
48
- allowStringValue: PropTypes.bool,
49
- renderIcons: PropTypes.shape({
50
- increase: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
51
- decrease: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired
52
- }),
53
- margin: PropTypes.string
54
- };
55
25
  const allowedProps = ['renderLabel', 'id', 'interaction', 'messages', 'placeholder', 'isRequired', 'showArrows', 'size', 'value', 'width', 'display', 'inputRef', 'onFocus', 'onBlur', 'onChange', 'onDecrement', 'onIncrement', 'onKeyDown', 'inputMode', 'textAlign', 'allowStringValue', 'renderIcons', 'margin'];
56
- export { propTypes, allowedProps };
26
+ export { allowedProps };
@@ -10,7 +10,6 @@ var _keycode = _interopRequireDefault(require("keycode"));
10
10
  var _FormField = require("@instructure/ui-form-field/lib/FormField");
11
11
  var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDownLine.js");
12
12
  var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
13
- var _testable = require("@instructure/ui-testable/lib/testable.js");
14
13
  var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
15
14
  var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
16
15
  var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
@@ -22,7 +21,7 @@ var _styles = _interopRequireDefault(require("./styles"));
22
21
  var _theme = _interopRequireDefault(require("./theme"));
23
22
  var _props = require("./props");
24
23
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
25
- var _dec, _dec2, _dec3, _class, _NumberInput, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
24
+ var _dec, _dec2, _class, _NumberInput, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
26
25
  /*
27
26
  * The MIT License (MIT)
28
27
  *
@@ -52,7 +51,7 @@ category: components
52
51
  id: NumberInput
53
52
  ---
54
53
  **/
55
- let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_NumberInput = class NumberInput extends _react.Component {
54
+ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_NumberInput = class NumberInput extends _react.Component {
56
55
  constructor(...args) {
57
56
  super(...args);
58
57
  this.state = {
@@ -212,6 +211,7 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
212
211
  id: this.id,
213
212
  elementRef: this.handleRef,
214
213
  margin: margin,
214
+ "data-cid": "NumberInput",
215
215
  children: (0, _jsxRuntime.jsx)("span", {
216
216
  css: (_this$props$styles4 = this.props.styles) === null || _this$props$styles4 === void 0 ? void 0 : _this$props$styles4.inputWidth,
217
217
  style: width ? {
@@ -241,7 +241,7 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
241
241
  })
242
242
  });
243
243
  }
244
- }, _NumberInput.displayName = "NumberInput", _NumberInput.componentId = 'NumberInput', _NumberInput.allowedProps = _props.allowedProps, _NumberInput.propTypes = _props.propTypes, _NumberInput.defaultProps = {
244
+ }, _NumberInput.displayName = "NumberInput", _NumberInput.componentId = 'NumberInput', _NumberInput.allowedProps = _props.allowedProps, _NumberInput.defaultProps = {
245
245
  // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
246
246
  interaction: void 0,
247
247
  messages: [],
@@ -252,5 +252,5 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
252
252
  textAlign: 'start',
253
253
  inputMode: 'numeric',
254
254
  allowStringValue: false
255
- }, _NumberInput)) || _class) || _class) || _class);
255
+ }, _NumberInput)) || _class) || _class);
256
256
  var _default = exports.default = NumberInput;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.propTypes = exports.allowedProps = void 0;
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
6
+ exports.allowedProps = void 0;
10
7
  /*
11
8
  * The MIT License (MIT)
12
9
  *
@@ -31,32 +28,4 @@ var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
31
28
  * SOFTWARE.
32
29
  */
33
30
 
34
- const propTypes = exports.propTypes = {
35
- renderLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
36
- id: _propTypes.default.string,
37
- interaction: _propTypes.default.oneOf(['enabled', 'disabled', 'readonly']),
38
- messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
39
- placeholder: _propTypes.default.string,
40
- isRequired: _propTypes.default.bool,
41
- showArrows: _propTypes.default.bool,
42
- size: _propTypes.default.oneOf(['medium', 'large']),
43
- value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
44
- width: _propTypes.default.string,
45
- display: _propTypes.default.oneOf(['inline-block', 'block']),
46
- inputRef: _propTypes.default.func,
47
- onFocus: _propTypes.default.func,
48
- onBlur: _propTypes.default.func,
49
- onChange: _propTypes.default.func,
50
- onDecrement: _propTypes.default.func,
51
- onIncrement: _propTypes.default.func,
52
- onKeyDown: _propTypes.default.func,
53
- inputMode: _propTypes.default.oneOf(['numeric', 'decimal', 'tel']),
54
- textAlign: _propTypes.default.oneOf(['start', 'center']),
55
- allowStringValue: _propTypes.default.bool,
56
- renderIcons: _propTypes.default.shape({
57
- increase: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
58
- decrease: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired
59
- }),
60
- margin: _propTypes.default.string
61
- };
62
31
  const allowedProps = exports.allowedProps = ['renderLabel', 'id', 'interaction', 'messages', 'placeholder', 'isRequired', 'showArrows', 'size', 'value', 'width', 'display', 'inputRef', 'onFocus', 'onBlur', 'onChange', 'onDecrement', 'onIncrement', 'onKeyDown', 'inputMode', 'textAlign', 'allowStringValue', 'renderIcons', 'margin'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-number-input",
3
- "version": "10.26.1",
3
+ "version": "11.0.0",
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,29 +23,27 @@
23
23
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
24
24
  },
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "10.26.1",
27
- "@instructure/ui-scripts": "10.26.1",
28
- "@instructure/ui-themes": "10.26.1",
26
+ "@instructure/ui-babel-preset": "11.0.0",
27
+ "@instructure/ui-scripts": "11.0.0",
28
+ "@instructure/ui-themes": "11.0.0",
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
- "@testing-library/react": "^16.0.1",
30
+ "@testing-library/react": "15.0.7",
31
31
  "@testing-library/user-event": "^14.6.1",
32
32
  "vitest": "^3.2.2"
33
33
  },
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.27.6",
36
- "@instructure/emotion": "10.26.1",
37
- "@instructure/shared-types": "10.26.1",
38
- "@instructure/ui-form-field": "10.26.1",
39
- "@instructure/ui-icons": "10.26.1",
40
- "@instructure/ui-react-utils": "10.26.1",
41
- "@instructure/ui-testable": "10.26.1",
42
- "@instructure/ui-utils": "10.26.1",
43
- "@instructure/uid": "10.26.1",
44
- "keycode": "^2",
45
- "prop-types": "^15.8.1"
36
+ "@instructure/emotion": "11.0.0",
37
+ "@instructure/shared-types": "11.0.0",
38
+ "@instructure/ui-form-field": "11.0.0",
39
+ "@instructure/ui-icons": "11.0.0",
40
+ "@instructure/ui-react-utils": "11.0.0",
41
+ "@instructure/ui-utils": "11.0.0",
42
+ "@instructure/uid": "11.0.0",
43
+ "keycode": "^2"
46
44
  },
47
45
  "peerDependencies": {
48
- "react": ">=16.14 <=18"
46
+ "react": ">=18 <=19"
49
47
  },
50
48
  "publishConfig": {
51
49
  "access": "public"
@@ -30,7 +30,6 @@ import {
30
30
  IconArrowOpenDownLine,
31
31
  IconArrowOpenUpLine
32
32
  } from '@instructure/ui-icons'
33
- import { testable } from '@instructure/ui-testable'
34
33
  import {
35
34
  omitProps,
36
35
  pickProps,
@@ -45,7 +44,7 @@ import { withStyle } from '@instructure/emotion'
45
44
  import generateStyle from './styles'
46
45
  import generateComponentTheme from './theme'
47
46
 
48
- import { allowedProps, propTypes } from './props'
47
+ import { allowedProps } from './props'
49
48
  import type {
50
49
  NumberInputProps,
51
50
  NumberInputState,
@@ -61,11 +60,9 @@ id: NumberInput
61
60
  **/
62
61
  @withDeterministicId()
63
62
  @withStyle(generateStyle, generateComponentTheme)
64
- @testable()
65
63
  class NumberInput extends Component<NumberInputProps, NumberInputState> {
66
64
  static readonly componentId = 'NumberInput'
67
65
  static allowedProps = allowedProps
68
- static propTypes = propTypes
69
66
  static defaultProps = {
70
67
  // Leave interaction default undefined so that `disabled` and `readOnly` can also be supplied
71
68
  interaction: undefined,
@@ -279,6 +276,7 @@ class NumberInput extends Component<NumberInputProps, NumberInputState> {
279
276
  id={this.id}
280
277
  elementRef={this.handleRef}
281
278
  margin={margin}
279
+ data-cid="NumberInput"
282
280
  >
283
281
  <span
284
282
  css={this.props.styles?.inputWidth}
@@ -24,12 +24,8 @@
24
24
 
25
25
  import React from 'react'
26
26
  import type { InputHTMLAttributes } from 'react'
27
- import PropTypes from 'prop-types'
28
-
29
- import { FormPropTypes } from '@instructure/ui-form-field'
30
27
 
31
28
  import type {
32
- PropValidators,
33
29
  NumberInputTheme,
34
30
  OtherHTMLAttributes,
35
31
  PickPropsWithExceptions
@@ -220,36 +216,6 @@ type NumberInputStyle = ComponentStyle<
220
216
  | 'input'
221
217
  | 'requiredInvalid'
222
218
  >
223
-
224
- const propTypes: PropValidators<PropKeys> = {
225
- renderLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
226
- id: PropTypes.string,
227
- interaction: PropTypes.oneOf(['enabled', 'disabled', 'readonly']),
228
- messages: PropTypes.arrayOf(FormPropTypes.message),
229
- placeholder: PropTypes.string,
230
- isRequired: PropTypes.bool,
231
- showArrows: PropTypes.bool,
232
- size: PropTypes.oneOf(['medium', 'large']),
233
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
234
- width: PropTypes.string,
235
- display: PropTypes.oneOf(['inline-block', 'block']),
236
- inputRef: PropTypes.func,
237
- onFocus: PropTypes.func,
238
- onBlur: PropTypes.func,
239
- onChange: PropTypes.func,
240
- onDecrement: PropTypes.func,
241
- onIncrement: PropTypes.func,
242
- onKeyDown: PropTypes.func,
243
- inputMode: PropTypes.oneOf(['numeric', 'decimal', 'tel']),
244
- textAlign: PropTypes.oneOf(['start', 'center']),
245
- allowStringValue: PropTypes.bool,
246
- renderIcons: PropTypes.shape({
247
- increase: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
248
- decrease: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired
249
- }),
250
- margin: PropTypes.string
251
- }
252
-
253
219
  const allowedProps: AllowedPropKeys = [
254
220
  'renderLabel',
255
221
  'id',
@@ -282,4 +248,4 @@ export type {
282
248
  NumberInputStyleProps,
283
249
  NumberInputStyle
284
250
  }
285
- export { propTypes, allowedProps }
251
+ export { allowedProps }
@@ -15,7 +15,6 @@
15
15
  { "path": "../ui-form-field/tsconfig.build.json" },
16
16
  { "path": "../ui-icons/tsconfig.build.json" },
17
17
  { "path": "../ui-react-utils/tsconfig.build.json" },
18
- { "path": "../ui-testable/tsconfig.build.json" },
19
18
  { "path": "../ui-utils/tsconfig.build.json" },
20
19
  { "path": "../uid/tsconfig.build.json" }
21
20
  ]