@instructure/ui-range-input 8.10.3-snapshot.3 → 8.11.1-snapshot.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 +4 -0
- package/es/RangeInput/index.js +5 -3
- package/lib/RangeInput/index.js +5 -3
- package/package.json +19 -19
- package/src/RangeInput/index.tsx +5 -3
- package/src/RangeInput/props.ts +11 -2
- package/types/RangeInput/index.d.ts +1 -0
- package/types/RangeInput/index.d.ts.map +1 -1
- package/types/RangeInput/props.d.ts +3 -3
- package/types/RangeInput/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.11.0](https://github.com/instructure/instructure-ui/compare/v8.10.2...v8.11.0) (2021-10-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-range-input
|
|
9
|
+
|
|
6
10
|
## [8.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @instructure/ui-range-input
|
package/es/RangeInput/index.js
CHANGED
|
@@ -50,6 +50,10 @@ let RangeInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
50
50
|
this._inputListener = null;
|
|
51
51
|
this._changeListener = null;
|
|
52
52
|
|
|
53
|
+
this.handleRef = el => {
|
|
54
|
+
this.ref = el;
|
|
55
|
+
};
|
|
56
|
+
|
|
53
57
|
this.handleChange = event => {
|
|
54
58
|
const _this$props = this.props,
|
|
55
59
|
onChange = _this$props.onChange,
|
|
@@ -149,9 +153,7 @@ let RangeInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
149
153
|
|
|
150
154
|
return jsx(FormField, Object.assign({}, pickProps(this.props, FormField.allowedProps), {
|
|
151
155
|
id: this.id,
|
|
152
|
-
elementRef:
|
|
153
|
-
this.ref = el;
|
|
154
|
-
}
|
|
156
|
+
elementRef: this.handleRef
|
|
155
157
|
}), jsx("div", {
|
|
156
158
|
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.rangeInput
|
|
157
159
|
}, jsx("input", Object.assign({
|
package/lib/RangeInput/index.js
CHANGED
|
@@ -46,6 +46,10 @@ let RangeInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
46
46
|
this._inputListener = null;
|
|
47
47
|
this._changeListener = null;
|
|
48
48
|
|
|
49
|
+
this.handleRef = el => {
|
|
50
|
+
this.ref = el;
|
|
51
|
+
};
|
|
52
|
+
|
|
49
53
|
this.handleChange = event => {
|
|
50
54
|
const _this$props = this.props,
|
|
51
55
|
onChange = _this$props.onChange,
|
|
@@ -145,9 +149,7 @@ let RangeInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
145
149
|
|
|
146
150
|
return (0, _emotion.jsx)(_FormField.FormField, Object.assign({}, (0, _pickProps.pickProps)(this.props, _FormField.FormField.allowedProps), {
|
|
147
151
|
id: this.id,
|
|
148
|
-
elementRef:
|
|
149
|
-
this.ref = el;
|
|
150
|
-
}
|
|
152
|
+
elementRef: this.handleRef
|
|
151
153
|
}), (0, _emotion.jsx)("div", {
|
|
152
154
|
css: (_this$props$styles2 = this.props.styles) === null || _this$props$styles2 === void 0 ? void 0 : _this$props$styles2.rangeInput
|
|
153
155
|
}, (0, _emotion.jsx)("input", Object.assign({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-range-input",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.1-snapshot.0+8536a1c9b",
|
|
4
4
|
"description": "A styled HTML range input",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -25,26 +25,26 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@babel/runtime": "^7.13.10",
|
|
28
|
-
"@instructure/console": "8.
|
|
29
|
-
"@instructure/emotion": "8.
|
|
30
|
-
"@instructure/shared-types": "8.
|
|
31
|
-
"@instructure/ui-color-utils": "8.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.
|
|
33
|
-
"@instructure/ui-form-field": "8.
|
|
34
|
-
"@instructure/ui-i18n": "8.
|
|
35
|
-
"@instructure/ui-prop-types": "8.
|
|
36
|
-
"@instructure/ui-react-utils": "8.
|
|
37
|
-
"@instructure/ui-testable": "8.
|
|
38
|
-
"@instructure/ui-utils": "8.
|
|
39
|
-
"@instructure/ui-view": "8.
|
|
40
|
-
"@instructure/uid": "8.
|
|
28
|
+
"@instructure/console": "8.11.1-snapshot.0+8536a1c9b",
|
|
29
|
+
"@instructure/emotion": "8.11.1-snapshot.0+8536a1c9b",
|
|
30
|
+
"@instructure/shared-types": "8.11.1-snapshot.0+8536a1c9b",
|
|
31
|
+
"@instructure/ui-color-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
33
|
+
"@instructure/ui-form-field": "8.11.1-snapshot.0+8536a1c9b",
|
|
34
|
+
"@instructure/ui-i18n": "8.11.1-snapshot.0+8536a1c9b",
|
|
35
|
+
"@instructure/ui-prop-types": "8.11.1-snapshot.0+8536a1c9b",
|
|
36
|
+
"@instructure/ui-react-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
37
|
+
"@instructure/ui-testable": "8.11.1-snapshot.0+8536a1c9b",
|
|
38
|
+
"@instructure/ui-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
39
|
+
"@instructure/ui-view": "8.11.1-snapshot.0+8536a1c9b",
|
|
40
|
+
"@instructure/uid": "8.11.1-snapshot.0+8536a1c9b",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-babel-preset": "8.
|
|
45
|
-
"@instructure/ui-test-locator": "8.
|
|
46
|
-
"@instructure/ui-test-utils": "8.
|
|
47
|
-
"@instructure/ui-themes": "8.
|
|
44
|
+
"@instructure/ui-babel-preset": "8.11.1-snapshot.0+8536a1c9b",
|
|
45
|
+
"@instructure/ui-test-locator": "8.11.1-snapshot.0+8536a1c9b",
|
|
46
|
+
"@instructure/ui-test-utils": "8.11.1-snapshot.0+8536a1c9b",
|
|
47
|
+
"@instructure/ui-themes": "8.11.1-snapshot.0+8536a1c9b"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": ">=16.8 <=17"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "8536a1c9badcd8c1d2ce55dfb462d1899e3ca500"
|
|
57
57
|
}
|
package/src/RangeInput/index.tsx
CHANGED
|
@@ -70,6 +70,10 @@ class RangeInput extends Component<RangeInputProps> {
|
|
|
70
70
|
_inputListener: { remove(): void } | null = null
|
|
71
71
|
_changeListener: { remove(): void } | null = null
|
|
72
72
|
|
|
73
|
+
handleRef = (el: Element | null) => {
|
|
74
|
+
this.ref = el
|
|
75
|
+
}
|
|
76
|
+
|
|
73
77
|
// @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
|
|
74
78
|
constructor(props) {
|
|
75
79
|
// @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0.
|
|
@@ -184,9 +188,7 @@ class RangeInput extends Component<RangeInputProps> {
|
|
|
184
188
|
<FormField
|
|
185
189
|
{...pickProps(this.props, FormField.allowedProps)}
|
|
186
190
|
id={this.id}
|
|
187
|
-
elementRef={
|
|
188
|
-
this.ref = el
|
|
189
|
-
}}
|
|
191
|
+
elementRef={this.handleRef}
|
|
190
192
|
>
|
|
191
193
|
<div css={this.props.styles?.rangeInput}>
|
|
192
194
|
<input
|
package/src/RangeInput/props.ts
CHANGED
|
@@ -26,9 +26,14 @@ import PropTypes from 'prop-types'
|
|
|
26
26
|
import { controllable } from '@instructure/ui-prop-types'
|
|
27
27
|
import { FormPropTypes } from '@instructure/ui-form-field'
|
|
28
28
|
|
|
29
|
-
import type {
|
|
29
|
+
import type {
|
|
30
|
+
OtherHTMLAttributes,
|
|
31
|
+
PropValidators,
|
|
32
|
+
RangeInputTheme
|
|
33
|
+
} from '@instructure/shared-types'
|
|
30
34
|
import type { FormMessage } from '@instructure/ui-form-field'
|
|
31
35
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
36
|
+
import { InputHTMLAttributes } from 'react'
|
|
32
37
|
|
|
33
38
|
type RangeInputOwnProps = {
|
|
34
39
|
min: number
|
|
@@ -54,7 +59,11 @@ type PropKeys = keyof RangeInputOwnProps
|
|
|
54
59
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
55
60
|
|
|
56
61
|
type RangeInputProps = RangeInputOwnProps &
|
|
57
|
-
WithStyleProps<RangeInputTheme, RangeInputStyle>
|
|
62
|
+
WithStyleProps<RangeInputTheme, RangeInputStyle> &
|
|
63
|
+
OtherHTMLAttributes<
|
|
64
|
+
RangeInputOwnProps,
|
|
65
|
+
InputHTMLAttributes<RangeInputOwnProps>
|
|
66
|
+
>
|
|
58
67
|
|
|
59
68
|
type RangeInputStyle = ComponentStyle<
|
|
60
69
|
'rangeInput' | 'rangeInputInput' | 'rangeInputInputValue'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RangeInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAMr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I,IAAI,CAAA;KAAE,GAAG,IAAI,CAAO;IAEjD,SAAS,OAAQ,OAAO,GAAG,IAAI,UAE9B;gBAGW,KAAK,KAAA;IAejB,iBAAiB;IAkBjB,oBAAoB;IAWpB,kBAAkB;IAKlB,YAAY,uBAUX;IAGD,UAAU,aAAW;IAErB,IAAI,KAAK,QAKR;IAED,IAAI,OAAO,wBAOV;IAED,IAAI,EAAE,QAGL;IAGD,WAAW;IAgBX,MAAM;CA0CP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { PropValidators, RangeInputTheme } from '@instructure/shared-types';
|
|
1
|
+
import type { OtherHTMLAttributes, PropValidators, RangeInputTheme } from '@instructure/shared-types';
|
|
3
2
|
import type { FormMessage } from '@instructure/ui-form-field';
|
|
4
3
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion';
|
|
4
|
+
import { InputHTMLAttributes } from 'react';
|
|
5
5
|
declare type RangeInputOwnProps = {
|
|
6
6
|
min: number;
|
|
7
7
|
max: number;
|
|
@@ -22,7 +22,7 @@ declare type RangeInputOwnProps = {
|
|
|
22
22
|
};
|
|
23
23
|
declare type PropKeys = keyof RangeInputOwnProps;
|
|
24
24
|
declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
|
|
25
|
-
declare type RangeInputProps = RangeInputOwnProps & WithStyleProps<RangeInputTheme, RangeInputStyle
|
|
25
|
+
declare type RangeInputProps = RangeInputOwnProps & WithStyleProps<RangeInputTheme, RangeInputStyle> & OtherHTMLAttributes<RangeInputOwnProps, InputHTMLAttributes<RangeInputOwnProps>>;
|
|
26
26
|
declare type RangeInputStyle = ComponentStyle<'rangeInput' | 'rangeInputInput' | 'rangeInputInputValue'>;
|
|
27
27
|
declare const propTypes: PropValidators<PropKeys>;
|
|
28
28
|
declare const allowedProps: AllowedPropKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/RangeInput/props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/RangeInput/props.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAE3C,aAAK,kBAAkB,GAAG;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IAClC,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACrC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,K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