@instructure/ui-editable 10.26.1 → 11.0.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 +23 -2
- package/es/Editable/index.js +1 -2
- package/es/Editable/props.js +1 -12
- package/es/InPlaceEdit/index.js +2 -2
- package/es/InPlaceEdit/props.js +1 -15
- package/lib/Editable/index.js +0 -1
- package/lib/Editable/props.js +1 -13
- package/lib/InPlaceEdit/index.js +1 -1
- package/lib/InPlaceEdit/props.js +1 -16
- package/package.json +17 -18
- package/src/Editable/index.tsx +1 -2
- package/src/Editable/props.ts +2 -16
- package/src/InPlaceEdit/index.tsx +1 -2
- package/src/InPlaceEdit/props.ts +1 -19
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Editable/index.d.ts +0 -10
- package/types/Editable/index.d.ts.map +1 -1
- package/types/Editable/props.d.ts +1 -3
- package/types/Editable/props.d.ts.map +1 -1
- package/types/InPlaceEdit/index.d.ts +0 -23
- package/types/InPlaceEdit/index.d.ts.map +1 -1
- package/types/InPlaceEdit/props.d.ts +1 -3
- package/types/InPlaceEdit/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,30 @@
|
|
|
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.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **many:** InstUI v11 contains the following breaking changes:
|
|
17
|
+
- React 16 and 17 are no longer supported
|
|
18
|
+
- remove `PropTypes` from all packages
|
|
19
|
+
- remove `CodeEditor` component
|
|
20
|
+
- remove `@instui/theme-registry` package
|
|
21
|
+
- remove `@testable`, `@experimental`, `@hack` decorators
|
|
22
|
+
- InstUISettingsProvider's `as` prop is removed
|
|
23
|
+
- `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
24
|
+
- `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
25
|
+
- `variables` field on theme objects are removed
|
|
26
|
+
- remove deprecated props from Table: Row's `isStacked`, Body's
|
|
27
|
+
`isStacked`, `hover`, and `headers`
|
|
28
|
+
- `Table`'s `caption` prop is now required
|
|
29
|
+
- `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
9
30
|
|
|
10
31
|
|
|
11
32
|
|
package/es/Editable/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { Component } from 'react';
|
|
|
25
25
|
import { deepEqual } from '@instructure/ui-utils';
|
|
26
26
|
import { logWarn as warn } from '@instructure/console';
|
|
27
27
|
import { requestAnimationFrame } from '@instructure/ui-dom-utils';
|
|
28
|
-
import {
|
|
28
|
+
import { allowedProps } from './props';
|
|
29
29
|
/**
|
|
30
30
|
---
|
|
31
31
|
category: components
|
|
@@ -213,7 +213,6 @@ class Editable extends Component {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
Editable.displayName = "Editable";
|
|
216
|
-
Editable.propTypes = propTypes;
|
|
217
216
|
Editable.allowedProps = allowedProps;
|
|
218
217
|
Editable.defaultProps = {
|
|
219
218
|
readOnly: false,
|
package/es/Editable/props.js
CHANGED
|
@@ -22,16 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
const propTypes = {
|
|
27
|
-
mode: PropTypes.oneOf(['view', 'edit']).isRequired,
|
|
28
|
-
onChangeMode: PropTypes.func.isRequired,
|
|
29
|
-
children: PropTypes.func,
|
|
30
|
-
render: PropTypes.func,
|
|
31
|
-
value: PropTypes.any,
|
|
32
|
-
onChange: PropTypes.func,
|
|
33
|
-
readOnly: PropTypes.bool,
|
|
34
|
-
elementRef: PropTypes.func
|
|
35
|
-
};
|
|
36
25
|
const allowedProps = ['mode', 'onChangeMode', 'children', 'render', 'value', 'onChange', 'readOnly', 'elementRef'];
|
|
37
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/es/InPlaceEdit/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import { withStyle } from '@instructure/emotion';
|
|
|
33
33
|
import { View } from '@instructure/ui-view';
|
|
34
34
|
import { Editable } from '../Editable';
|
|
35
35
|
import generateStyle from './styles';
|
|
36
|
-
import {
|
|
36
|
+
import { allowedProps } from './props';
|
|
37
37
|
import { jsxs as _jsxs, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
38
38
|
/**
|
|
39
39
|
---
|
|
@@ -146,7 +146,7 @@ let InPlaceEdit = (_dec = withStyle(generateStyle, null), _dec(_class = (_InPlac
|
|
|
146
146
|
elementRef: this.handleRef
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
}, _InPlaceEdit.displayName = "InPlaceEdit", _InPlaceEdit.componentId = 'InPlaceEdit', _InPlaceEdit.
|
|
149
|
+
}, _InPlaceEdit.displayName = "InPlaceEdit", _InPlaceEdit.componentId = 'InPlaceEdit', _InPlaceEdit.allowedProps = allowedProps, _InPlaceEdit.defaultProps = {
|
|
150
150
|
readOnly: false,
|
|
151
151
|
showFocusRing: true,
|
|
152
152
|
inline: true,
|
package/es/InPlaceEdit/props.js
CHANGED
|
@@ -22,19 +22,5 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types';
|
|
26
|
-
const propTypes = {
|
|
27
|
-
renderViewer: PropTypes.func.isRequired,
|
|
28
|
-
renderEditor: PropTypes.func.isRequired,
|
|
29
|
-
renderEditButton: PropTypes.func.isRequired,
|
|
30
|
-
mode: PropTypes.oneOf(['view', 'edit']).isRequired,
|
|
31
|
-
onChangeMode: PropTypes.func.isRequired,
|
|
32
|
-
value: PropTypes.any,
|
|
33
|
-
onChange: PropTypes.func,
|
|
34
|
-
readOnly: PropTypes.bool,
|
|
35
|
-
showFocusRing: PropTypes.bool,
|
|
36
|
-
editButtonPlacement: PropTypes.oneOf(['start', 'end']),
|
|
37
|
-
inline: PropTypes.bool
|
|
38
|
-
};
|
|
39
25
|
const allowedProps = ['renderViewer', 'renderEditor', 'renderEditButton', 'mode', 'onChangeMode', 'value', 'onChange', 'readOnly', 'showFocusRing', 'editButtonPlacement', 'inline'];
|
|
40
|
-
export {
|
|
26
|
+
export { allowedProps };
|
package/lib/Editable/index.js
CHANGED
|
@@ -221,7 +221,6 @@ class Editable extends _react.Component {
|
|
|
221
221
|
}
|
|
222
222
|
exports.Editable = Editable;
|
|
223
223
|
Editable.displayName = "Editable";
|
|
224
|
-
Editable.propTypes = _props2.propTypes;
|
|
225
224
|
Editable.allowedProps = _props2.allowedProps;
|
|
226
225
|
Editable.defaultProps = {
|
|
227
226
|
readOnly: false,
|
package/lib/Editable/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,14 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
30
28
|
* SOFTWARE.
|
|
31
29
|
*/
|
|
32
30
|
|
|
33
|
-
const propTypes = exports.propTypes = {
|
|
34
|
-
mode: _propTypes.default.oneOf(['view', 'edit']).isRequired,
|
|
35
|
-
onChangeMode: _propTypes.default.func.isRequired,
|
|
36
|
-
children: _propTypes.default.func,
|
|
37
|
-
render: _propTypes.default.func,
|
|
38
|
-
value: _propTypes.default.any,
|
|
39
|
-
onChange: _propTypes.default.func,
|
|
40
|
-
readOnly: _propTypes.default.bool,
|
|
41
|
-
elementRef: _propTypes.default.func
|
|
42
|
-
};
|
|
43
31
|
const allowedProps = exports.allowedProps = ['mode', 'onChangeMode', 'children', 'render', 'value', 'onChange', 'readOnly', 'elementRef'];
|
package/lib/InPlaceEdit/index.js
CHANGED
|
@@ -152,7 +152,7 @@ let InPlaceEdit = exports.InPlaceEdit = (_dec = (0, _emotion.withStyle)(_styles.
|
|
|
152
152
|
elementRef: this.handleRef
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
}, _InPlaceEdit.displayName = "InPlaceEdit", _InPlaceEdit.componentId = 'InPlaceEdit', _InPlaceEdit.
|
|
155
|
+
}, _InPlaceEdit.displayName = "InPlaceEdit", _InPlaceEdit.componentId = 'InPlaceEdit', _InPlaceEdit.allowedProps = _props.allowedProps, _InPlaceEdit.defaultProps = {
|
|
156
156
|
readOnly: false,
|
|
157
157
|
showFocusRing: true,
|
|
158
158
|
inline: true,
|
package/lib/InPlaceEdit/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,17 +28,4 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
30
28
|
* SOFTWARE.
|
|
31
29
|
*/
|
|
32
30
|
|
|
33
|
-
const propTypes = exports.propTypes = {
|
|
34
|
-
renderViewer: _propTypes.default.func.isRequired,
|
|
35
|
-
renderEditor: _propTypes.default.func.isRequired,
|
|
36
|
-
renderEditButton: _propTypes.default.func.isRequired,
|
|
37
|
-
mode: _propTypes.default.oneOf(['view', 'edit']).isRequired,
|
|
38
|
-
onChangeMode: _propTypes.default.func.isRequired,
|
|
39
|
-
value: _propTypes.default.any,
|
|
40
|
-
onChange: _propTypes.default.func,
|
|
41
|
-
readOnly: _propTypes.default.bool,
|
|
42
|
-
showFocusRing: _propTypes.default.bool,
|
|
43
|
-
editButtonPlacement: _propTypes.default.oneOf(['start', 'end']),
|
|
44
|
-
inline: _propTypes.default.bool
|
|
45
|
-
};
|
|
46
31
|
const allowedProps = exports.allowedProps = ['renderViewer', 'renderEditor', 'renderEditButton', 'mode', 'onChangeMode', 'value', 'onChange', 'readOnly', 'showFocusRing', 'editButtonPlacement', 'inline'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-editable",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,31 +23,30 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-axe-check": "
|
|
27
|
-
"@instructure/ui-babel-preset": "
|
|
26
|
+
"@instructure/ui-axe-check": "11.0.0",
|
|
27
|
+
"@instructure/ui-babel-preset": "11.0.0",
|
|
28
28
|
"@testing-library/jest-dom": "^6.6.3",
|
|
29
|
-
"@testing-library/react": "
|
|
29
|
+
"@testing-library/react": "15.0.7",
|
|
30
30
|
"@testing-library/user-event": "^14.6.1",
|
|
31
31
|
"vitest": "^3.2.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.27.6",
|
|
35
|
-
"@instructure/console": "
|
|
36
|
-
"@instructure/emotion": "
|
|
37
|
-
"@instructure/shared-types": "
|
|
38
|
-
"@instructure/ui-a11y-content": "
|
|
39
|
-
"@instructure/ui-buttons": "
|
|
40
|
-
"@instructure/ui-dom-utils": "
|
|
41
|
-
"@instructure/ui-flex": "
|
|
42
|
-
"@instructure/ui-focusable": "
|
|
43
|
-
"@instructure/ui-icons": "
|
|
44
|
-
"@instructure/ui-utils": "
|
|
45
|
-
"@instructure/ui-view": "
|
|
46
|
-
"prop-types": "^15.8.1"
|
|
35
|
+
"@instructure/console": "11.0.0",
|
|
36
|
+
"@instructure/emotion": "11.0.0",
|
|
37
|
+
"@instructure/shared-types": "11.0.0",
|
|
38
|
+
"@instructure/ui-a11y-content": "11.0.0",
|
|
39
|
+
"@instructure/ui-buttons": "11.0.0",
|
|
40
|
+
"@instructure/ui-dom-utils": "11.0.0",
|
|
41
|
+
"@instructure/ui-flex": "11.0.0",
|
|
42
|
+
"@instructure/ui-focusable": "11.0.0",
|
|
43
|
+
"@instructure/ui-icons": "11.0.0",
|
|
44
|
+
"@instructure/ui-utils": "11.0.0",
|
|
45
|
+
"@instructure/ui-view": "11.0.0"
|
|
47
46
|
},
|
|
48
47
|
"peerDependencies": {
|
|
49
|
-
"react": ">=
|
|
50
|
-
"react-dom": ">=
|
|
48
|
+
"react": ">=18 <=19",
|
|
49
|
+
"react-dom": ">=18 <=19"
|
|
51
50
|
},
|
|
52
51
|
"publishConfig": {
|
|
53
52
|
"access": "public"
|
package/src/Editable/index.tsx
CHANGED
|
@@ -27,7 +27,7 @@ import { deepEqual } from '@instructure/ui-utils'
|
|
|
27
27
|
import { logWarn as warn } from '@instructure/console'
|
|
28
28
|
import { requestAnimationFrame } from '@instructure/ui-dom-utils'
|
|
29
29
|
|
|
30
|
-
import {
|
|
30
|
+
import { allowedProps, EditableState } from './props'
|
|
31
31
|
import type {
|
|
32
32
|
EditableProps,
|
|
33
33
|
GetContainerProps,
|
|
@@ -42,7 +42,6 @@ category: components
|
|
|
42
42
|
---
|
|
43
43
|
**/
|
|
44
44
|
class Editable extends Component<EditableProps> {
|
|
45
|
-
static propTypes = propTypes
|
|
46
45
|
static allowedProps = allowedProps
|
|
47
46
|
static defaultProps = {
|
|
48
47
|
readOnly: false,
|
package/src/Editable/props.ts
CHANGED
|
@@ -21,10 +21,8 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
import React from 'react'
|
|
25
|
-
import PropTypes from 'prop-types'
|
|
26
24
|
|
|
27
|
-
import
|
|
25
|
+
import React from 'react'
|
|
28
26
|
|
|
29
27
|
type GetContainerProps = (props?: Record<string, any>) => {
|
|
30
28
|
ref: React.RefCallback<any>
|
|
@@ -112,18 +110,6 @@ type PropKeys = keyof EditableOwnProps
|
|
|
112
110
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
113
111
|
|
|
114
112
|
type EditableProps = EditableOwnProps
|
|
115
|
-
|
|
116
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
117
|
-
mode: PropTypes.oneOf(['view', 'edit']).isRequired,
|
|
118
|
-
onChangeMode: PropTypes.func.isRequired,
|
|
119
|
-
children: PropTypes.func,
|
|
120
|
-
render: PropTypes.func,
|
|
121
|
-
value: PropTypes.any,
|
|
122
|
-
onChange: PropTypes.func,
|
|
123
|
-
readOnly: PropTypes.bool,
|
|
124
|
-
elementRef: PropTypes.func
|
|
125
|
-
}
|
|
126
|
-
|
|
127
113
|
const allowedProps: AllowedPropKeys = [
|
|
128
114
|
'mode',
|
|
129
115
|
'onChangeMode',
|
|
@@ -148,4 +134,4 @@ export type {
|
|
|
148
134
|
GetEditorProps,
|
|
149
135
|
GetViewerProps
|
|
150
136
|
}
|
|
151
|
-
export {
|
|
137
|
+
export { allowedProps }
|
|
@@ -36,7 +36,7 @@ import { View } from '@instructure/ui-view'
|
|
|
36
36
|
import { Editable } from '../Editable'
|
|
37
37
|
import generateStyle from './styles'
|
|
38
38
|
|
|
39
|
-
import {
|
|
39
|
+
import { allowedProps } from './props'
|
|
40
40
|
import type { InPlaceEditProps } from './props'
|
|
41
41
|
import type { EditableRenderProps } from '../Editable/props'
|
|
42
42
|
|
|
@@ -48,7 +48,6 @@ category: components
|
|
|
48
48
|
@withStyle(generateStyle, null)
|
|
49
49
|
class InPlaceEdit extends Component<InPlaceEditProps> {
|
|
50
50
|
static readonly componentId = 'InPlaceEdit'
|
|
51
|
-
static propTypes = propTypes
|
|
52
51
|
static allowedProps = allowedProps
|
|
53
52
|
static defaultProps = {
|
|
54
53
|
readOnly: false,
|
package/src/InPlaceEdit/props.ts
CHANGED
|
@@ -22,9 +22,6 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import PropTypes from 'prop-types'
|
|
26
|
-
|
|
27
|
-
import type { PropValidators } from '@instructure/shared-types'
|
|
28
25
|
import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
|
|
29
26
|
import type { EditableProps } from '../Editable/props'
|
|
30
27
|
import React from 'react'
|
|
@@ -131,21 +128,6 @@ type InPlaceEditProps = InPlaceEditOwnProps &
|
|
|
131
128
|
WithStyleProps<null, InPlaceEditStyle>
|
|
132
129
|
|
|
133
130
|
type InPlaceEditStyle = ComponentStyle<'inPlaceEdit'>
|
|
134
|
-
|
|
135
|
-
const propTypes: PropValidators<PropKeys> = {
|
|
136
|
-
renderViewer: PropTypes.func.isRequired,
|
|
137
|
-
renderEditor: PropTypes.func.isRequired,
|
|
138
|
-
renderEditButton: PropTypes.func.isRequired,
|
|
139
|
-
mode: PropTypes.oneOf(['view', 'edit']).isRequired,
|
|
140
|
-
onChangeMode: PropTypes.func.isRequired,
|
|
141
|
-
value: PropTypes.any,
|
|
142
|
-
onChange: PropTypes.func,
|
|
143
|
-
readOnly: PropTypes.bool,
|
|
144
|
-
showFocusRing: PropTypes.bool,
|
|
145
|
-
editButtonPlacement: PropTypes.oneOf(['start', 'end']),
|
|
146
|
-
inline: PropTypes.bool
|
|
147
|
-
}
|
|
148
|
-
|
|
149
131
|
const allowedProps: AllowedPropKeys = [
|
|
150
132
|
'renderViewer',
|
|
151
133
|
'renderEditor',
|
|
@@ -161,4 +143,4 @@ const allowedProps: AllowedPropKeys = [
|
|
|
161
143
|
]
|
|
162
144
|
|
|
163
145
|
export type { InPlaceEditProps, InPlaceEditStyle }
|
|
164
|
-
export {
|
|
146
|
+
export { allowedProps }
|