@instructure/ui-range-input 8.10.3-snapshot.9 → 8.11.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 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
@@ -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.9+47592ffa9",
3
+ "version": "8.11.0",
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.9+47592ffa9",
29
- "@instructure/emotion": "8.10.3-snapshot.9+47592ffa9",
30
- "@instructure/shared-types": "8.10.3-snapshot.9+47592ffa9",
31
- "@instructure/ui-color-utils": "8.10.3-snapshot.9+47592ffa9",
32
- "@instructure/ui-dom-utils": "8.10.3-snapshot.9+47592ffa9",
33
- "@instructure/ui-form-field": "8.10.3-snapshot.9+47592ffa9",
34
- "@instructure/ui-i18n": "8.10.3-snapshot.9+47592ffa9",
35
- "@instructure/ui-prop-types": "8.10.3-snapshot.9+47592ffa9",
36
- "@instructure/ui-react-utils": "8.10.3-snapshot.9+47592ffa9",
37
- "@instructure/ui-testable": "8.10.3-snapshot.9+47592ffa9",
38
- "@instructure/ui-utils": "8.10.3-snapshot.9+47592ffa9",
39
- "@instructure/ui-view": "8.10.3-snapshot.9+47592ffa9",
40
- "@instructure/uid": "8.10.3-snapshot.9+47592ffa9",
28
+ "@instructure/console": "8.11.0",
29
+ "@instructure/emotion": "8.11.0",
30
+ "@instructure/shared-types": "8.11.0",
31
+ "@instructure/ui-color-utils": "8.11.0",
32
+ "@instructure/ui-dom-utils": "8.11.0",
33
+ "@instructure/ui-form-field": "8.11.0",
34
+ "@instructure/ui-i18n": "8.11.0",
35
+ "@instructure/ui-prop-types": "8.11.0",
36
+ "@instructure/ui-react-utils": "8.11.0",
37
+ "@instructure/ui-testable": "8.11.0",
38
+ "@instructure/ui-utils": "8.11.0",
39
+ "@instructure/ui-view": "8.11.0",
40
+ "@instructure/uid": "8.11.0",
41
41
  "prop-types": "^15"
42
42
  },
43
43
  "devDependencies": {
44
- "@instructure/ui-babel-preset": "8.10.3-snapshot.9+47592ffa9",
45
- "@instructure/ui-test-locator": "8.10.3-snapshot.9+47592ffa9",
46
- "@instructure/ui-test-utils": "8.10.3-snapshot.9+47592ffa9",
47
- "@instructure/ui-themes": "8.10.3-snapshot.9+47592ffa9"
44
+ "@instructure/ui-babel-preset": "8.11.0",
45
+ "@instructure/ui-test-locator": "8.11.0",
46
+ "@instructure/ui-test-utils": "8.11.0",
47
+ "@instructure/ui-themes": "8.11.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "react": ">=16.8 <=17"
@@ -52,6 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "sideEffects": false,
56
- "gitHead": "47592ffa9fed565a9df0677c77e6d890d5e964ea"
55
+ "sideEffects": false
57
56
  }
@@ -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
@@ -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 { PropValidators, RangeInputTheme } from '@instructure/shared-types'
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'
@@ -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,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;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;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
- /// <reference types="react" />
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":";AA4BA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1E,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,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,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,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GACvC,cAAc,CAAC,eAAe,EAAE,eAAe,CAAC,GAChD,mBAAmB,CACjB,kBAAkB,EAClB,mBAAmB,CAAC,kBAAkB,CAAC,CACxC,CAAA;AAEH,aAAK,eAAe,GAAG,cAAc,CACnC,YAAY,GAAG,iBAAiB,GAAG,sBAAsB,CAC1D,CAAA;AAED,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAmCvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAiBnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.