@instructure/ui-range-input 8.56.4 → 8.56.5-pr-snapshot-1728655013879

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
+ ## [8.56.5-pr-snapshot-1728655013879](https://github.com/instructure/instructure-ui/compare/v8.56.4...v8.56.5-pr-snapshot-1728655013879) (2024-10-11)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-range-input
9
+
10
+
11
+
12
+
13
+
6
14
  ## [8.56.4](https://github.com/instructure/instructure-ui/compare/v8.56.3...v8.56.4) (2024-10-02)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-range-input
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.RangeInputLocator = void 0;
7
- var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
7
+ var _uiTestLocator = require("@instructure/ui-test-locator");
8
8
  var _index = require("./index");
9
9
  /*
10
10
  * The MIT License (MIT)
@@ -31,7 +31,7 @@ var _index = require("./index");
31
31
  */
32
32
 
33
33
  // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
34
- const RangeInputLocator = exports.RangeInputLocator = (0, _locator.locator)(_index.RangeInput.selector, {
35
- findInput: (...args) => (0, _locator.locator)('input[type=range]').find(...args),
36
- findOutput: (...args) => (0, _locator.locator)('output').find(...args)
34
+ const RangeInputLocator = exports.RangeInputLocator = (0, _uiTestLocator.locator)(_index.RangeInput.selector, {
35
+ findInput: (...args) => (0, _uiTestLocator.locator)('input[type=range]').find(...args),
36
+ findOutput: (...args) => (0, _uiTestLocator.locator)('output').find(...args)
37
37
  });
@@ -8,14 +8,12 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = exports.RangeInput = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _console = require("@instructure/console");
11
- var _ContextView = require("@instructure/ui-view/lib/ContextView");
12
- var _FormField = require("@instructure/ui-form-field/lib/FormField");
13
- var _addEventListener = require("@instructure/ui-dom-utils/lib/addEventListener.js");
11
+ var _uiView = require("@instructure/ui-view");
12
+ var _uiFormField = require("@instructure/ui-form-field");
13
+ var _uiDomUtils = require("@instructure/ui-dom-utils");
14
14
  var _emotion = require("@instructure/emotion");
15
- var _testable = require("@instructure/ui-testable/lib/testable.js");
16
- var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
17
- var _pickProps = require("@instructure/ui-react-utils/lib/pickProps.js");
18
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
15
+ var _uiTestable = require("@instructure/ui-testable");
16
+ var _uiReactUtils = require("@instructure/ui-react-utils");
19
17
  var _styles = _interopRequireDefault(require("./styles"));
20
18
  var _theme = _interopRequireDefault(require("./theme"));
21
19
  var _props = require("./props");
@@ -49,7 +47,7 @@ var _dec, _dec2, _dec3, _class, _class2;
49
47
  category: components
50
48
  ---
51
49
  **/
52
- let RangeInput = exports.RangeInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class RangeInput extends _react.Component {
50
+ let RangeInput = exports.RangeInput = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _uiTestable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class RangeInput extends _react.Component {
53
51
  constructor(props) {
54
52
  super(props);
55
53
  this.ref = null;
@@ -89,8 +87,8 @@ let RangeInput = exports.RangeInput = (_dec = (0, _withDeterministicId.withDeter
89
87
  (_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
90
88
  if (this._input !== null) {
91
89
  // https://connect.microsoft.com/IE/Feedback/Details/856998
92
- this._inputListener = (0, _addEventListener.addEventListener)(this._input, 'input', this.handleChange);
93
- this._changeListener = (0, _addEventListener.addEventListener)(this._input, 'change', this.handleChange);
90
+ this._inputListener = (0, _uiDomUtils.addEventListener)(this._input, 'input', this.handleChange);
91
+ this._changeListener = (0, _uiDomUtils.addEventListener)(this._input, 'change', this.handleChange);
94
92
  }
95
93
  }
96
94
  componentWillUnmount() {
@@ -126,7 +124,7 @@ let RangeInput = exports.RangeInput = (_dec = (0, _withDeterministicId.withDeter
126
124
  (0, _console.warn)(false, 'RangeInput should have a `value` or `defaultValue` set for the value to be displayed. If no value has to be displayed, set `displayValue={false}`.');
127
125
  return null;
128
126
  }
129
- return (0, _emotion.jsx)(_ContextView.ContextView, {
127
+ return (0, _emotion.jsx)(_uiView.ContextView, {
130
128
  background: "inverse",
131
129
  placement: "end center"
132
130
  }, (0, _emotion.jsx)("output", {
@@ -142,10 +140,10 @@ let RangeInput = exports.RangeInput = (_dec = (0, _withDeterministicId.withDeter
142
140
  formatValue = _this$props4.formatValue,
143
141
  disabled = _this$props4.disabled,
144
142
  readOnly = _this$props4.readOnly;
145
- const props = (0, _omitProps.omitProps)(this.props, RangeInput.allowedProps);
143
+ const props = (0, _uiReactUtils.omitProps)(this.props, RangeInput.allowedProps);
146
144
 
147
145
  /* eslint-disable jsx-a11y/no-redundant-roles */
148
- return (0, _emotion.jsx)(_FormField.FormField, Object.assign({}, (0, _pickProps.pickProps)(this.props, _FormField.FormField.allowedProps), {
146
+ return (0, _emotion.jsx)(_uiFormField.FormField, Object.assign({}, (0, _uiReactUtils.pickProps)(this.props, _uiFormField.FormField.allowedProps), {
149
147
  label: this.props.label,
150
148
  id: this.id,
151
149
  elementRef: this.handleRef
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.propTypes = exports.allowedProps = void 0;
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
10
- var _deprecated = require("@instructure/ui-react-utils/lib/deprecated.js");
11
- var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
9
+ var _uiPropTypes = require("@instructure/ui-prop-types");
10
+ var _uiReactUtils = require("@instructure/ui-react-utils");
11
+ var _uiFormField = require("@instructure/ui-form-field");
12
12
  /*
13
13
  * The MIT License (MIT)
14
14
  *
@@ -37,9 +37,9 @@ const propTypes = exports.propTypes = {
37
37
  min: _propTypes.default.number.isRequired,
38
38
  max: _propTypes.default.number.isRequired,
39
39
  defaultValue: _propTypes.default.number,
40
- value: (0, _controllable.controllable)(_propTypes.default.number),
40
+ value: (0, _uiPropTypes.controllable)(_propTypes.default.number),
41
41
  onChange: _propTypes.default.func,
42
- messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
42
+ messages: _propTypes.default.arrayOf(_uiFormField.FormPropTypes.message),
43
43
  size: _propTypes.default.oneOf(['small', 'medium', 'large']),
44
44
  layout: _propTypes.default.oneOf(['stacked', 'inline']),
45
45
  id: _propTypes.default.string,
@@ -50,6 +50,6 @@ const propTypes = exports.propTypes = {
50
50
  inline: _propTypes.default.bool,
51
51
  disabled: _propTypes.default.bool,
52
52
  readOnly: _propTypes.default.bool,
53
- thumbVariant: _deprecated.deprecated.deprecatePropValues(_propTypes.default.oneOf(['deprecated', 'accessible']), ['deprecated'], 'The `deprecated` variant is not fully accessible and will be removed in V9. The connected theme variables will be removed as well: `handleShadowColor`, `handleFocusOutlineColor`, `handleFocusOutlineWidth`. Please use the `accessible` variant.')
53
+ thumbVariant: _uiReactUtils.deprecated.deprecatePropValues(_propTypes.default.oneOf(['deprecated', 'accessible']), ['deprecated'], 'The `deprecated` variant is not fully accessible and will be removed in V9. The connected theme variables will be removed as well: `handleShadowColor`, `handleFocusOutlineColor`, `handleFocusOutlineWidth`. Please use the `accessible` variant.')
54
54
  };
55
55
  const allowedProps = exports.allowedProps = ['min', 'max', 'defaultValue', 'value', 'onChange', 'messages', 'size', 'layout', 'id', 'label', 'displayValue', 'step', 'formatValue', 'inline', 'disabled', 'readOnly', 'thumbVariant'];
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _alpha = require("@instructure/ui-color-utils/lib/alpha.js");
8
- var _darken = require("@instructure/ui-color-utils/lib/darken.js");
7
+ var _uiColorUtils = require("@instructure/ui-color-utils");
9
8
  /*
10
9
  * The MIT License (MIT)
11
10
  *
@@ -48,8 +47,8 @@ const generateComponentTheme = theme => {
48
47
  handleHoverBackground: theme['ic-brand-primary'],
49
48
  handleFocusBackground: theme['ic-brand-primary'],
50
49
  // Deprecated, remove with "deprecated" thumbVariant
51
- handleShadowColor: (0, _darken.darken)(theme['ic-brand-primary'], 15),
52
- handleFocusOutlineColor: (0, _alpha.alpha)(theme['ic-brand-primary'], 40)
50
+ handleShadowColor: (0, _uiColorUtils.darken)(theme['ic-brand-primary'], 15),
51
+ handleFocusOutlineColor: (0, _uiColorUtils.alpha)(theme['ic-brand-primary'], 40)
53
52
  }
54
53
  };
55
54
  const componentVariables = {
@@ -65,8 +64,8 @@ const generateComponentTheme = theme => {
65
64
  handleFocusBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
66
65
  handleHoverBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundBrand,
67
66
  // Deprecated, remove with "deprecated" thumbVariant
68
- handleShadowColor: (0, _darken.darken)(colors === null || colors === void 0 ? void 0 : colors.borderBrand, 15),
69
- handleFocusOutlineColor: (0, _alpha.alpha)(colors === null || colors === void 0 ? void 0 : colors.borderBrand, 40),
67
+ handleShadowColor: (0, _uiColorUtils.darken)(colors === null || colors === void 0 ? void 0 : colors.borderBrand, 15),
68
+ handleFocusOutlineColor: (0, _uiColorUtils.alpha)(colors === null || colors === void 0 ? void 0 : colors.borderBrand, 40),
70
69
  handleFocusOutlineWidth: '0.75em',
71
70
  trackBackground: colors === null || colors === void 0 ? void 0 : colors.backgroundDark,
72
71
  valueColor: colors === null || colors === void 0 ? void 0 : colors.textLightest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-range-input",
3
- "version": "8.56.4",
3
+ "version": "8.56.5-pr-snapshot-1728655013879",
4
4
  "description": "A styled HTML range input",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,26 +24,26 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.23.2",
27
- "@instructure/console": "8.56.4",
28
- "@instructure/emotion": "8.56.4",
29
- "@instructure/shared-types": "8.56.4",
30
- "@instructure/ui-color-utils": "8.56.4",
31
- "@instructure/ui-dom-utils": "8.56.4",
32
- "@instructure/ui-form-field": "8.56.4",
33
- "@instructure/ui-i18n": "8.56.4",
34
- "@instructure/ui-prop-types": "8.56.4",
35
- "@instructure/ui-react-utils": "8.56.4",
36
- "@instructure/ui-testable": "8.56.4",
37
- "@instructure/ui-utils": "8.56.4",
38
- "@instructure/ui-view": "8.56.4",
39
- "@instructure/uid": "8.56.4",
27
+ "@instructure/console": "8.56.5-pr-snapshot-1728655013879",
28
+ "@instructure/emotion": "8.56.5-pr-snapshot-1728655013879",
29
+ "@instructure/shared-types": "8.56.5-pr-snapshot-1728655013879",
30
+ "@instructure/ui-color-utils": "8.56.5-pr-snapshot-1728655013879",
31
+ "@instructure/ui-dom-utils": "8.56.5-pr-snapshot-1728655013879",
32
+ "@instructure/ui-form-field": "8.56.5-pr-snapshot-1728655013879",
33
+ "@instructure/ui-i18n": "8.56.5-pr-snapshot-1728655013879",
34
+ "@instructure/ui-prop-types": "8.56.5-pr-snapshot-1728655013879",
35
+ "@instructure/ui-react-utils": "8.56.5-pr-snapshot-1728655013879",
36
+ "@instructure/ui-testable": "8.56.5-pr-snapshot-1728655013879",
37
+ "@instructure/ui-utils": "8.56.5-pr-snapshot-1728655013879",
38
+ "@instructure/ui-view": "8.56.5-pr-snapshot-1728655013879",
39
+ "@instructure/uid": "8.56.5-pr-snapshot-1728655013879",
40
40
  "prop-types": "^15.8.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@instructure/ui-babel-preset": "8.56.4",
44
- "@instructure/ui-test-locator": "8.56.4",
45
- "@instructure/ui-test-utils": "8.56.4",
46
- "@instructure/ui-themes": "8.56.4"
43
+ "@instructure/ui-babel-preset": "8.56.5-pr-snapshot-1728655013879",
44
+ "@instructure/ui-test-locator": "8.56.5-pr-snapshot-1728655013879",
45
+ "@instructure/ui-test-utils": "8.56.5-pr-snapshot-1728655013879",
46
+ "@instructure/ui-themes": "8.56.5-pr-snapshot-1728655013879"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": ">=16.8 <=18"