@instructure/ui-radio-input 8.10.1-snapshot.8 → 8.10.2

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.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-radio-input
9
+
10
+ ## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
11
+
12
+ **Note:** Version bump only for package @instructure/ui-radio-input
13
+
6
14
  # [8.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-radio-input
@@ -43,6 +43,7 @@ category: components
43
43
  let RadioInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec(_class = _dec2(_class = (_temp = _class2 = class RadioInput extends Component {
44
44
  constructor(props) {
45
45
  super(props);
46
+ this.ref = null;
46
47
 
47
48
  this.handleClick = e => {
48
49
  if (this.props.disabled || this.props.readOnly) {
@@ -115,7 +116,10 @@ let RadioInput = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
115
116
  styles = _this$props3.styles;
116
117
  const props = omitProps(this.props, RadioInput.allowedProps);
117
118
  return jsx("div", {
118
- css: styles === null || styles === void 0 ? void 0 : styles.radioInput
119
+ css: styles === null || styles === void 0 ? void 0 : styles.radioInput,
120
+ ref: el => {
121
+ this.ref = el;
122
+ }
119
123
  }, jsx("input", Object.assign({}, props, {
120
124
  id: this.id,
121
125
  ref: c => {
@@ -39,6 +39,7 @@ category: components
39
39
  let RadioInputGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class RadioInputGroup extends Component {
40
40
  constructor(props) {
41
41
  super();
42
+ this.ref = null;
42
43
 
43
44
  this.handleChange = e => {
44
45
  const value = e.target.value;
@@ -126,7 +127,10 @@ let RadioInputGroup = (_dec = testable(), _dec(_class = (_temp = _class2 = class
126
127
  colSpacing: variant === 'toggle' ? 'none' : 'small' // keep toggles close together
127
128
  ,
128
129
  startAt: variant === 'toggle' ? 'small' : void 0,
129
- messagesId: this._messagesId
130
+ messagesId: this._messagesId,
131
+ elementRef: el => {
132
+ this.ref = el;
133
+ }
130
134
  }), this.renderChildren())
131
135
  );
132
136
  }
@@ -35,6 +35,7 @@ category: components
35
35
  let RadioInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec(_class = _dec2(_class = (_temp = _class2 = class RadioInput extends _react.Component {
36
36
  constructor(props) {
37
37
  super(props);
38
+ this.ref = null;
38
39
 
39
40
  this.handleClick = e => {
40
41
  if (this.props.disabled || this.props.readOnly) {
@@ -107,7 +108,10 @@ let RadioInput = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
107
108
  styles = _this$props3.styles;
108
109
  const props = (0, _omitProps.omitProps)(this.props, RadioInput.allowedProps);
109
110
  return (0, _emotion.jsx)("div", {
110
- css: styles === null || styles === void 0 ? void 0 : styles.radioInput
111
+ css: styles === null || styles === void 0 ? void 0 : styles.radioInput,
112
+ ref: el => {
113
+ this.ref = el;
114
+ }
111
115
  }, (0, _emotion.jsx)("input", Object.assign({}, props, {
112
116
  id: this.id,
113
117
  ref: c => {
@@ -37,6 +37,7 @@ category: components
37
37
  let RadioInputGroup = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _class2 = class RadioInputGroup extends _react.Component {
38
38
  constructor(props) {
39
39
  super();
40
+ this.ref = null;
40
41
 
41
42
  this.handleChange = e => {
42
43
  const value = e.target.value;
@@ -124,7 +125,10 @@ let RadioInputGroup = (_dec = (0, _testable.testable)(), _dec(_class = (_temp =
124
125
  colSpacing: variant === 'toggle' ? 'none' : 'small' // keep toggles close together
125
126
  ,
126
127
  startAt: variant === 'toggle' ? 'small' : void 0,
127
- messagesId: this._messagesId
128
+ messagesId: this._messagesId,
129
+ elementRef: el => {
130
+ this.ref = el;
131
+ }
128
132
  }), this.renderChildren())
129
133
  );
130
134
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-radio-input",
3
- "version": "8.10.1-snapshot.8+21f46f4e3",
3
+ "version": "8.10.2",
4
4
  "description": "A styled HTML input type='radio' element",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,22 +25,22 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/emotion": "8.10.1-snapshot.8+21f46f4e3",
29
- "@instructure/shared-types": "8.10.1-snapshot.8+21f46f4e3",
30
- "@instructure/ui-dom-utils": "8.10.1-snapshot.8+21f46f4e3",
31
- "@instructure/ui-form-field": "8.10.1-snapshot.8+21f46f4e3",
32
- "@instructure/ui-prop-types": "8.10.1-snapshot.8+21f46f4e3",
33
- "@instructure/ui-react-utils": "8.10.1-snapshot.8+21f46f4e3",
34
- "@instructure/ui-testable": "8.10.1-snapshot.8+21f46f4e3",
35
- "@instructure/uid": "8.10.1-snapshot.8+21f46f4e3",
28
+ "@instructure/emotion": "8.10.2",
29
+ "@instructure/shared-types": "8.10.2",
30
+ "@instructure/ui-dom-utils": "8.10.2",
31
+ "@instructure/ui-form-field": "8.10.2",
32
+ "@instructure/ui-prop-types": "8.10.2",
33
+ "@instructure/ui-react-utils": "8.10.2",
34
+ "@instructure/ui-testable": "8.10.2",
35
+ "@instructure/uid": "8.10.2",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.10.1-snapshot.8+21f46f4e3",
40
- "@instructure/ui-color-utils": "8.10.1-snapshot.8+21f46f4e3",
41
- "@instructure/ui-test-locator": "8.10.1-snapshot.8+21f46f4e3",
42
- "@instructure/ui-test-utils": "8.10.1-snapshot.8+21f46f4e3",
43
- "@instructure/ui-themes": "8.10.1-snapshot.8+21f46f4e3"
39
+ "@instructure/ui-babel-preset": "8.10.2",
40
+ "@instructure/ui-color-utils": "8.10.2",
41
+ "@instructure/ui-test-locator": "8.10.2",
42
+ "@instructure/ui-test-utils": "8.10.2",
43
+ "@instructure/ui-themes": "8.10.2"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.8 <=17"
@@ -48,6 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "sideEffects": false,
52
- "gitHead": "21f46f4e342898b019ab943a7e69a455621d9576"
51
+ "sideEffects": false
53
52
  }
@@ -63,6 +63,8 @@ class RadioInput extends Component<RadioInputProps> {
63
63
  readOnly: false
64
64
  }
65
65
 
66
+ ref: Element | null = null
67
+
66
68
  // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
67
69
  constructor(props) {
68
70
  super(props)
@@ -141,7 +143,12 @@ class RadioInput extends Component<RadioInputProps> {
141
143
  const props = omitProps(this.props, RadioInput.allowedProps)
142
144
 
143
145
  return (
144
- <div css={styles?.radioInput}>
146
+ <div
147
+ css={styles?.radioInput}
148
+ ref={(el) => {
149
+ this.ref = el
150
+ }}
151
+ >
145
152
  <input
146
153
  {...props}
147
154
  id={this.id}
@@ -59,6 +59,8 @@ class RadioInputGroup extends Component<RadioInputGroupProps> {
59
59
  children: null
60
60
  }
61
61
 
62
+ ref: Element | null = null
63
+
62
64
  // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
63
65
  constructor(props) {
64
66
  // @ts-expect-error ts-migrate(2554) FIXME: Expected 1-2 arguments, but got 0.
@@ -156,6 +158,9 @@ class RadioInputGroup extends Component<RadioInputGroupProps> {
156
158
  startAt={variant === 'toggle' ? 'small' : undefined}
157
159
  // @ts-expect-error ts-migrate(2339) FIXME: Property '_messagesId' does not exist on type 'Rad... Remove this comment to see the full error message
158
160
  messagesId={this._messagesId}
161
+ elementRef={(el) => {
162
+ this.ref = el
163
+ }}
159
164
  >
160
165
  {this.renderChildren()}
161
166
  </FormFieldGroup>
@@ -49,6 +49,7 @@ declare class RadioInput extends Component<RadioInputProps> {
49
49
  context: string;
50
50
  readOnly: boolean;
51
51
  };
52
+ ref: Element | null;
52
53
  constructor(props: any);
53
54
  componentDidMount(): void;
54
55
  componentDidUpdate(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,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;;;;;;;;;MAWlB;gBAGW,KAAK,KAAA;IAcjB,iBAAiB;IAIjB,kBAAkB;IAKlB,WAAW,mBAQV;IAGD,YAAY,mBAaX;IAED,KAAK;IAKL,IAAI,EAAE,QAGL;IAED,IAAI,OAAO,YAGV;IAED,IAAI,OAAO,QAKV;IAED,MAAM;CAgCP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAIrD,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;;;;;;;;;MAWlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;gBAGd,KAAK,KAAA;IAcjB,iBAAiB;IAIjB,kBAAkB;IAKlB,WAAW,mBAQV;IAGD,YAAY,mBAaX;IAED,KAAK;IAKL,IAAI,EAAE,QAGL;IAED,IAAI,OAAO,YAGV;IAED,IAAI,OAAO,QAKV;IAED,MAAM;CAqCP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -43,6 +43,7 @@ declare class RadioInputGroup extends Component<RadioInputGroupProps> {
43
43
  readOnly: boolean;
44
44
  children: null;
45
45
  };
46
+ ref: Element | null;
46
47
  constructor(props: any);
47
48
  get hasMessages(): boolean | undefined;
48
49
  handleChange: (e: any) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInputGroup/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;AAahE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD;;;;GAIG;AACH,cACM,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;MAOlB;gBAGW,KAAK,KAAA;IAcjB,IAAI,WAAW,wBAEd;IAGD,YAAY,mBAeX;IAED,IAAI,KAAK,QAKR;IAED,cAAc;IAmCd,MAAM;CAuBP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RadioInputGroup/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAY,SAAS,EAAgB,MAAM,OAAO,CAAA;AAahE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAGnD;;;;GAIG;AACH,cACM,eAAgB,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,qBAAoB;IAE/C,MAAM,CAAC,YAAY;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;MAOlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;gBAGd,KAAK,KAAA;IAcjB,IAAI,WAAW,wBAEd;IAGD,YAAY,mBAeX;IAED,IAAI,KAAK,QAKR;IAED,cAAc;IAmCd,MAAM;CA0BP;AAED,eAAe,eAAe,CAAA;AAC9B,OAAO,EAAE,eAAe,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.