@instructure/ui-radio-input 10.26.1 → 11.0.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 +30 -1
- package/es/RadioInput/index.js +6 -6
- package/es/RadioInput/props.js +1 -18
- package/es/RadioInputGroup/index.js +6 -6
- package/es/RadioInputGroup/props.js +1 -19
- package/lib/RadioInput/index.js +5 -5
- package/lib/RadioInput/props.js +1 -19
- package/lib/RadioInputGroup/index.js +5 -5
- package/lib/RadioInputGroup/props.js +1 -20
- package/package.json +12 -15
- package/src/RadioInput/index.tsx +2 -4
- package/src/RadioInput/props.ts +1 -22
- package/src/RadioInputGroup/index.tsx +2 -4
- package/src/RadioInputGroup/props.ts +1 -25
- package/tsconfig.build.json +0 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/RadioInput/index.d.ts +0 -16
- package/types/RadioInput/index.d.ts.map +1 -1
- package/types/RadioInput/props.d.ts +2 -3
- package/types/RadioInput/props.d.ts.map +1 -1
- package/types/RadioInputGroup/index.d.ts +0 -15
- package/types/RadioInputGroup/index.d.ts.map +1 -1
- package/types/RadioInputGroup/props.d.ts +2 -3
- package/types/RadioInputGroup/props.d.ts.map +1 -1
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
|
-
## [
|
|
6
|
+
## [11.0.1-snapshot-0](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1-snapshot-0) (2025-10-07)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-radio-input
|
|
9
9
|
|
|
@@ -11,6 +11,35 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
# [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* **many:** InstUI v11 contains the following breaking changes:
|
|
25
|
+
- React 16 and 17 are no longer supported
|
|
26
|
+
- remove `PropTypes` from all packages
|
|
27
|
+
- remove `CodeEditor` component
|
|
28
|
+
- remove `@instui/theme-registry` package
|
|
29
|
+
- remove `@testable`, `@experimental`, `@hack` decorators
|
|
30
|
+
- InstUISettingsProvider's `as` prop is removed
|
|
31
|
+
- `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
32
|
+
- `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
33
|
+
- `variables` field on theme objects are removed
|
|
34
|
+
- remove deprecated props from Table: Row's `isStacked`, Body's
|
|
35
|
+
`isStacked`, `hover`, and `headers`
|
|
36
|
+
- `Table`'s `caption` prop is now required
|
|
37
|
+
- `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
14
43
|
# [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
|
|
15
44
|
|
|
16
45
|
|
package/es/RadioInput/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2,
|
|
1
|
+
var _dec, _dec2, _class, _RadioInput;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -24,13 +24,12 @@ var _dec, _dec2, _dec3, _class, _RadioInput;
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
import { Component } from 'react';
|
|
27
|
-
import { testable } from '@instructure/ui-testable';
|
|
28
27
|
import { omitProps, withDeterministicId } from '@instructure/ui-react-utils';
|
|
29
28
|
import { isActiveElement } from '@instructure/ui-dom-utils';
|
|
30
29
|
import { withStyle } from '@instructure/emotion';
|
|
31
30
|
import generateStyle from './styles';
|
|
32
31
|
import generateComponentTheme from './theme';
|
|
33
|
-
import { allowedProps
|
|
32
|
+
import { allowedProps } from './props';
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
---
|
|
@@ -38,7 +37,7 @@ category: components
|
|
|
38
37
|
---
|
|
39
38
|
**/
|
|
40
39
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
41
|
-
let RadioInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme),
|
|
40
|
+
let RadioInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_RadioInput = class RadioInput extends Component {
|
|
42
41
|
constructor(props) {
|
|
43
42
|
super(props);
|
|
44
43
|
this.ref = null;
|
|
@@ -112,6 +111,7 @@ let RadioInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
112
111
|
const props = omitProps(this.props, RadioInput.allowedProps);
|
|
113
112
|
return _jsx("div", {
|
|
114
113
|
css: styles === null || styles === void 0 ? void 0 : styles.radioInput,
|
|
114
|
+
"data-cid": "RadioInput",
|
|
115
115
|
ref: el => {
|
|
116
116
|
this.ref = el;
|
|
117
117
|
},
|
|
@@ -143,13 +143,13 @@ let RadioInput = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
143
143
|
})
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
}, _RadioInput.displayName = "RadioInput", _RadioInput.componentId = 'RadioInput', _RadioInput.allowedProps = allowedProps, _RadioInput.
|
|
146
|
+
}, _RadioInput.displayName = "RadioInput", _RadioInput.componentId = 'RadioInput', _RadioInput.allowedProps = allowedProps, _RadioInput.defaultProps = {
|
|
147
147
|
variant: 'simple',
|
|
148
148
|
size: 'medium',
|
|
149
149
|
disabled: false,
|
|
150
150
|
inline: false,
|
|
151
151
|
context: 'success',
|
|
152
152
|
readOnly: false
|
|
153
|
-
}, _RadioInput)) || _class) || _class)
|
|
153
|
+
}, _RadioInput)) || _class) || _class);
|
|
154
154
|
export default RadioInput;
|
|
155
155
|
export { RadioInput };
|
package/es/RadioInput/props.js
CHANGED
|
@@ -22,22 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
const propTypes = {
|
|
27
|
-
label: PropTypes.node.isRequired,
|
|
28
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
29
|
-
id: PropTypes.string,
|
|
30
|
-
name: PropTypes.string,
|
|
31
|
-
checked: PropTypes.bool,
|
|
32
|
-
disabled: PropTypes.bool,
|
|
33
|
-
readOnly: PropTypes.bool,
|
|
34
|
-
variant: PropTypes.oneOf(['simple', 'toggle']),
|
|
35
|
-
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
36
|
-
context: PropTypes.oneOf(['success', 'warning', 'danger', 'off']),
|
|
37
|
-
inline: PropTypes.bool,
|
|
38
|
-
onClick: PropTypes.func,
|
|
39
|
-
onChange: PropTypes.func,
|
|
40
|
-
inputRef: PropTypes.func
|
|
41
|
-
};
|
|
42
25
|
const allowedProps = ['label', 'value', 'id', 'name', 'checked', 'disabled', 'readOnly', 'variant', 'size', 'context', 'inline', 'onClick', 'onChange', 'inputRef'];
|
|
43
|
-
export {
|
|
26
|
+
export { allowedProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _dec, _dec2,
|
|
1
|
+
var _dec, _dec2, _class, _RadioInputGroup;
|
|
2
2
|
/*
|
|
3
3
|
* The MIT License (MIT)
|
|
4
4
|
*
|
|
@@ -25,21 +25,20 @@ var _dec, _dec2, _dec3, _class, _RadioInputGroup;
|
|
|
25
25
|
|
|
26
26
|
import { Fragment, Children, Component } from 'react';
|
|
27
27
|
import { FormFieldGroup } from '@instructure/ui-form-field';
|
|
28
|
-
import { testable } from '@instructure/ui-testable';
|
|
29
28
|
import { matchComponentTypes, safeCloneElement, omitProps, pickProps, withDeterministicId } from '@instructure/ui-react-utils';
|
|
30
29
|
import { hasVisibleChildren } from '@instructure/ui-a11y-utils';
|
|
31
30
|
import { RadioInput } from '../RadioInput';
|
|
32
31
|
import { withStyle } from '@instructure/emotion';
|
|
33
32
|
import generateStyle from './styles';
|
|
34
33
|
import generateComponentTheme from './theme';
|
|
35
|
-
import { allowedProps
|
|
34
|
+
import { allowedProps } from './props';
|
|
36
35
|
import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
37
36
|
/**
|
|
38
37
|
---
|
|
39
38
|
category: components
|
|
40
39
|
---
|
|
41
40
|
**/
|
|
42
|
-
let RadioInputGroup = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme),
|
|
41
|
+
let RadioInputGroup = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, generateComponentTheme), _dec(_class = _dec2(_class = (_RadioInputGroup = class RadioInputGroup extends Component {
|
|
43
42
|
constructor(props) {
|
|
44
43
|
super(props);
|
|
45
44
|
this.ref = null;
|
|
@@ -143,15 +142,16 @@ let RadioInputGroup = (_dec = withDeterministicId(), _dec2 = withStyle(generateS
|
|
|
143
142
|
messagesId: this._messagesId,
|
|
144
143
|
elementRef: this.handleRef,
|
|
145
144
|
role: "radiogroup",
|
|
145
|
+
"data-cid": "RadioInputGroup",
|
|
146
146
|
children: this.renderChildren()
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
}, _RadioInputGroup.displayName = "RadioInputGroup", _RadioInputGroup.componentId = 'RadioInputGroup', _RadioInputGroup.allowedProps = allowedProps, _RadioInputGroup.
|
|
149
|
+
}, _RadioInputGroup.displayName = "RadioInputGroup", _RadioInputGroup.componentId = 'RadioInputGroup', _RadioInputGroup.allowedProps = allowedProps, _RadioInputGroup.defaultProps = {
|
|
150
150
|
disabled: false,
|
|
151
151
|
variant: 'simple',
|
|
152
152
|
size: 'medium',
|
|
153
153
|
layout: 'stacked',
|
|
154
154
|
readOnly: false
|
|
155
|
-
}, _RadioInputGroup)) || _class) || _class)
|
|
155
|
+
}, _RadioInputGroup)) || _class) || _class);
|
|
156
156
|
export default RadioInputGroup;
|
|
157
157
|
export { RadioInputGroup };
|
|
@@ -22,23 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
import { controllable } from '@instructure/ui-prop-types';
|
|
27
|
-
import { FormPropTypes } from '@instructure/ui-form-field';
|
|
28
|
-
const propTypes = {
|
|
29
|
-
name: PropTypes.string.isRequired,
|
|
30
|
-
description: PropTypes.node.isRequired,
|
|
31
|
-
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
32
|
-
value: controllable(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
33
|
-
onChange: PropTypes.func,
|
|
34
|
-
disabled: PropTypes.bool,
|
|
35
|
-
readOnly: PropTypes.bool,
|
|
36
|
-
messages: PropTypes.arrayOf(FormPropTypes.message),
|
|
37
|
-
children: PropTypes.node,
|
|
38
|
-
variant: PropTypes.oneOf(['simple', 'toggle']),
|
|
39
|
-
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
40
|
-
layout: PropTypes.oneOf(['stacked', 'columns', 'inline']),
|
|
41
|
-
isRequired: PropTypes.bool
|
|
42
|
-
};
|
|
43
25
|
const allowedProps = ['name', 'description', 'defaultValue', 'value', 'onChange', 'disabled', 'readOnly', 'messages', 'children', 'variant', 'size', 'layout', 'isRequired'];
|
|
44
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/lib/RadioInput/index.js
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.RadioInput = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
10
9
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
10
|
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
12
11
|
var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
|
|
@@ -15,7 +14,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
15
14
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
16
15
|
var _props = require("./props");
|
|
17
16
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
18
|
-
var _dec, _dec2,
|
|
17
|
+
var _dec, _dec2, _class, _RadioInput;
|
|
19
18
|
/*
|
|
20
19
|
* The MIT License (MIT)
|
|
21
20
|
*
|
|
@@ -44,7 +43,7 @@ var _dec, _dec2, _dec3, _class, _RadioInput;
|
|
|
44
43
|
category: components
|
|
45
44
|
---
|
|
46
45
|
**/
|
|
47
|
-
let RadioInput = exports.RadioInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
46
|
+
let RadioInput = exports.RadioInput = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_RadioInput = class RadioInput extends _react.Component {
|
|
48
47
|
constructor(props) {
|
|
49
48
|
super(props);
|
|
50
49
|
this.ref = null;
|
|
@@ -118,6 +117,7 @@ let RadioInput = exports.RadioInput = (_dec = (0, _withDeterministicId.withDeter
|
|
|
118
117
|
const props = (0, _omitProps.omitProps)(this.props, RadioInput.allowedProps);
|
|
119
118
|
return (0, _jsxRuntime.jsx)("div", {
|
|
120
119
|
css: styles === null || styles === void 0 ? void 0 : styles.radioInput,
|
|
120
|
+
"data-cid": "RadioInput",
|
|
121
121
|
ref: el => {
|
|
122
122
|
this.ref = el;
|
|
123
123
|
},
|
|
@@ -149,12 +149,12 @@ let RadioInput = exports.RadioInput = (_dec = (0, _withDeterministicId.withDeter
|
|
|
149
149
|
})
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
}, _RadioInput.displayName = "RadioInput", _RadioInput.componentId = 'RadioInput', _RadioInput.allowedProps = _props.allowedProps, _RadioInput.
|
|
152
|
+
}, _RadioInput.displayName = "RadioInput", _RadioInput.componentId = 'RadioInput', _RadioInput.allowedProps = _props.allowedProps, _RadioInput.defaultProps = {
|
|
153
153
|
variant: 'simple',
|
|
154
154
|
size: 'medium',
|
|
155
155
|
disabled: false,
|
|
156
156
|
inline: false,
|
|
157
157
|
context: 'success',
|
|
158
158
|
readOnly: false
|
|
159
|
-
}, _RadioInput)) || _class) || _class)
|
|
159
|
+
}, _RadioInput)) || _class) || _class);
|
|
160
160
|
var _default = exports.default = RadioInput;
|
package/lib/RadioInput/props.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
+
exports.allowedProps = void 0;
|
|
9
7
|
/*
|
|
10
8
|
* The MIT License (MIT)
|
|
11
9
|
*
|
|
@@ -30,20 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
30
28
|
* SOFTWARE.
|
|
31
29
|
*/
|
|
32
30
|
|
|
33
|
-
const propTypes = exports.propTypes = {
|
|
34
|
-
label: _propTypes.default.node.isRequired,
|
|
35
|
-
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
36
|
-
id: _propTypes.default.string,
|
|
37
|
-
name: _propTypes.default.string,
|
|
38
|
-
checked: _propTypes.default.bool,
|
|
39
|
-
disabled: _propTypes.default.bool,
|
|
40
|
-
readOnly: _propTypes.default.bool,
|
|
41
|
-
variant: _propTypes.default.oneOf(['simple', 'toggle']),
|
|
42
|
-
size: _propTypes.default.oneOf(['small', 'medium', 'large']),
|
|
43
|
-
context: _propTypes.default.oneOf(['success', 'warning', 'danger', 'off']),
|
|
44
|
-
inline: _propTypes.default.bool,
|
|
45
|
-
onClick: _propTypes.default.func,
|
|
46
|
-
onChange: _propTypes.default.func,
|
|
47
|
-
inputRef: _propTypes.default.func
|
|
48
|
-
};
|
|
49
31
|
const allowedProps = exports.allowedProps = ['label', 'value', 'id', 'name', 'checked', 'disabled', 'readOnly', 'variant', 'size', 'context', 'inline', 'onClick', 'onChange', 'inputRef'];
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.RadioInputGroup = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _FormFieldGroup = require("@instructure/ui-form-field/lib/FormFieldGroup");
|
|
10
|
-
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
11
10
|
var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
|
|
12
11
|
var _safeCloneElement = require("@instructure/ui-react-utils/lib/safeCloneElement.js");
|
|
13
12
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
@@ -20,7 +19,7 @@ var _styles = _interopRequireDefault(require("./styles"));
|
|
|
20
19
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
21
20
|
var _props = require("./props");
|
|
22
21
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
23
|
-
var _dec, _dec2,
|
|
22
|
+
var _dec, _dec2, _class, _RadioInputGroup;
|
|
24
23
|
/*
|
|
25
24
|
* The MIT License (MIT)
|
|
26
25
|
*
|
|
@@ -49,7 +48,7 @@ var _dec, _dec2, _dec3, _class, _RadioInputGroup;
|
|
|
49
48
|
category: components
|
|
50
49
|
---
|
|
51
50
|
**/
|
|
52
|
-
let RadioInputGroup = exports.RadioInputGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default),
|
|
51
|
+
let RadioInputGroup = exports.RadioInputGroup = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_RadioInputGroup = class RadioInputGroup extends _react.Component {
|
|
53
52
|
constructor(props) {
|
|
54
53
|
super(props);
|
|
55
54
|
this.ref = null;
|
|
@@ -153,14 +152,15 @@ let RadioInputGroup = exports.RadioInputGroup = (_dec = (0, _withDeterministicId
|
|
|
153
152
|
messagesId: this._messagesId,
|
|
154
153
|
elementRef: this.handleRef,
|
|
155
154
|
role: "radiogroup",
|
|
155
|
+
"data-cid": "RadioInputGroup",
|
|
156
156
|
children: this.renderChildren()
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
}, _RadioInputGroup.displayName = "RadioInputGroup", _RadioInputGroup.componentId = 'RadioInputGroup', _RadioInputGroup.allowedProps = _props.allowedProps, _RadioInputGroup.
|
|
159
|
+
}, _RadioInputGroup.displayName = "RadioInputGroup", _RadioInputGroup.componentId = 'RadioInputGroup', _RadioInputGroup.allowedProps = _props.allowedProps, _RadioInputGroup.defaultProps = {
|
|
160
160
|
disabled: false,
|
|
161
161
|
variant: 'simple',
|
|
162
162
|
size: 'medium',
|
|
163
163
|
layout: 'stacked',
|
|
164
164
|
readOnly: false
|
|
165
|
-
}, _RadioInputGroup)) || _class) || _class)
|
|
165
|
+
}, _RadioInputGroup)) || _class) || _class);
|
|
166
166
|
var _default = exports.default = RadioInputGroup;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _controllable = require("@instructure/ui-prop-types/lib/controllable.js");
|
|
10
|
-
var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
|
|
6
|
+
exports.allowedProps = void 0;
|
|
11
7
|
/*
|
|
12
8
|
* The MIT License (MIT)
|
|
13
9
|
*
|
|
@@ -32,19 +28,4 @@ var _FormPropTypes = require("@instructure/ui-form-field/lib/FormPropTypes.js");
|
|
|
32
28
|
* SOFTWARE.
|
|
33
29
|
*/
|
|
34
30
|
|
|
35
|
-
const propTypes = exports.propTypes = {
|
|
36
|
-
name: _propTypes.default.string.isRequired,
|
|
37
|
-
description: _propTypes.default.node.isRequired,
|
|
38
|
-
defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
|
|
39
|
-
value: (0, _controllable.controllable)(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number])),
|
|
40
|
-
onChange: _propTypes.default.func,
|
|
41
|
-
disabled: _propTypes.default.bool,
|
|
42
|
-
readOnly: _propTypes.default.bool,
|
|
43
|
-
messages: _propTypes.default.arrayOf(_FormPropTypes.FormPropTypes.message),
|
|
44
|
-
children: _propTypes.default.node,
|
|
45
|
-
variant: _propTypes.default.oneOf(['simple', 'toggle']),
|
|
46
|
-
size: _propTypes.default.oneOf(['small', 'medium', 'large']),
|
|
47
|
-
layout: _propTypes.default.oneOf(['stacked', 'columns', 'inline']),
|
|
48
|
-
isRequired: _propTypes.default.bool
|
|
49
|
-
};
|
|
50
31
|
const allowedProps = exports.allowedProps = ['name', 'description', 'defaultValue', 'value', 'onChange', 'disabled', 'readOnly', 'messages', 'children', 'variant', 'size', 'layout', 'isRequired'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-radio-input",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1-snapshot-0",
|
|
4
4
|
"description": "A styled HTML input type='radio' element",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,27 +24,24 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.27.6",
|
|
27
|
-
"@instructure/emotion": "
|
|
28
|
-
"@instructure/shared-types": "
|
|
29
|
-
"@instructure/ui-dom-utils": "
|
|
30
|
-
"@instructure/ui-form-field": "
|
|
31
|
-
"@instructure/ui-
|
|
32
|
-
"@instructure/ui-react-utils": "10.26.1",
|
|
33
|
-
"@instructure/ui-testable": "10.26.1",
|
|
34
|
-
"prop-types": "^15.8.1"
|
|
27
|
+
"@instructure/emotion": "11.0.1-snapshot-0",
|
|
28
|
+
"@instructure/shared-types": "11.0.1-snapshot-0",
|
|
29
|
+
"@instructure/ui-dom-utils": "11.0.1-snapshot-0",
|
|
30
|
+
"@instructure/ui-form-field": "11.0.1-snapshot-0",
|
|
31
|
+
"@instructure/ui-react-utils": "11.0.1-snapshot-0"
|
|
35
32
|
},
|
|
36
33
|
"devDependencies": {
|
|
37
|
-
"@instructure/ui-axe-check": "
|
|
38
|
-
"@instructure/ui-babel-preset": "
|
|
39
|
-
"@instructure/ui-color-utils": "
|
|
40
|
-
"@instructure/ui-themes": "
|
|
34
|
+
"@instructure/ui-axe-check": "11.0.1-snapshot-0",
|
|
35
|
+
"@instructure/ui-babel-preset": "11.0.1-snapshot-0",
|
|
36
|
+
"@instructure/ui-color-utils": "11.0.1-snapshot-0",
|
|
37
|
+
"@instructure/ui-themes": "11.0.1-snapshot-0",
|
|
41
38
|
"@testing-library/jest-dom": "^6.6.3",
|
|
42
|
-
"@testing-library/react": "
|
|
39
|
+
"@testing-library/react": "15.0.7",
|
|
43
40
|
"@testing-library/user-event": "^14.6.1",
|
|
44
41
|
"vitest": "^3.2.2"
|
|
45
42
|
},
|
|
46
43
|
"peerDependencies": {
|
|
47
|
-
"react": ">=
|
|
44
|
+
"react": ">=18 <=19"
|
|
48
45
|
},
|
|
49
46
|
"publishConfig": {
|
|
50
47
|
"access": "public"
|
package/src/RadioInput/index.tsx
CHANGED
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
import { Component } from 'react'
|
|
26
26
|
|
|
27
|
-
import { testable } from '@instructure/ui-testable'
|
|
28
27
|
import { omitProps, withDeterministicId } from '@instructure/ui-react-utils'
|
|
29
28
|
import { isActiveElement } from '@instructure/ui-dom-utils'
|
|
30
29
|
|
|
@@ -34,7 +33,7 @@ import generateStyle from './styles'
|
|
|
34
33
|
import generateComponentTheme from './theme'
|
|
35
34
|
|
|
36
35
|
import type { RadioInputProps, RadioInputState } from './props'
|
|
37
|
-
import { allowedProps
|
|
36
|
+
import { allowedProps } from './props'
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
---
|
|
@@ -43,12 +42,10 @@ category: components
|
|
|
43
42
|
**/
|
|
44
43
|
@withDeterministicId()
|
|
45
44
|
@withStyle(generateStyle, generateComponentTheme)
|
|
46
|
-
@testable()
|
|
47
45
|
class RadioInput extends Component<RadioInputProps, RadioInputState> {
|
|
48
46
|
static readonly componentId = 'RadioInput'
|
|
49
47
|
|
|
50
48
|
static allowedProps = allowedProps
|
|
51
|
-
static propTypes = propTypes
|
|
52
49
|
|
|
53
50
|
static defaultProps = {
|
|
54
51
|
variant: 'simple',
|
|
@@ -143,6 +140,7 @@ class RadioInput extends Component<RadioInputProps, RadioInputState> {
|
|
|
143
140
|
return (
|
|
144
141
|
<div
|
|
145
142
|
css={styles?.radioInput}
|
|
143
|
+
data-cid="RadioInput"
|
|
146
144
|
ref={(el) => {
|
|
147
145
|
this.ref = el
|
|
148
146
|
}}
|
package/src/RadioInput/props.ts
CHANGED
|
@@ -23,12 +23,9 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import React from 'react'
|
|
26
|
-
import PropTypes from 'prop-types'
|
|
27
|
-
|
|
28
26
|
import type { InputHTMLAttributes } from 'react'
|
|
29
27
|
import type {
|
|
30
28
|
OtherHTMLAttributes,
|
|
31
|
-
PropValidators,
|
|
32
29
|
RadioInputTheme
|
|
33
30
|
} from '@instructure/shared-types'
|
|
34
31
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
@@ -97,24 +94,6 @@ type RadioInputStyle = ComponentStyle<
|
|
|
97
94
|
type RadioInputState = {
|
|
98
95
|
checked?: boolean
|
|
99
96
|
}
|
|
100
|
-
|
|
101
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
102
|
-
label: PropTypes.node.isRequired,
|
|
103
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
104
|
-
id: PropTypes.string,
|
|
105
|
-
name: PropTypes.string,
|
|
106
|
-
checked: PropTypes.bool,
|
|
107
|
-
disabled: PropTypes.bool,
|
|
108
|
-
readOnly: PropTypes.bool,
|
|
109
|
-
variant: PropTypes.oneOf(['simple', 'toggle']),
|
|
110
|
-
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
111
|
-
context: PropTypes.oneOf(['success', 'warning', 'danger', 'off']),
|
|
112
|
-
inline: PropTypes.bool,
|
|
113
|
-
onClick: PropTypes.func,
|
|
114
|
-
onChange: PropTypes.func,
|
|
115
|
-
inputRef: PropTypes.func
|
|
116
|
-
}
|
|
117
|
-
|
|
118
97
|
const allowedProps: AllowedPropKeys = [
|
|
119
98
|
'label',
|
|
120
99
|
'value',
|
|
@@ -133,4 +112,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
133
112
|
]
|
|
134
113
|
|
|
135
114
|
export type { RadioInputProps, RadioInputState, RadioInputStyle }
|
|
136
|
-
export {
|
|
115
|
+
export { allowedProps }
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
import { ComponentElement, Fragment, Children, Component } from 'react'
|
|
26
26
|
|
|
27
27
|
import { FormFieldGroup } from '@instructure/ui-form-field'
|
|
28
|
-
import { testable } from '@instructure/ui-testable'
|
|
29
28
|
import {
|
|
30
29
|
matchComponentTypes,
|
|
31
30
|
safeCloneElement,
|
|
@@ -44,7 +43,7 @@ import generateStyle from './styles'
|
|
|
44
43
|
import generateComponentTheme from './theme'
|
|
45
44
|
|
|
46
45
|
import type { RadioInputGroupProps, RadioInputGroupState } from './props'
|
|
47
|
-
import { allowedProps
|
|
46
|
+
import { allowedProps } from './props'
|
|
48
47
|
|
|
49
48
|
type RadioInputChild = ComponentElement<RadioInputProps, RadioInput>
|
|
50
49
|
|
|
@@ -55,7 +54,6 @@ category: components
|
|
|
55
54
|
**/
|
|
56
55
|
@withDeterministicId()
|
|
57
56
|
@withStyle(generateStyle, generateComponentTheme)
|
|
58
|
-
@testable()
|
|
59
57
|
class RadioInputGroup extends Component<
|
|
60
58
|
RadioInputGroupProps,
|
|
61
59
|
RadioInputGroupState
|
|
@@ -63,7 +61,6 @@ class RadioInputGroup extends Component<
|
|
|
63
61
|
static readonly componentId = 'RadioInputGroup'
|
|
64
62
|
|
|
65
63
|
static allowedProps = allowedProps
|
|
66
|
-
static propTypes = propTypes
|
|
67
64
|
|
|
68
65
|
static defaultProps = {
|
|
69
66
|
disabled: false,
|
|
@@ -192,6 +189,7 @@ class RadioInputGroup extends Component<
|
|
|
192
189
|
messagesId={this._messagesId}
|
|
193
190
|
elementRef={this.handleRef}
|
|
194
191
|
role="radiogroup"
|
|
192
|
+
data-cid="RadioInputGroup"
|
|
195
193
|
>
|
|
196
194
|
{this.renderChildren()}
|
|
197
195
|
</FormFieldGroup>
|
|
@@ -23,16 +23,11 @@
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import React from 'react'
|
|
26
|
-
import PropTypes from 'prop-types'
|
|
27
|
-
|
|
28
|
-
import { controllable } from '@instructure/ui-prop-types'
|
|
29
|
-
import { FormPropTypes } from '@instructure/ui-form-field'
|
|
30
26
|
|
|
31
27
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
32
28
|
import type { FormMessage } from '@instructure/ui-form-field'
|
|
33
29
|
import type {
|
|
34
30
|
OtherHTMLAttributes,
|
|
35
|
-
PropValidators,
|
|
36
31
|
RadioInputGroupTheme
|
|
37
32
|
} from '@instructure/shared-types'
|
|
38
33
|
import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'
|
|
@@ -113,25 +108,6 @@ type RadioInputGroupState = {
|
|
|
113
108
|
}
|
|
114
109
|
|
|
115
110
|
type RadioInputGroupStyle = ComponentStyle<'invalidAsterisk'>
|
|
116
|
-
|
|
117
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
118
|
-
name: PropTypes.string.isRequired,
|
|
119
|
-
description: PropTypes.node.isRequired,
|
|
120
|
-
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
121
|
-
value: controllable(
|
|
122
|
-
PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
123
|
-
),
|
|
124
|
-
onChange: PropTypes.func,
|
|
125
|
-
disabled: PropTypes.bool,
|
|
126
|
-
readOnly: PropTypes.bool,
|
|
127
|
-
messages: PropTypes.arrayOf(FormPropTypes.message),
|
|
128
|
-
children: PropTypes.node,
|
|
129
|
-
variant: PropTypes.oneOf(['simple', 'toggle']),
|
|
130
|
-
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
131
|
-
layout: PropTypes.oneOf(['stacked', 'columns', 'inline']),
|
|
132
|
-
isRequired: PropTypes.bool
|
|
133
|
-
}
|
|
134
|
-
|
|
135
111
|
const allowedProps: AllowedPropKeys = [
|
|
136
112
|
'name',
|
|
137
113
|
'description',
|
|
@@ -149,4 +125,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
149
125
|
]
|
|
150
126
|
|
|
151
127
|
export type { RadioInputGroupProps, RadioInputGroupState, RadioInputGroupStyle }
|
|
152
|
-
export {
|
|
128
|
+
export { allowedProps }
|
package/tsconfig.build.json
CHANGED
|
@@ -11,9 +11,7 @@
|
|
|
11
11
|
{ "path": "../shared-types/tsconfig.build.json" },
|
|
12
12
|
{ "path": "../ui-dom-utils/tsconfig.build.json" },
|
|
13
13
|
{ "path": "../ui-form-field/tsconfig.build.json" },
|
|
14
|
-
{ "path": "../ui-prop-types/tsconfig.build.json" },
|
|
15
14
|
{ "path": "../ui-react-utils/tsconfig.build.json" },
|
|
16
|
-
{ "path": "../ui-testable/tsconfig.build.json" },
|
|
17
15
|
{ "path": "../ui-babel-preset/tsconfig.build.json" },
|
|
18
16
|
{ "path": "../ui-color-utils/tsconfig.build.json" },
|
|
19
17
|
{ "path": "../ui-themes/tsconfig.build.json" },
|