@instructure/ui-editable 11.6.0 → 11.6.1-pr-snapshot-1779894247159

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
+ ## [11.6.1-pr-snapshot-1779894247159](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-pr-snapshot-1779894247159) (2026-05-27)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-editable
9
+
10
+
11
+
12
+
13
+
6
14
  # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-editable
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,4 +22,16 @@ exports.allowedProps = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- const allowedProps = exports.allowedProps = ['mode', 'onChangeMode', 'children', 'render', 'value', 'onChange', 'readOnly', 'elementRef'];
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ coverage: Boolean(process.env.COVERAGE),
31
+ esModules: Boolean(process.env.ES_MODULES),
32
+ removeConsole: process.env.NODE_ENV === 'production',
33
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
34
+ }
35
+ ]
36
+ ]
37
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-editable",
3
- "version": "11.6.0",
3
+ "version": "11.6.1-pr-snapshot-1779894247159",
4
+ "type": "module",
4
5
  "description": "A UI component library made by Instructure Inc.",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,25 +15,25 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/console": "11.6.0",
19
- "@instructure/emotion": "11.6.0",
20
- "@instructure/shared-types": "11.6.0",
21
- "@instructure/ui-a11y-content": "11.6.0",
22
- "@instructure/ui-buttons": "11.6.0",
23
- "@instructure/ui-focusable": "11.6.0",
24
- "@instructure/ui-dom-utils": "11.6.0",
25
- "@instructure/ui-icons": "11.6.0",
26
- "@instructure/ui-flex": "11.6.0",
27
- "@instructure/ui-utils": "11.6.0",
28
- "@instructure/ui-view": "11.6.0"
18
+ "@instructure/console": "11.6.1-pr-snapshot-1779894247159",
19
+ "@instructure/emotion": "11.6.1-pr-snapshot-1779894247159",
20
+ "@instructure/shared-types": "11.6.1-pr-snapshot-1779894247159",
21
+ "@instructure/ui-buttons": "11.6.1-pr-snapshot-1779894247159",
22
+ "@instructure/ui-a11y-content": "11.6.1-pr-snapshot-1779894247159",
23
+ "@instructure/ui-dom-utils": "11.6.1-pr-snapshot-1779894247159",
24
+ "@instructure/ui-flex": "11.6.1-pr-snapshot-1779894247159",
25
+ "@instructure/ui-focusable": "11.6.1-pr-snapshot-1779894247159",
26
+ "@instructure/ui-icons": "11.6.1-pr-snapshot-1779894247159",
27
+ "@instructure/ui-view": "11.6.1-pr-snapshot-1779894247159",
28
+ "@instructure/ui-utils": "11.6.1-pr-snapshot-1779894247159"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "15.0.7",
33
33
  "@testing-library/user-event": "^14.6.1",
34
34
  "vitest": "^3.2.2",
35
- "@instructure/ui-babel-preset": "11.6.0",
36
- "@instructure/ui-axe-check": "11.6.0"
35
+ "@instructure/ui-axe-check": "11.6.1-pr-snapshot-1779894247159",
36
+ "@instructure/ui-babel-preset": "11.6.1-pr-snapshot-1779894247159"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": ">=18 <=19",
@@ -47,10 +47,8 @@
47
47
  ".": {
48
48
  "types": "./types/index.d.ts",
49
49
  "import": "./es/index.js",
50
- "require": "./lib/index.js",
51
50
  "default": "./es/index.js"
52
51
  },
53
- "./lib/*": "./lib/*",
54
52
  "./es/*": "./es/*",
55
53
  "./types/*": "./types/*",
56
54
  "./package.json": "./package.json",
@@ -60,7 +58,7 @@
60
58
  "lint": "ui-scripts lint",
61
59
  "lint:fix": "ui-scripts lint --fix",
62
60
  "clean": "ui-scripts clean",
