@instructure/ui-number-input 10.13.0 → 10.13.1-pr-snapshot-1741357986437

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,14 @@
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.13.1-pr-snapshot-1741357986437](https://github.com/instructure/instructure-ui/compare/v10.13.0...v10.13.1-pr-snapshot-1741357986437) (2025-03-07)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-number-input
9
+
10
+
11
+
12
+
13
+
6
14
  # [10.13.0](https://github.com/instructure/instructure-ui/compare/v10.12.0...v10.13.0) (2025-03-06)
7
15
 
8
16
 
@@ -5,13 +5,12 @@ var _react = _interopRequireDefault(require("react"));
5
5
  var _react2 = require("@testing-library/react");
6
6
  var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
7
7
  var _vitest = require("vitest");
8
- var _runAxeCheck = require("@instructure/ui-axe-check/lib/runAxeCheck.js");
8
+ var _uiAxeCheck = require("@instructure/ui-axe-check");
9
9
  require("@testing-library/jest-dom");
10
10
  var _index = require("../index");
11
11
  var _NumberInput5 = _interopRequireDefault(require("../__examples__/NumberInput.examples"));
12
12
  var _generateA11yTests = require("@instructure/ui-scripts/lib/test/generateA11yTests");
13
- var _IconZoomInLine2 = require("@instructure/ui-icons/lib/IconZoomInLine.js");
14
- var _IconZoomOutLine2 = require("@instructure/ui-icons/lib/IconZoomOutLine.js");
13
+ var _uiIcons = require("@instructure/ui-icons");
15
14
  var _NumberInput, _NumberInput2, _NumberInput3, _NumberInput4, _IconZoomInLine, _IconZoomOutLine;
16
15
  /*
17
16
  * The MIT License (MIT)
@@ -252,7 +251,7 @@ describe('<NumberInput />', () => {
252
251
  it(component.description, async () => {
253
252
  const _render10 = (0, _react2.render)(component.content),
254
253
  container = _render10.container;
255
- const axeCheck = await (0, _runAxeCheck.runAxeCheck)(container);
254
+ const axeCheck = await (0, _uiAxeCheck.runAxeCheck)(container);
256
255
  expect(axeCheck).toBe(true);
257
256
  });
258
257
  }
@@ -265,8 +264,8 @@ describe('<NumberInput />', () => {
265
264
  onIncrement: onIncrement,
266
265
  onDecrement: onDecrement,
267
266
  renderIcons: {
268
- increase: _IconZoomInLine || (_IconZoomInLine = /*#__PURE__*/_react.default.createElement(_IconZoomInLine2.IconZoomInLine, null)),
269
- decrease: _IconZoomOutLine || (_IconZoomOutLine = /*#__PURE__*/_react.default.createElement(_IconZoomOutLine2.IconZoomOutLine, null))
267
+ increase: _IconZoomInLine || (_IconZoomInLine = /*#__PURE__*/_react.default.createElement(_uiIcons.IconZoomInLine, null)),
268
+ decrease: _IconZoomOutLine || (_IconZoomOutLine = /*#__PURE__*/_react.default.createElement(_uiIcons.IconZoomOutLine, null))
270
269
  }
271
270
  })),
272
271
  container = _render11.container;
@@ -8,16 +8,11 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = exports.NumberInput = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _keycode = _interopRequireDefault(require("keycode"));
11
- var _FormField = require("@instructure/ui-form-field/lib/FormField");
12
- var _IconArrowOpenDownLine = require("@instructure/ui-icons/lib/IconArrowOpenDownLine.js");
13
- var _IconArrowOpenUpLine2 = require("@instructure/ui-icons/lib/IconArrowOpenUpLine.js");
14
- var _testable = require("@instructure/ui-testable/lib/testable.js");
15
- var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
16
- var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
17
- var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
18
- var _getInteraction = require("@instructure/ui-react-utils/lib/getInteraction.js");
19
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
20
- var _hasVisibleChildren = require("@instructure/ui-a11y-utils/lib/hasVisibleChildren.js");
11
+ var _uiFormField = require("@instructure/ui-form-field");
12
+ var _uiIcons = require("@instructure/ui-icons");
13
+ var _uiTestable = require("@instructure/ui-testable");
14
+ var _uiReactUtils = require("@instructure/ui-react-utils");
15
+ var _uiA11yUtils = require("@instructure/ui-a11y-utils");
21
16
  var _emotion = require("@instructure/emotion");
