@instructure/ui-range-input 8.25.1-snapshot-10 → 8.25.1-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 +1 -1
- package/es/RangeInput/index.js +48 -53
- package/lib/RangeInput/index.js +48 -53
- package/package.json +18 -18
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
|
-
## [8.25.1-snapshot-
|
|
6
|
+
## [8.25.1-snapshot-15](https://github.com/instructure/instructure-ui/compare/v8.25.0...v8.25.1-snapshot-15) (2022-06-23)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-range-input
|
|
9
9
|
|
package/es/RangeInput/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2, _dec3, _class;
|
|
1
|
+
var _dec, _dec2, _dec3, _class, _class2;
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* The MIT License (MIT)
|
|
@@ -43,37 +43,36 @@ category: components
|
|
|
43
43
|
@tsProps
|
|
44
44
|
**/
|
|
45
45
|
|
|
46
|
-
let RangeInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = class RangeInput extends Component {
|
|
47
|
-
static displayName = "RangeInput";
|
|
48
|
-
static componentId = 'RangeInput';
|
|
49
|
-
static allowedProps = allowedProps;
|
|
50
|
-
static propTypes = propTypes;
|
|
51
|
-
static defaultProps = {
|
|
52
|
-
step: 1,
|
|
53
|
-
formatValue: val => val,
|
|
54
|
-
// If min and max has default value, they don't give a warning if not set, even if they are required props.
|
|
55
|
-
// TODO: figure out if they don't need to be required or remove defaults in V9.
|
|
56
|
-
max: 0,
|
|
57
|
-
min: 0,
|
|
58
|
-
inline: false,
|
|
59
|
-
size: 'medium',
|
|
60
|
-
layout: 'stacked',
|
|
61
|
-
displayValue: true,
|
|
62
|
-
disabled: false,
|
|
63
|
-
readOnly: false,
|
|
64
|
-
thumbVariant: 'deprecated'
|
|
65
|
-
};
|
|
66
|
-
ref = null;
|
|
67
|
-
_input = null;
|
|
68
|
-
_inputListener = null;
|
|
69
|
-
_changeListener = null;
|
|
70
|
-
defaultId;
|
|
71
|
-
handleRef = el => {
|
|
72
|
-
this.ref = el;
|
|
73
|
-
};
|
|
74
|
-
|
|
46
|
+
let RangeInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec3 = testable(), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = class RangeInput extends Component {
|
|
75
47
|
constructor(props) {
|
|
76
48
|
super(props);
|
|
49
|
+
this.ref = null;
|
|
50
|
+
this._input = null;
|
|
51
|
+
this._inputListener = null;
|
|
52
|
+
this._changeListener = null;
|
|
53
|
+
this.defaultId = void 0;
|
|
54
|
+
|
|
55
|
+
this.handleRef = el => {
|
|
56
|
+
this.ref = el;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
this.handleChange = event => {
|
|
60
|
+
const _this$props = this.props,
|
|
61
|
+
onChange = _this$props.onChange,
|
|
62
|
+
value = _this$props.value;
|
|
63
|
+
|
|
64
|
+
if (typeof value === 'undefined') {
|
|
65
|
+
this.setState({
|
|
66
|
+
value: event.target.value
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (typeof onChange === 'function') {
|
|
71
|
+
onChange(event.target.value);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
this.noopChange = () => {};
|
|
77
76
|
|
|
78
77
|
if (typeof props.value === 'undefined') {
|
|
79
78
|
this.state = {
|
|
@@ -87,9 +86,9 @@ let RangeInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
87
86
|
|
|
88
87
|
|
|
89
88
|
componentDidMount() {
|
|
90
|
-
var _this$props$makeStyle, _this$
|
|
89
|
+
var _this$props$makeStyle, _this$props2;
|
|
91
90
|
|
|
92
|
-
(_this$props$makeStyle = (_this$
|
|
91
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
93
92
|
|
|
94
93
|
if (this._input !== null) {
|
|
95
94
|
// https://connect.microsoft.com/IE/Feedback/Details/856998
|
|
@@ -112,29 +111,11 @@ let RangeInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
112
111
|
|
|
113
112
|
|
|
114
113
|
componentDidUpdate() {
|
|
115
|
-
var _this$props$makeStyle2, _this$
|
|
114
|
+
var _this$props$makeStyle2, _this$props3;
|
|
116
115
|
|
|
117
|
-
(_this$props$makeStyle2 = (_this$
|
|
116
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
handleChange = event => {
|
|
121
|
-
const _this$props3 = this.props,
|
|
122
|
-
onChange = _this$props3.onChange,
|
|
123
|
-
value = _this$props3.value;
|
|
124
|
-
|
|
125
|
-
if (typeof value === 'undefined') {
|
|
126
|
-
this.setState({
|
|
127
|
-
value: event.target.value
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (typeof onChange === 'function') {
|
|
132
|
-
onChange(event.target.value);
|
|
133
|
-
}
|
|
134
|
-
}; // controlled input must have an onChange, but we're handling it with native events
|
|
135
|
-
|
|
136
|
-
noopChange = () => {};
|
|
137
|
-
|
|
138
119
|
get value() {
|
|
139
120
|
const value = typeof this.props.value === 'undefined' ? this.state.value : this.props.value;
|
|
140
121
|
return typeof value === 'string' ? parseInt(value) : value;
|
|
@@ -211,6 +192,20 @@ let RangeInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
211
192
|
/* eslint-enable jsx-a11y/no-redundant-roles */
|
|
212
193
|
}
|
|
213
194
|
|
|
214
|
-
}
|
|
195
|
+
}, _class2.displayName = "RangeInput", _class2.componentId = 'RangeInput', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
|
|
196
|
+
step: 1,
|
|
197
|
+
formatValue: val => val,
|
|
198
|
+
// If min and max has default value, they don't give a warning if not set, even if they are required props.
|
|
199
|
+
// TODO: figure out if they don't need to be required or remove defaults in V9.
|
|
200
|
+
max: 0,
|
|
201
|
+
min: 0,
|
|
202
|
+
inline: false,
|
|
203
|
+
size: 'medium',
|
|
204
|
+
layout: 'stacked',
|
|
205
|
+
displayValue: true,
|
|
206
|
+
disabled: false,
|
|
207
|
+
readOnly: false,
|
|
208
|
+
thumbVariant: 'deprecated'
|
|
209
|
+
}, _class2)) || _class) || _class) || _class);
|
|
215
210
|
export default RangeInput;
|
|
216
211
|
export { RangeInput };
|
package/lib/RangeInput/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
35
35
|
|
|
36
36
|
var _props = require("./props");
|
|
37
37
|
|
|
38
|
-
var _dec, _dec2, _dec3, _class;
|
|
38
|
+
var _dec, _dec2, _dec3, _class, _class2;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
---
|
|
@@ -43,37 +43,36 @@ category: components
|
|
|
43
43
|
---
|
|
44
44
|
@tsProps
|
|
45
45
|
**/
|
|
46
|
-
let RangeInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec3 = (0, _testable.testable)(), _dec(_class = _dec2(_class = _dec3(_class = class RangeInput extends _react.Component {
|
|
47
|
-
static displayName = "RangeInput";
|
|
48
|
-
static componentId = 'RangeInput';
|
|
49
|
-
static allowedProps = _props.allowedProps;
|
|
50
|
-
static propTypes = _props.propTypes;
|
|
51
|
-
static defaultProps = {
|
|
52
|
-
step: 1,
|
|
53
|
-
formatValue: val => val,
|
|
54
|
-
// If min and max has default value, they don't give a warning if not set, even if they are required props.
|
|
55
|
-
// TODO: figure out if they don't need to be required or remove defaults in V9.
|
|
56
|
-
max: 0,
|
|
57
|
-
min: 0,
|
|
58
|
-
inline: false,
|
|
59
|
-
size: 'medium',
|
|
60
|
-
layout: 'stacked',
|
|
61
|
-
displayValue: true,
|
|
62
|
-
disabled: false,
|
|
63
|
-
readOnly: false,
|
|
64
|
-
thumbVariant: 'deprecated'
|
|
65
|
-
};
|
|
66
|
-
ref = null;
|
|
67
|
-
_input = null;
|
|
68
|
-
_inputListener = null;
|
|
69
|
-
_changeListener = null;
|
|
70
|
-
defaultId;
|
|
71
|
-
handleRef = el => {
|
|
72
|
-
this.ref = el;
|
|
73
|
-
};
|
|
74
|
-
|
|
46
|
+
let 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 {
|
|
75
47
|
constructor(props) {
|
|
76
48
|
super(props);
|
|
49
|
+
this.ref = null;
|
|
50
|
+
this._input = null;
|
|
51
|
+
this._inputListener = null;
|
|
52
|
+
this._changeListener = null;
|
|
53
|
+
this.defaultId = void 0;
|
|
54
|
+
|
|
55
|
+
this.handleRef = el => {
|
|
56
|
+
this.ref = el;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
this.handleChange = event => {
|
|
60
|
+
const _this$props = this.props,
|
|
61
|
+
onChange = _this$props.onChange,
|
|
62
|
+
value = _this$props.value;
|
|
63
|
+
|
|
64
|
+
if (typeof value === 'undefined') {
|
|
65
|
+
this.setState({
|
|
66
|
+
value: event.target.value
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (typeof onChange === 'function') {
|
|
71
|
+
onChange(event.target.value);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
this.noopChange = () => {};
|
|
77
76
|
|
|
78
77
|
if (typeof props.value === 'undefined') {
|
|
79
78
|
this.state = {
|
|
@@ -87,9 +86,9 @@ let RangeInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2
|
|
|
87
86
|
|
|
88
87
|
|
|
89
88
|
componentDidMount() {
|
|
90
|
-
var _this$props$makeStyle, _this$
|
|
89
|
+
var _this$props$makeStyle, _this$props2;
|
|
91
90
|
|
|
92
|
-
(_this$props$makeStyle = (_this$
|
|
91
|
+
(_this$props$makeStyle = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props2);
|
|
93
92
|
|
|
94
93
|
if (this._input !== null) {
|
|
95
94
|
// https://connect.microsoft.com/IE/Feedback/Details/856998
|
|
@@ -112,29 +111,11 @@ let RangeInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2
|
|
|
112
111
|
|
|
113
112
|
|
|
114
113
|
componentDidUpdate() {
|
|
115
|
-
var _this$props$makeStyle2, _this$
|
|
114
|
+
var _this$props$makeStyle2, _this$props3;
|
|
116
115
|
|
|
117
|
-
(_this$props$makeStyle2 = (_this$
|
|
116
|
+
(_this$props$makeStyle2 = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props3);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
handleChange = event => {
|
|
121
|
-
const _this$props3 = this.props,
|
|
122
|
-
onChange = _this$props3.onChange,
|
|
123
|
-
value = _this$props3.value;
|
|
124
|
-
|
|
125
|
-
if (typeof value === 'undefined') {
|
|
126
|
-
this.setState({
|
|
127
|
-
value: event.target.value
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (typeof onChange === 'function') {
|
|
132
|
-
onChange(event.target.value);
|
|
133
|
-
}
|
|
134
|
-
}; // controlled input must have an onChange, but we're handling it with native events
|
|
135
|
-
|
|
136
|
-
noopChange = () => {};
|
|
137
|
-
|
|
138
119
|
get value() {
|
|
139
120
|
const value = typeof this.props.value === 'undefined' ? this.state.value : this.props.value;
|
|
140
121
|
return typeof value === 'string' ? parseInt(value) : value;
|
|
@@ -211,7 +192,21 @@ let RangeInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2
|
|
|
211
192
|
/* eslint-enable jsx-a11y/no-redundant-roles */
|
|
212
193
|
}
|
|
213
194
|
|
|
214
|
-
}
|
|
195
|
+
}, _class2.displayName = "RangeInput", _class2.componentId = 'RangeInput', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
|
|
196
|
+
step: 1,
|
|
197
|
+
formatValue: val => val,
|
|
198
|
+
// If min and max has default value, they don't give a warning if not set, even if they are required props.
|
|
199
|
+
// TODO: figure out if they don't need to be required or remove defaults in V9.
|
|
200
|
+
max: 0,
|
|
201
|
+
min: 0,
|
|
202
|
+
inline: false,
|
|
203
|
+
size: 'medium',
|
|
204
|
+
layout: 'stacked',
|
|
205
|
+
displayValue: true,
|
|
206
|
+
disabled: false,
|
|
207
|
+
readOnly: false,
|
|
208
|
+
thumbVariant: 'deprecated'
|
|
209
|
+
}, _class2)) || _class) || _class) || _class);
|
|
215
210
|
exports.RangeInput = RangeInput;
|
|
216
211
|
var _default = RangeInput;
|
|
217
212
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-range-input",
|
|
3
|
-
"version": "8.25.1-snapshot-
|
|
3
|
+
"version": "8.25.1-snapshot-15",
|
|
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.13.10",
|
|
27
|
-
"@instructure/console": "8.25.1-snapshot-
|
|
28
|
-
"@instructure/emotion": "8.25.1-snapshot-
|
|
29
|
-
"@instructure/shared-types": "8.25.1-snapshot-
|
|
30
|
-
"@instructure/ui-color-utils": "8.25.1-snapshot-
|
|
31
|
-
"@instructure/ui-dom-utils": "8.25.1-snapshot-
|
|
32
|
-
"@instructure/ui-form-field": "8.25.1-snapshot-
|
|
33
|
-
"@instructure/ui-i18n": "8.25.1-snapshot-
|
|
34
|
-
"@instructure/ui-prop-types": "8.25.1-snapshot-
|
|
35
|
-
"@instructure/ui-react-utils": "8.25.1-snapshot-
|
|
36
|
-
"@instructure/ui-testable": "8.25.1-snapshot-
|
|
37
|
-
"@instructure/ui-utils": "8.25.1-snapshot-
|
|
38
|
-
"@instructure/ui-view": "8.25.1-snapshot-
|
|
39
|
-
"@instructure/uid": "8.25.1-snapshot-
|
|
27
|
+
"@instructure/console": "8.25.1-snapshot-15",
|
|
28
|
+
"@instructure/emotion": "8.25.1-snapshot-15",
|
|
29
|
+
"@instructure/shared-types": "8.25.1-snapshot-15",
|
|
30
|
+
"@instructure/ui-color-utils": "8.25.1-snapshot-15",
|
|
31
|
+
"@instructure/ui-dom-utils": "8.25.1-snapshot-15",
|
|
32
|
+
"@instructure/ui-form-field": "8.25.1-snapshot-15",
|
|
33
|
+
"@instructure/ui-i18n": "8.25.1-snapshot-15",
|
|
34
|
+
"@instructure/ui-prop-types": "8.25.1-snapshot-15",
|
|
35
|
+
"@instructure/ui-react-utils": "8.25.1-snapshot-15",
|
|
36
|
+
"@instructure/ui-testable": "8.25.1-snapshot-15",
|
|
37
|
+
"@instructure/ui-utils": "8.25.1-snapshot-15",
|
|
38
|
+
"@instructure/ui-view": "8.25.1-snapshot-15",
|
|
39
|
+
"@instructure/uid": "8.25.1-snapshot-15",
|
|
40
40
|
"prop-types": "^15"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@instructure/ui-babel-preset": "8.25.1-snapshot-
|
|
44
|
-
"@instructure/ui-test-locator": "8.25.1-snapshot-
|
|
45
|
-
"@instructure/ui-test-utils": "8.25.1-snapshot-
|
|
46
|
-
"@instructure/ui-themes": "8.25.1-snapshot-
|
|
43
|
+
"@instructure/ui-babel-preset": "8.25.1-snapshot-15",
|
|
44
|
+
"@instructure/ui-test-locator": "8.25.1-snapshot-15",
|
|
45
|
+
"@instructure/ui-test-utils": "8.25.1-snapshot-15",
|
|
46
|
+
"@instructure/ui-themes": "8.25.1-snapshot-15"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=16.8 <=17"
|