63
- "build": "ui-scripts build --modules es,cjs",
61
+ "build": "ui-scripts build",
64
62
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
65
63
  "build:types": "tsc -p tsconfig.build.json",
66
64
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
@@ -1,229 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Editable = void 0;
7
- var _react = require("react");
8
- var _deepEqual = require("@instructure/ui-utils/lib/deepEqual.js");
9
- var _console = require("@instructure/console");
10
- var _requestAnimationFrame = require("@instructure/ui-dom-utils/lib/requestAnimationFrame.js");
11
- var _props2 = require("./props");
12
- /*
13
- * The MIT License (MIT)
14
- *
15
- * Copyright (c) 2018 - present Instructure, Inc.
16
- *
17
- * Permission is hereby granted, free of charge, to any person obtaining a copy
18
- * of this software and associated documentation files (the "Software"), to deal
19
- * in the Software without restriction, including without limitation the rights
20
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
- * copies of the Software, and to permit persons to whom the Software is
22
- * furnished to do so, subject to the following conditions:
23
- *
24
- * The above copyright notice and this permission notice shall be included in all
25
- * copies or substantial portions of the Software.
26
- *
27
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- * SOFTWARE.
34
- */
35
-
36
- /**
37
- ---
38
- category: components
39
- ---
40
- **/
41
- class Editable extends _react.Component {
42
- constructor(_props) {
43
- super(_props);
44
- this.state = {
45
- showModeToggle: false,
46
- valueOnEdit: null // the value when mode flips from view -> edit
47
- };
48
- this._editorRef = null;
49
- this._editButtonRef = null;
50
- this.handleEditESC = event => {
51
- if (event.key === 'Escape') {
52
- event.stopPropagation();
53
- this.enterView();
54
- }
55
- };
56
- this.handleViewMouseOver = event => {
57
- if (this.props.mode === 'view') {
58
- // because the mouse event handlers are on the container, not the view
59
- event.stopPropagation();
60
- this.setState({
61
- showModeToggle: true
62
- });
63
- }
64
- };
65
- this.handleViewMouseOut = event => {
66
- if (this.props.mode === 'view') {
67
- event.stopPropagation();
68
- this.setState({
69
- showModeToggle: document.activeElement === this._editButtonRef
70
- });
71
- }
72
- };
73
- this.handleViewClick = event => {
74
- if (event.buttons === 1) {
75
- (0, _requestAnimationFrame.requestAnimationFrame)(() => {
76
- this.enterEdit();
77
- });
78
- }
79
- };
80
- this.handleEditBlur = () => {
81
- this.enterView();
82
- };
83
- this.handleEditButtonFocus = () => {
84
- this.setState({
85
- showModeToggle: true
86
- });
87
- };
88
- this.handleEditButtonBlur = () => {
89
- this.setState({
90
- showModeToggle: false
91
- });
92
- };
93
- this.handleEditButtonClick = () => {
94
- this.enterEdit();
95
- };
96
- this.ref = null;
97
- this.handleContainerRef = el => {
98
- const elementRef = this.props.elementRef;
99
- this.ref = el;
100
- if (typeof elementRef === 'function') {
101
- elementRef(el);
102
- }
103
- };
104
- // ------- prop getters ------
105
- this.getContainerProps = (props = {}) => {
106
- const _this$props = this.props,
107
- mode = _this$props.mode,
108
- readOnly = _this$props.readOnly;
109
- return {
110
- onMouseOver: this.handleViewMouseOver,
111
- onMouseOut: this.handleViewMouseOut,
112
- onMouseDown: mode !== 'edit' ? this.handleViewClick : void 0,
113
- onKeyUp: mode === 'edit' ? this.handleEditESC : void 0,
114
- readOnly,
115
- ...props,
116
- ref: this.handleContainerRef
117
- };
118
- };
119
- this.getViewerProps = (props = {}) => {
120
- return {
121
- mode: this.props.mode,
122
- readOnly: this.props.readOnly,
123
- ...props
124
- };
125
- };
126
- this.getEditorProps = (props = {}) => {
127
- return {
128
- mode: this.props.mode,
129
- onBlur: this.handleEditBlur,
130
- editorRef: el => {
131
- this._editorRef = el;
132
- },
133
- readOnly: this.props.readOnly,
134
- ...props
135
- };
136
- };
137
- this.getEditButtonProps = (props = {}) => {
138
- return {
139
- onClick: this.handleEditButtonClick,
140
- onFocus: this.handleEditButtonFocus,
141
- onBlur: this.handleEditButtonBlur,
142
- isVisible: this.state.showModeToggle,
143
- buttonRef: el => {
144
- this._editButtonRef = el;
145
- },
146
- readOnly: this.props.readOnly,
147
- ...props
148
- };
149
- };
150
- (0, _console.logWarn)(_props.readOnly ? _props.mode === 'view' : true, '[Editable] When readOnly is true, mode must be "view"');
151
- }
152
- componentDidMount() {
153
- if (this.props.mode === 'edit') {
154
- this.focusEditor();
155
- }
156
- }
157
- componentDidUpdate(prevProps) {
158
- const _this$props2 = this.props,
159
- mode = _this$props2.mode,
160
- value = _this$props2.value,
161
- onChange = _this$props2.onChange;
162
-
163
- // on the switch from view -> edit
164
- if (prevProps.mode !== 'edit' && mode === 'edit') {
165
- this.setState({
166
- valueOnEdit: value
167
- });
168
- this.focusEditor();
169
- }
170
-
171
- // on the switch from edit to view
172
- if (prevProps.mode === 'edit' && mode !== 'edit') {
173
- this._editButtonRef && this._editButtonRef.focus();
174
- if (onChange && !(0, _deepEqual.deepEqual)(this.state.valueOnEdit, value)) {
175
- onChange(value);
176
- }
177
- }
178
- }
179
- focusEditor() {
180
- (0, _console.logWarn)(!!this._editorRef && !this.props.readOnly, '[Editable] Did you forget to connect editorRef to your editor component?');
181
- if (this._editorRef) {
182
- this._editorRef.focus();
183
- }
184
- }
185
- enterView() {
186
- if (this.props.mode !== 'view') {
187
- this.setState({
188
- showModeToggle: true
189
- });
190
- this.props.onChangeMode('view');
191
- }
192
- }
193
- enterEdit() {
194
- if (!this.props.readOnly) {
195
- this.setState({
196
- showModeToggle: false
197
- });
198
- if (this.props.mode !== 'edit') {
199
- this.props.onChangeMode('edit');
200
- }
201
- }
202
- }
203
- render() {
204
- const _this$props3 = this.props,
205
- children = _this$props3.children,
206
- _this$props3$render = _this$props3.render,
207
- render = _this$props3$render === void 0 ? children : _this$props3$render,
208
- mode = _this$props3.mode;
209
- if (typeof render === 'function') {
210
- return render({
211
- mode,
212
- getContainerProps: this.getContainerProps,
213
- getViewerProps: this.getViewerProps,
214
- getEditorProps: this.getEditorProps,
215
- getEditButtonProps: this.getEditButtonProps
216
- });
217
- } else {
218
- return null;
219
- }
220
- }
221
- }
222
- exports.Editable = Editable;
223
- Editable.displayName = "Editable";
224
- Editable.allowedProps = _props2.allowedProps;
225
- Editable.defaultProps = {
226
- readOnly: false,
227
- children: null
228
- };
229
- var _default = exports.default = Editable;
@@ -1,178 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.InPlaceEdit = void 0;
8
- var _react = require("react");
9
- var _Flex = require("@instructure/ui-flex/lib/Flex");
10
- var _IconButton = require("@instructure/ui-buttons/lib/IconButton");
11
- var _IconEditLine = require("@instructure/ui-icons/lib/IconEditLine.js");
12
- var _console = require("@instructure/console");
13
- var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
14
- var _emotion = require("@instructure/emotion");
15
- var _View = require("@instructure/ui-view/lib/View");
16
- var _Editable = require("../Editable");
17
- var _styles = _interopRequireDefault(require("./styles"));
18
- var _props = require("./props");
19
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
20
- var _dec, _class, _InPlaceEdit;
21
- /*
22
- * The MIT License (MIT)
23
- *
24
- * Copyright (c) 2018 - present Instructure, Inc.
25
- *
26
- * Permission is hereby granted, free of charge, to any person obtaining a copy
27
- * of this software and associated documentation files (the "Software"), to deal
28
- * in the Software without restriction, including without limitation the rights
29
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
- * copies of the Software, and to permit persons to whom the Software is
31
- * furnished to do so, subject to the following conditions:
32
- *
33
- * The above copyright notice and this permission notice shall be included in all
34
- * copies or substantial portions of the Software.
35
- *
36
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42
- * SOFTWARE.
43
- */
44
- /**
45
- ---
46
- category: components
47
- ---
48
- **/
49
- let InPlaceEdit = exports.InPlaceEdit = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec(_class = (_InPlaceEdit = class InPlaceEdit extends _react.Component {
50
- constructor(props) {
51
- super(props);
52
- this.ref = null;
53
- this._editButtonRef = null;
54
- this.handleRef = el => {
55
- this.ref = el;
56
- };
57
- this.handleEditButtonRef = el => {
58
- this._editButtonRef = el;
59
- };
60
- this.renderAll = ({
61
- getContainerProps,
62
- getViewerProps,
63
- getEditorProps,
64
- getEditButtonProps
65
- }) => {
66
- const flexDir = this.props.editButtonPlacement === 'start' ? 'row-reverse' : 'row';
67
- const justifyItems = flexDir === 'row-reverse' ? 'end' : 'start';
68
- const buttonMargin = this.props.editButtonPlacement === 'start' ? '0 xx-small 0 0' : '0 0 0 xx-small';
69
- return (0, _jsxRuntime.jsxs)(_Flex.Flex, {
70
- display: this.props.inline ? 'inline-flex' : 'flex',
71
- direction: flexDir,
72
- justifyItems: justifyItems,
73
- ...getContainerProps(),
74
- children: [(0, _jsxRuntime.jsxs)(_Flex.Flex.Item, {
75
- shouldGrow: true,
76
- shouldShrink: true,
77
- children: [this.renderEditor(getEditorProps()), this.renderViewer(getViewerProps())]
78
- }), (0, _jsxRuntime.jsx)(_Flex.Flex.Item, {
79
- margin: buttonMargin,
80
- children: this.renderEditButton(getEditButtonProps())
81
- })]
82
- });
83
- };
84
- (0, _console.logWarn)(props.readOnly ? props.mode === 'view' : true, '[InPlaceEdit] When readOnly is true, mode is forced to "view"');
85
- }
86
- componentDidMount() {
87
- var _this$props$makeStyle, _this$props;
88
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
89
- }
90
- componentDidUpdate() {
91
- var _this$props$makeStyle2, _this$props2;
92
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
93
- }
94
- renderEditor({
95
- mode,
96
- onBlur,
97
- editorRef,
98
- readOnly
99
- }) {
100
- var _this$props$styles;
101
- const _this$props3 = this.props,
102
- showFocusRing = _this$props3.showFocusRing,
103
- renderEditor = _this$props3.renderEditor;
104
- const isEditMode = !readOnly && mode === 'edit';
105
- return isEditMode ? (0, _jsxRuntime.jsx)(_View.View, {
106
- as: "span",
107
- display: "block",
108
- withFocusOutline: showFocusRing,
109
- position: "relative",
110
- css: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.inPlaceEdit,
111
- borderRadius: "medium",
112
- margin: "auto",
113
- children: renderEditor({
114
- onBlur,
115
- editorRef
116
- })
117
- }) : null;
118
- }
119
- renderViewer({
120
- readOnly,
121
- mode
122
- }) {
123
- return readOnly || mode === 'view' ? this.props.renderViewer() : null;
124
- }
125
- renderEditButton({
126
- buttonRef,
127
- ...rest
128
- }) {
129
- return this.props.renderEditButton({
130
- elementRef: (0, _createChainedFunction.createChainedFunction)(this.handleEditButtonRef, buttonRef),
131
- ...rest
132
- });
133
- }
134
-
135
- // Render a default edit button, an icon button with the edit icon
136
- // the margin makes room for the focus ring
137
-
138
- render() {
139
- const _this$props4 = this.props,
140
- mode = _this$props4.mode,
141
- value = _this$props4.value,
142
- onChange = _this$props4.onChange,
143
- onChangeMode = _this$props4.onChangeMode,
144
- readOnly = _this$props4.readOnly;
145
- return (0, _jsxRuntime.jsx)(_Editable.Editable, {
146
- mode: mode,
147
- onChangeMode: onChangeMode,
148
- render: this.renderAll,
149
- value: value,
150
- onChange: onChange,
151
- readOnly: readOnly,
152
- elementRef: this.handleRef
153
- });
154
- }
155
- }, _InPlaceEdit.displayName = "InPlaceEdit", _InPlaceEdit.componentId = 'InPlaceEdit', _InPlaceEdit.allowedProps = _props.allowedProps, _InPlaceEdit.defaultProps = {
156
- readOnly: false,
157
- showFocusRing: true,
158
- inline: true,
159
- editButtonPlacement: 'end'
160
- }, _InPlaceEdit.renderDefaultEditButton = ({
161
- isVisible,
162
- readOnly,
163
- label,
164
- ...buttonProps
165
- }) => {
166
- if (readOnly) {
167
- return null;
168
- }
169
- return (0, _jsxRuntime.jsx)(_IconButton.IconButton, {
170
- size: "small",
171
- screenReaderLabel: label,
172
- withBackground: false,
173
- withBorder: false,
174
- ...buttonProps,
175
- children: isVisible ? _IconEditLine.IconEditLine : null
176
- });
177
- }, _InPlaceEdit)) || _class);
178
- var _default = exports.default = InPlaceEdit;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const allowedProps = exports.allowedProps = ['renderViewer', 'renderEditor', 'renderEditButton', 'mode', 'onChangeMode', 'value', 'onChange', 'readOnly', 'showFocusRing', 'editButtonPlacement', 'inline'];
@@ -1,61 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * ---
33
- * private: true
34
- * ---
35
- * Generates the style object from the theme and provided additional information
36
- * @param {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @param {Object} state the state of the component, the style is applied to
39
- * @return {Object} The final style object, which will be used in the component
40
- */
41
- const generateStyle = () => {
42
- return {
43
- inPlaceEdit: {
44
- label: 'inPlaceEdit',
45
- boxSizing: 'border-box',
46
- maxWidth: '100%',
47
- position: 'relative',
48
- overflow: 'visible',
49
- direction: 'inherit',
50
- margin: 0,
51
- textDecoration: 'none' /* for links styled as buttons */,
52
- textAlign: 'inherit',
53
- userSelect: 'none',
54
- touchAction: 'manipulation',
55
- background: 'transparent',
56
- border: 'none',
57
- outline: 'none'
58
- }
59
- };
60
- };
61
- var _default = exports.default = generateStyle;
package/lib/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Editable", {
7
- enumerable: true,
8
- get: function () {
9
- return _Editable.Editable;
10
- }
11
- });
12
- Object.defineProperty(exports, "InPlaceEdit", {
13
- enumerable: true,
14
- get: function () {
15
- return _InPlaceEdit.InPlaceEdit;
16
- }
17
- });
18
- var _Editable = require("./Editable");
19
- var _InPlaceEdit = require("./InPlaceEdit");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}