22
17
  var _styles = _interopRequireDefault(require("./styles"));
23
18
  var _theme = _interopRequireDefault(require("./theme"));
@@ -53,7 +48,7 @@ category: components
53
48
  id: NumberInput
54
49
  ---
55
50
  **/
56
- 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 {
51
+ let NumberInput = exports.NumberInput = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_NumberInput = class NumberInput extends _react.Component {
57
52
  constructor(...args) {
58
53
  super(...args);
59
54
  this.state = {
@@ -132,7 +127,7 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
132
127
  return !!this.props.messages && this.props.messages.some(message => message.type === 'error' || message.type === 'newError');
133
128
  }
134
129
  get interaction() {
135
- return (0, _getInteraction.getInteraction)({
130
+ return (0, _uiReactUtils.getInteraction)({
136
131
  props: this.props
137
132
  });
138
133
  }
@@ -172,13 +167,13 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
172
167
  onMouseDown: this.handleClickUpArrow,
173
168
  tabIndex: -1,
174
169
  type: "button"
175
- }, customIcons !== null && customIcons !== void 0 && customIcons.increase ? (0, _callRenderProp.callRenderProp)(customIcons.increase) : _IconArrowOpenUpLine || (_IconArrowOpenUpLine = (0, _emotion.jsx)(_IconArrowOpenUpLine2.IconArrowOpenUpLine, null))), (0, _emotion.jsx)("button", {
170
+ }, customIcons !== null && customIcons !== void 0 && customIcons.increase ? (0, _uiReactUtils.callRenderProp)(customIcons.increase) : _IconArrowOpenUpLine || (_IconArrowOpenUpLine = (0, _emotion.jsx)(_uiIcons.IconArrowOpenUpLine, null))), (0, _emotion.jsx)("button", {
176
171
  "aria-hidden": true,
177
172
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.arrow,
178
173
  onMouseDown: this.handleClickDownArrow,
179
174
  tabIndex: -1,
180
175
  type: "button"
181
- }, customIcons !== null && customIcons !== void 0 && customIcons.decrease ? (0, _callRenderProp.callRenderProp)(customIcons.decrease) : _IconArrowOpenDownLin || (_IconArrowOpenDownLin = (0, _emotion.jsx)(_IconArrowOpenDownLine.IconArrowOpenDownLine, null))));
176
+ }, customIcons !== null && customIcons !== void 0 && customIcons.decrease ? (0, _uiReactUtils.callRenderProp)(customIcons.decrease) : _IconArrowOpenDownLin || (_IconArrowOpenDownLin = (0, _emotion.jsx)(_uiIcons.IconArrowOpenDownLine, null))));
182
177
  }
