@instructure/ui-range-input 8.10.3-snapshot.22 → 8.10.3-snapshot.23

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.
@@ -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: el => {
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({
@@ -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: el => {
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.10.3-snapshot.22+f96f8c48e",
3
+ "version": "8.10.3-snapshot.23+5aaa29662",
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.10.3-snapshot.22+f96f8c48e",
29
- "@instructure/emotion": "8.10.3-snapshot.22+f96f8c48e",
30
- "@instructure/shared-types": "8.10.3-snapshot.22+f96f8c48e",
31
- "@instructure/ui-color-utils": "8.10.3-snapshot.22+f96f8c48e",
32
- "@instructure/ui-dom-utils": "8.10.3-snapshot.22+f96f8c48e",
33
- "@instructure/ui-form-field": "8.10.3-snapshot.22+f96f8c48e",
34
- "@instructure/ui-i18n": "8.10.3-snapshot.22+f96f8c48e",
35
- "@instructure/ui-prop-types": "8.10.3-snapshot.22+f96f8c48e",
36
- "@instructure/ui-react-utils": "8.10.3-snapshot.22+f96f8c48e",
37
- "@instructure/ui-testable": "8.10.3-snapshot.22+f96f8c48e",
38
- "@instructure/ui-utils": "8.10.3-snapshot.22+f96f8c48e",
39
- "@instructure/ui-view": "8.10.3-snapshot.22+f96f8c48e",
40
- "@instructure/uid": "8.10.3-snapshot.22+f96f8c48e",
28
+ "@instructure/console": "8.10.3-snapshot.23+5aaa29662",
29
+ "@instructure/emotion": "8.10.3-snapshot.23+5aaa29662",
30
+ "@instructure/shared-types": "8.10.3-snapshot.23+5aaa29662",
31
+ "@instructure/ui-color-utils": "8.10.3-snapshot.23+5aaa29662",
32
+ "@instructure/ui-dom-utils": "8.10.3-snapshot.23+5aaa29662",
33
+ "@instructure/ui-form-field": "8.10.3-snapshot.23+5aaa29662",
34
+ "@instructure/ui-i18n": "8.10.3-snapshot.23+5aaa29662",
35
+ "@instructure/ui-prop-types": "8.10.3-snapshot.23+5aaa29662",
36
+ "@instructure/ui-react-utils": "8.10.3-snapshot.23+5aaa29662",
37
+ "@instructure/ui-testable": "8.10.3-snapshot.23+5aaa29662",
38
+ "@instructure/ui-utils": "8.10.3-snapshot.23+5aaa29662",
39
+ "@instructure/ui-view": "8.10.3-snapshot.23+5aaa29662",
40
+ "@instructure/uid": "8.10.3-snapshot.23+5aaa29662",
41
41
  "prop-types": "^15"
42
42
  },
43
43
  "devDependencies": {
44
- "@instructure/ui-babel-preset": "8.10.3-snapshot.22+f96f8c48e",
45
- "@instructure/ui-test-locator": "8.10.3-snapshot.22+f96f8c48e",
46
- "@instructure/ui-test-utils": "8.10.3-snapshot.22+f96f8c48e",
47
- "@instructure/ui-themes": "8.10.3-snapshot.22+f96f8c48e"
44
+ "@instructure/ui-babel-preset": "8.10.3-snapshot.23+5aaa29662",
45
+ "@instructure/ui-test-locator": "8.10.3-snapshot.23+5aaa29662",
46
+ "@instructure/ui-test-utils": "8.10.3-snapshot.23+5aaa29662",
47
+ "@instructure/ui-themes": "8.10.3-snapshot.23+5aaa29662"
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": "f96f8c48efab7806609098e1f00a6953b2884601"
56
+ "gitHead": "5aaa296621d72faebe1a809a8895a8185587008d"
57
57
  }
@@ -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={(el) => {
188
- this.ref = el
189
- }}
191
+ elementRef={this.handleRef}
190
192
  >
191
193
  <div css={this.props.styles?.rangeInput}>
192
194
  <input
@@ -65,6 +65,7 @@ declare class RangeInput extends Component<RangeInputProps> {
65
65
  _changeListener: {
66
66
  remove(): void;
67
67
  } | null;
68
+ handleRef: (el: Element | null) => void;
68
69
  constructor(props: any);
69
70
  componentDidMount(): void;
70
71
  componentWillUnmount(): void;
@@ -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;AAMrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C;;;;GAIG;AACH,cAEM,UAAW,SAAQ,SAAS,CAAC,eAAe,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,WAAW,gBAAe;IAE1C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;;;;;MAYlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAC1B,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAO;IACtC,cAAc,EAAE;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE,GAAG,IAAI,CAAO;IAChD,eAAe,EAAE;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE,GAAG,IAAI,CAAO;gBAGrC,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,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