183
178
  render() {
184
179
  var _this$props$styles4, _this$props$styles5, _this$props$styles6;
@@ -195,12 +190,12 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
195
190
  renderIcons = _this$props4.renderIcons,
196
191
  margin = _this$props4.margin;
197
192
  const interaction = this.interaction;
198
- const rawLabel = (0, _callRenderProp.callRenderProp)(renderLabel);
199
- const label = (0, _hasVisibleChildren.hasVisibleChildren)(rawLabel) ? (0, _emotion.jsx)(_react.default.Fragment, null, rawLabel, isRequired && (0, _emotion.jsx)("span", {
193
+ const rawLabel = (0, _uiReactUtils.callRenderProp)(renderLabel);
194
+ const label = (0, _uiA11yUtils.hasVisibleChildren)(rawLabel) ? (0, _emotion.jsx)(_react.default.Fragment, null, rawLabel, isRequired && (0, _emotion.jsx)("span", {
200
195
  css: this.invalid ? styles === null || styles === void 0 ? void 0 : styles.requiredInvalid : {},
201
196
  "aria-hidden": true
202
197
  }, ' ', "*")) : rawLabel;
203
- return (0, _emotion.jsx)(_FormField.FormField, Object.assign({}, (0, _pickProps.pickProps)(this.props, _FormField.FormField.allowedProps), {
198
+ return (0, _emotion.jsx)(_uiFormField.FormField, Object.assign({}, (0, _uiReactUtils.pickProps)(this.props, _uiFormField.FormField.allowedProps), {
204
199
  label: label,
205
200
  inline: display === 'inline-block',
206
201
  id: this.id,
@@ -213,7 +208,7 @@ let NumberInput = exports.NumberInput = (_dec = (0, _withDeterministicId.withDet
213
208
  } : void 0
214
209
  }, (0, _emotion.jsx)("span", {
215
210
  css: (_this$props$styles5 = this.props.styles) === null || _this$props$styles5 === void 0 ? void 0 : _this$props$styles5.inputContainer
216
- }, (0, _emotion.jsx)("input", Object.assign({}, (0, _omitProps.omitProps)(this.props, [..._FormField.FormField.allowedProps, ...NumberInput.allowedProps]), {
211
+ }, (0, _emotion.jsx)("input", Object.assign({}, (0, _uiReactUtils.omitProps)(this.props, [..._uiFormField.FormField.allowedProps, ...NumberInput.allowedProps]), {
217
212
  css: (_this$props$styles6 = this.props.styles) === null || _this$props$styles6 === void 0 ? void 0 : _this$props$styles6.input,
218
213
  "aria-invalid": this.invalid ? 'true' : void 0,
219
214
  id: this.id,
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.propTypes = exports.allowedProps = void 0;
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
9
+ var _uiFormField = require("@instructure/ui-form-field");
10
10
  /*
11
11
  * The MIT License (MIT)
12
12
  *
@@ -35,7 +35,7 @@ const propTypes = exports.propTypes = {
35
35
  renderLabel: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]).isRequired,
36
36
  id: _propTypes.default.string,
37
37
  interaction: _propTypes.default.oneOf(['enabled', 'disabled', 'readonly']),
38
- messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
38
+ messages: _propTypes.default.arrayOf(_uiFormField.FormPropTypes.message),
39
39
  placeholder: _propTypes.default.string,
40
40
  isRequired: _propTypes.default.bool,
41
41
  showArrows: _propTypes.default.bool,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-number-input",
3
- "version": "10.13.0",
3
+ "version": "10.13.1-pr-snapshot-1741357986437",
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,11 +23,11 @@
23
23
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
24
24
  },
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "10.13.0",
27
- "@instructure/ui-babel-preset": "10.13.0",
28
- "@instructure/ui-scripts": "10.13.0",
29
- "@instructure/ui-test-utils": "10.13.0",
30
- "@instructure/ui-themes": "10.13.0",
26
+ "@instructure/ui-axe-check": "10.13.1-pr-snapshot-1741357986437",
27
+ "@instructure/ui-babel-preset": "10.13.1-pr-snapshot-1741357986437",
28
+ "@instructure/ui-scripts": "10.13.1-pr-snapshot-1741357986437",
29
+ "@instructure/ui-test-utils": "10.13.1-pr-snapshot-1741357986437",
30
+ "@instructure/ui-themes": "10.13.1-pr-snapshot-1741357986437",
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "^16.0.1",
33
33
  "@testing-library/user-event": "^14.5.2",
@@ -35,14 +35,14 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.26.0",
38
- "@instructure/emotion": "10.13.0",
39
- "@instructure/shared-types": "10.13.0",
40
- "@instructure/ui-form-field": "10.13.0",
41
- "@instructure/ui-icons": "10.13.0",
42
- "@instructure/ui-react-utils": "10.13.0",
43
- "@instructure/ui-testable": "10.13.0",
44
- "@instructure/ui-utils": "10.13.0",
45
- "@instructure/uid": "10.13.0",
38
+ "@instructure/emotion": "10.13.1-pr-snapshot-1741357986437",
39
+ "@instructure/shared-types": "10.13.1-pr-snapshot-1741357986437",
40
+ "@instructure/ui-form-field": "10.13.1-pr-snapshot-1741357986437",
41
+ "@instructure/ui-icons": "10.13.1-pr-snapshot-1741357986437",
42
+ "@instructure/ui-react-utils": "10.13.1-pr-snapshot-1741357986437",
43
+ "@instructure/ui-testable": "10.13.1-pr-snapshot-1741357986437",
44
+ "@instructure/ui-utils": "10.13.1-pr-snapshot-1741357986437",
45
+ "@instructure/uid": "10.13.1-pr-snapshot-1741357986437",
46
46
  "keycode": "^2",
47
47
  "prop-types": "^15.8.1"
48
48
  },