@jupyterlab/settingeditor 4.0.0-alpha.2 → 4.0.0-alpha.21

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.
Files changed (47) hide show
  1. package/lib/SettingsFormEditor.d.ts +101 -0
  2. package/lib/SettingsFormEditor.js +151 -0
  3. package/lib/SettingsFormEditor.js.map +1 -0
  4. package/lib/index.d.ts +2 -1
  5. package/lib/index.js +2 -1
  6. package/lib/index.js.map +1 -1
  7. package/lib/inspector.js +24 -30
  8. package/lib/inspector.js.map +1 -1
  9. package/lib/{settingeditor.d.ts → jsonsettingeditor.d.ts} +5 -6
  10. package/lib/{settingeditor.js → jsonsettingeditor.js} +25 -43
  11. package/lib/jsonsettingeditor.js.map +1 -0
  12. package/lib/plugineditor.d.ts +3 -3
  13. package/lib/plugineditor.js +2 -6
  14. package/lib/plugineditor.js.map +1 -1
  15. package/lib/pluginlist.d.ts +58 -22
  16. package/lib/pluginlist.js +246 -109
  17. package/lib/pluginlist.js.map +1 -1
  18. package/lib/raweditor.d.ts +2 -6
  19. package/lib/raweditor.js +22 -33
  20. package/lib/raweditor.js.map +1 -1
  21. package/lib/settingseditor.d.ts +81 -0
  22. package/lib/settingseditor.js +121 -0
  23. package/lib/settingseditor.js.map +1 -0
  24. package/lib/settingspanel.d.ts +54 -0
  25. package/lib/settingspanel.js +102 -0
  26. package/lib/settingspanel.js.map +1 -0
  27. package/lib/tokens.d.ts +12 -2
  28. package/lib/tokens.js +4 -1
  29. package/lib/tokens.js.map +1 -1
  30. package/package.json +28 -21
  31. package/src/SettingsFormEditor.tsx +306 -0
  32. package/src/index.ts +10 -0
  33. package/src/inspector.ts +144 -0
  34. package/src/jsonsettingeditor.tsx +482 -0
  35. package/src/plugineditor.ts +257 -0
  36. package/src/pluginlist.tsx +538 -0
  37. package/src/raweditor.ts +422 -0
  38. package/src/settingseditor.tsx +210 -0
  39. package/src/settingspanel.tsx +218 -0
  40. package/src/tokens.ts +33 -0
  41. package/style/base.css +213 -89
  42. package/style/index.css +1 -0
  43. package/style/index.js +1 -0
  44. package/lib/settingeditor.js.map +0 -1
  45. package/lib/splitpanel.d.ts +0 -13
  46. package/lib/splitpanel.js +0 -26
  47. package/lib/splitpanel.js.map +0 -1
@@ -0,0 +1,218 @@
1
+ /* -----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ import { ISettingRegistry, Settings } from '@jupyterlab/settingregistry';
7
+ import { ITranslator } from '@jupyterlab/translation';
8
+ import { IFormRendererRegistry } from '@jupyterlab/ui-components';
9
+ import { ISignal } from '@lumino/signaling';
10
+ import type { Field } from '@rjsf/utils';
11
+ import React, { useEffect, useState } from 'react';
12
+ import { PluginList } from './pluginlist';
13
+ import { SettingsFormEditor } from './SettingsFormEditor';
14
+
15
+ export interface ISettingsPanelProps {
16
+ /**
17
+ * List of Settings objects that provide schema and values
18
+ * of plugins.
19
+ */
20
+ settings: Settings[];
21
+
22
+ /**
23
+ * Form component registry that provides renderers
24
+ * for the form editor.
25
+ */
26
+ editorRegistry: IFormRendererRegistry;
27
+
28
+ /**
29
+ * Handler for when selection change is triggered by scrolling
30
+ * in the SettingsPanel.
31
+ */
32
+ onSelect: (id: string) => void;
33
+
34
+ /**
35
+ * Signal that fires when a selection is made in the plugin list.
36
+ */
37
+ handleSelectSignal: ISignal<PluginList, string>;
38
+
39
+ /**
40
+ * Translator object
41
+ */
42
+ translator: ITranslator;
43
+
44
+ /**
45
+ * Callback to update the plugin list to display plugins with
46
+ * invalid / unsaved settings in red.
47
+ */
48
+ hasError: (id: string, error: boolean) => void;
49
+
50
+ /**
51
+ * Sends the updated dirty state to the parent class.
52
+ */
53
+ updateDirtyState: (dirty: boolean) => void;
54
+
55
+ /**
56
+ * Signal that sends updated filter when search value changes.
57
+ */
58
+ updateFilterSignal: ISignal<
59
+ PluginList,
60
+ (plugin: ISettingRegistry.IPlugin) => string[] | null
61
+ >;
62
+
63
+ /**
64
+ * If the settings editor is created with an initial search query, an initial
65
+ * filter function is passed to the settings panel.
66
+ */
67
+ initialFilter: (item: ISettingRegistry.IPlugin) => string[] | null;
68
+ }
69
+
70
+ /**
71
+ * React component that displays a list of SettingsFormEditor
72
+ * components.
73
+ */
74
+ export const SettingsPanel: React.FC<ISettingsPanelProps> = ({
75
+ settings,
76
+ editorRegistry,
77
+ onSelect,
78
+ handleSelectSignal,
79
+ hasError,
80
+ updateDirtyState,
81
+ updateFilterSignal,
82
+ translator,
83
+ initialFilter
84
+ }: ISettingsPanelProps): JSX.Element => {
85
+ const [expandedPlugin, setExpandedPlugin] = useState<string | null>(null);
86
+ const [filterPlugin, setFilter] = useState<
87
+ (plugin: ISettingRegistry.IPlugin) => string[] | null
88
+ >(() => initialFilter);
89
+
90
+ // Refs used to keep track of "selected" plugin based on scroll location
91
+ const editorRefs: {
92
+ [pluginId: string]: React.RefObject<HTMLDivElement>;
93
+ } = {};
94
+ for (const setting of settings) {
95
+ editorRefs[setting.id] = React.useRef(null);
96
+ }
97
+ const wrapperRef: React.RefObject<HTMLDivElement> = React.useRef(null);
98
+ const editorDirtyStates: React.RefObject<{
99
+ [id: string]: boolean;
100
+ }> = React.useRef({});
101
+
102
+ useEffect(() => {
103
+ const onFilterUpdate = (
104
+ list: PluginList,
105
+ newFilter: (plugin: ISettingRegistry.IPlugin) => string[] | null
106
+ ) => {
107
+ setFilter(() => newFilter);
108
+ for (const pluginSettings of settings) {
109
+ const filtered = newFilter(pluginSettings.plugin);
110
+ if (filtered === null || filtered.length > 0) {
111
+ setExpandedPlugin(pluginSettings.id);
112
+ break;
113
+ }
114
+ }
115
+ };
116
+
117
+ // Set first visible plugin as expanded plugin on initial load.
118
+ for (const pluginSettings of settings) {
119
+ const filtered = filterPlugin(pluginSettings.plugin);
120
+ if (filtered === null || filtered.length > 0) {
121
+ setExpandedPlugin(pluginSettings.id);
122
+ break;
123
+ }
124
+ }
125
+
126
+ // When filter updates, only show plugins that match search.
127
+ updateFilterSignal.connect(onFilterUpdate);
128
+
129
+ const onSelectChange = (list: PluginList, pluginId: string) => {
130
+ setExpandedPlugin(expandedPlugin !== pluginId ? pluginId : null);
131
+ // Scroll to the plugin when a selection is made in the left panel.
132
+ editorRefs[pluginId]?.current?.scrollIntoView(true);
133
+ };
134
+ handleSelectSignal?.connect?.(onSelectChange);
135
+
136
+ return () => {
137
+ updateFilterSignal.disconnect(onFilterUpdate);
138
+ handleSelectSignal?.disconnect?.(onSelectChange);
139
+ };
140
+ }, []);
141
+
142
+ const updateDirtyStates = React.useCallback(
143
+ (id: string, dirty: boolean) => {
144
+ if (editorDirtyStates.current) {
145
+ editorDirtyStates.current[id] = dirty;
146
+ for (const editor in editorDirtyStates.current) {
147
+ if (editorDirtyStates.current[editor]) {
148
+ updateDirtyState(true);
149
+ return;
150
+ }
151
+ }
152
+ }
153
+ updateDirtyState(false);
154
+ },
155
+ [editorDirtyStates, updateDirtyState]
156
+ );
157
+
158
+ const renderers = React.useMemo(
159
+ () =>
160
+ Object.entries(editorRegistry.renderers).reduce<{
161
+ [plugin: string]: { [property: string]: Field };
162
+ }>((agg, [id, renderer]) => {
163
+ const splitPosition = id.lastIndexOf('.');
164
+ const pluginId = id.substring(0, splitPosition);
165
+ const propertyName = id.substring(splitPosition + 1);
166
+ if (!agg[pluginId]) {
167
+ agg[pluginId] = {};
168
+ }
169
+ if (!agg[pluginId][propertyName] && renderer.fieldRenderer) {
170
+ agg[pluginId][propertyName] = renderer.fieldRenderer;
171
+ }
172
+ return agg;
173
+ }, {}),
174
+ [editorRegistry]
175
+ );
176
+
177
+ return (
178
+ <div className="jp-SettingsPanel" ref={wrapperRef}>
179
+ {settings.map(pluginSettings => {
180
+ // Pass filtered results to SettingsFormEditor to only display filtered fields.
181
+ const filtered = filterPlugin(pluginSettings.plugin);
182
+ // If filtered results are an array, only show if the array is non-empty.
183
+ if (filtered !== null && filtered.length === 0) {
184
+ return undefined;
185
+ }
186
+ return (
187
+ <div
188
+ ref={editorRefs[pluginSettings.id]}
189
+ className="jp-SettingsForm"
190
+ key={`${pluginSettings.id}SettingsEditor`}
191
+ >
192
+ <SettingsFormEditor
193
+ isCollapsed={pluginSettings.id !== expandedPlugin}
194
+ onCollapseChange={(willCollapse: boolean) => {
195
+ if (!willCollapse) {
196
+ setExpandedPlugin(pluginSettings.id);
197
+ } else if (pluginSettings.id === expandedPlugin) {
198
+ setExpandedPlugin(null);
199
+ }
200
+ }}
201
+ filteredValues={filtered}
202
+ settings={pluginSettings}
203
+ renderers={renderers}
204
+ hasError={(error: boolean) => {
205
+ hasError(pluginSettings.id, error);
206
+ }}
207
+ updateDirtyState={(dirty: boolean) => {
208
+ updateDirtyStates(pluginSettings.id, dirty);
209
+ }}
210
+ onSelect={onSelect}
211
+ translator={translator}
212
+ />
213
+ </div>
214
+ );
215
+ })}
216
+ </div>
217
+ );
218
+ };
package/src/tokens.ts ADDED
@@ -0,0 +1,33 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+
4
+ import { IWidgetTracker, MainAreaWidget } from '@jupyterlab/apputils';
5
+ import { Token } from '@lumino/coreutils';
6
+ import { JsonSettingEditor as JSONSettingEditor } from './jsonsettingeditor';
7
+ import { SettingsEditor } from './settingseditor';
8
+
9
+ /**
10
+ * The setting editor tracker token.
11
+ */
12
+ export const ISettingEditorTracker = new Token<ISettingEditorTracker>(
13
+ '@jupyterlab/settingeditor:ISettingEditorTracker'
14
+ );
15
+
16
+ /**
17
+ * The setting editor tracker token.
18
+ */
19
+ export const IJSONSettingEditorTracker = new Token<IJSONSettingEditorTracker>(
20
+ '@jupyterlab/settingeditor:IJSONSettingEditorTracker'
21
+ );
22
+
23
+ /**
24
+ * A class that tracks the setting editor.
25
+ */
26
+ export interface IJSONSettingEditorTracker
27
+ extends IWidgetTracker<MainAreaWidget<JSONSettingEditor>> {}
28
+
29
+ /**
30
+ * A class that tracks the setting editor.
31
+ */
32
+ export interface ISettingEditorTracker
33
+ extends IWidgetTracker<MainAreaWidget<SettingsEditor>> {}
package/style/base.css CHANGED
@@ -10,20 +10,25 @@
10
10
  --jp-private-settingeditor-row-height: 16px;
11
11
  --jp-private-settingeditor-toolbar-height: 28px;
12
12
  --jp-private-settingeditor-type-width: 75px;
13
+ --jp-private-settingeditor-modifier-indent: 5px;
13
14
  }
14
15
 
15
- #setting-editor {
16
+ .jp-SettingsPanel,
17
+ #json-setting-editor {
16
18
  min-width: 360px;
17
19
  min-height: 240px;
18
20
  background-color: var(--jp-layout-color0);
21
+ color: var(--jp-ui-font-color0);
19
22
  margin-top: -1px;
20
23
  outline: none;
24
+
21
25
  /* This is needed so that all font sizing of children done in ems is
22
26
  * relative to this base size */
23
27
  font-size: var(--jp-ui-font-size1);
24
28
  }
25
29
 
26
- #setting-editor > .lm-Widget {
30
+ #setting-editor > .lm-Widget,
31
+ #json-setting-editor > .lm-Widget {
27
32
  position: absolute;
28
33
  top: 0;
29
34
  bottom: 0;
@@ -31,22 +36,23 @@
31
36
  right: 0;
32
37
  }
33
38
 
34
- #setting-editor .lm-SplitPanel-handle {
39
+ #setting-editor .lm-SplitPanel-handle,
40
+ #json-setting-editor .lm-SplitPanel-handle {
35
41
  background-color: var(--jp-border-color2);
36
42
  }
37
43
 
38
- #setting-editor .jp-SettingEditorInstructions {
44
+ #json-setting-editor .jp-SettingEditorInstructions {
39
45
  text-align: center;
40
46
  }
41
47
 
42
- #setting-editor .jp-SettingEditorInstructions-icon {
48
+ #json-setting-editor .jp-SettingEditorInstructions-icon {
43
49
  display: inline-block;
44
50
  height: 78px;
45
51
  margin: 2px 5px 2px 8px;
46
52
  width: 60px;
47
53
  }
48
54
 
49
- #setting-editor .jp-SettingEditorInstructions-title {
55
+ #json-setting-editor .jp-SettingEditorInstructions-title {
50
56
  color: var(--jp-ui-font-color0);
51
57
  font-size: 32px;
52
58
  font-weight: 200;
@@ -54,88 +60,125 @@
54
60
  vertical-align: top;
55
61
  }
56
62
 
57
- #setting-editor .jp-SettingEditorInstructions-text {
63
+ #json-setting-editor .jp-SettingEditorInstructions-text {
58
64
  color: var(--jp-ui-font-color0);
59
65
  font-size: var(--jp-ui-font-size2);
60
66
  }
61
67
 
62
- #setting-editor .jp-PluginList {
68
+ .jp-PluginList {
63
69
  min-width: 175px;
64
70
  max-width: 275px;
71
+ background-color: var(--jp-layout-color2);
72
+ }
73
+
74
+ .jp-PluginList-wrapper {
75
+ overflow-y: auto;
76
+ height: 100%;
65
77
  }
66
78
 
67
- #setting-editor .jp-PluginList ul {
68
- background-color: var(--jp-layout-color1);
79
+ .jp-PluginList ul {
69
80
  color: var(--jp-ui-font-color1);
70
81
  font-size: var(--jp-ui-font-size1);
71
82
  list-style-type: none;
72
83
  margin: 0;
73
84
  padding: 0;
74
85
  overflow-y: auto;
75
- position: absolute;
86
+ position: relative;
76
87
  top: 0;
77
88
  bottom: 0;
78
89
  left: 0;
79
90
  right: 0;
80
91
  }
81
92
 
82
- #setting-editor .jp-PluginList li {
83
- display: flex;
84
- flex-direction: row;
85
- border: 1px solid transparent;
86
- overflow: hidden;
87
- padding: 4px 0 4px 4px;
88
- text-overflow: ellipsis;
89
- white-space: nowrap;
93
+ .jp-PluginList .jp-PluginList-header {
94
+ border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
95
+ border-top: var(--jp-border-width) solid var(--jp-border-color2);
96
+ color: var(--jp-ui-font-color1);
90
97
  }
91
98
 
92
- #setting-editor .jp-PluginList li:hover {
93
- background-color: var(--jp-layout-color2);
94
- border: 1px solid var(--jp-border-color2);
99
+ .jp-PluginList .jp-PluginList-noResults,
100
+ .jp-PluginList .jp-PluginList-header {
101
+ flex: 0 0 auto;
102
+ font-weight: 600;
103
+ text-transform: uppercase;
104
+ letter-spacing: 1px;
105
+ font-size: var(--jp-ui-font-size0);
106
+ padding: 8px 8px 8px 12px;
107
+ margin: 10px;
108
+ border-bottom: var(--jp-border-width) solid var(--jp-border-color2);
109
+ border-top: var(--jp-border-width) solid var(--jp-border-color2);
110
+ color: var(--jp-ui-font-color1);
95
111
  }
96
112
 
97
- #setting-editor .jp-PluginList li.jp-mod-selected {
113
+ .jp-PluginList .jp-SelectedIndicator {
114
+ width: 3px;
98
115
  background-color: var(--jp-brand-color1);
99
- color: white;
100
- border: 1px solid var(--jp-brand-color1);
116
+ height: var(--jp-cell-collapser-min-height);
117
+ visibility: hidden;
118
+ }
119
+
120
+ .jp-PluginList .jp-mod-selected .jp-SelectedIndicator {
121
+ visibility: inherit;
122
+ }
123
+
124
+ .jp-PluginList .jp-ErrorPlugin .jp-SelectedIndicator {
125
+ background-color: var(--jp-error-color0);
126
+ }
127
+
128
+ .jp-PluginList button.jp-mod-selected.jp-ErrorPlugin span {
129
+ color: var(--jp-error-color0);
130
+ }
131
+
132
+ .jp-PluginList button.jp-mod-selected span {
133
+ font-weight: var(--jp-content-heading-font-weight);
134
+ color: var(--jp-brand-color1);
101
135
  }
102
136
 
103
- #setting-editor
104
- ul.jp-PluginList
105
- li.jp-mod-selected
106
- span.jp-PluginList-icon.jp-FileIcon {
137
+ .jp-FormComponent li span {
138
+ overflow: hidden;
139
+ }
140
+
141
+ .jp-SettingEditor-header {
142
+ font-size: var(--jp-content-font-size4);
143
+ font-weight: var(--jp-content-heading-font-weight);
144
+ color: var(--jp-ui-font-color0);
145
+ padding: 20px 0 10px 20px;
146
+ border-bottom: 1px solid var(--jp-border-color2);
147
+ position: sticky;
148
+ top: 0;
149
+ z-index: 999;
150
+ background-color: var(--jp-layout-color0);
151
+ }
152
+
153
+ ul.jp-PluginList li.jp-mod-selected span.jp-PluginList-icon.jp-FileIcon {
107
154
  background-image: var(--jp-icon-file-selected);
108
155
  }
109
156
 
110
- #setting-editor .jp-PluginList-icon {
111
- display: inline-block;
157
+ .jp-PluginList-icon {
158
+ display: flex;
112
159
  height: 20px;
113
160
  width: 20px;
114
161
  margin-right: 3px;
115
162
  position: relative;
116
163
  }
117
164
 
118
- #setting-editor .jp-SettingsRawEditor .jp-Toolbar {
165
+ .jp-SettingsRawEditor .jp-Toolbar {
119
166
  color: var(--jp-ui-font-color0);
120
167
  font-size: var(--jp-ui-font-size1);
121
168
  height: var(--jp-private-settingeditor-toolbar-height);
122
169
  max-height: var(--jp-private-settingeditor-toolbar-height);
123
170
  }
124
171
 
125
- #setting-editor
126
- .jp-SettingsRawEditor
127
- .jp-Toolbar
128
- .jp-ToolbarButtonComponent-label {
172
+ .jp-SettingsRawEditor .jp-Toolbar .jp-ToolbarButtonComponent-label {
129
173
  display: none;
130
174
  }
131
175
 
132
- #setting-editor .jp-SettingsRawEditor .jp-Toolbar-item {
176
+ .jp-SettingsRawEditor .jp-Toolbar-item {
133
177
  margin-top: 1px;
134
178
  align-items: center;
135
179
  }
136
180
 
137
181
  .jp-ToolbarButtonComponent-label
138
- #setting-editor
139
182
  .jp-SettingsRawEditor.jp-mod-error
140
183
  .jp-Toolbar-item.jp-BugIcon::after {
141
184
  color: red;
@@ -148,96 +191,177 @@
148
191
  left: 6px;
149
192
  }
150
193
 
151
- #setting-editor .jp-SettingsRawEditor .jp-Inspector {
194
+ .jp-SettingsRawEditor .jp-Inspector {
152
195
  border-top: 2px solid var(--jp-layout-color2);
153
196
  min-height: var(--jp-private-settingeditor-debug-height);
154
197
  max-height: var(--jp-private-settingeditor-debug-height);
155
198
  }
156
199
 
157
- #setting-editor
158
- .jp-SettingsRawEditor
159
- .jp-Inspector.jp-SettingsDebug
160
- .jp-RenderedHTMLCommon {
200
+ .jp-SettingsRawEditor .jp-Inspector.jp-SettingsDebug .jp-RenderedHTMLCommon {
161
201
  padding: 2px 5px 2px 0;
162
202
  width: 100%;
163
203
  }
164
204
 
165
- #setting-editor
166
- .jp-SettingsRawEditor
167
- .jp-Inspector.jp-SettingsDebug
168
- .jp-RenderedHTMLCommon
169
- p {
205
+ .jp-SettingsRawEditor .jp-Inspector.jp-SettingsDebug .jp-RenderedHTMLCommon p {
170
206
  text-align: right;
171
207
  }
172
208
 
173
- #setting-editor .jp-SettingsTableEditor {
174
- border: 1px solid var(--jp-brand-color1);
175
- margin: 0;
176
- padding: 0;
209
+ .jp-SettingsRawEditor .cm-editor {
210
+ height: 100%;
177
211
  }
178
212
 
179
- #setting-editor .jp-SettingsTableEditor legend {
180
- color: var(--jp-brand-color1);
181
- font-size: 70%;
182
- font-weight: bold;
183
- margin-left: 15px;
184
- height: var(--jp-private-settingeditor-legend-height);
213
+ .jp-SettingsPanel .checkbox p {
214
+ font-size: var(--jp-content-font-size1);
215
+ }
216
+
217
+ .jp-SettingsPanel .checkbox {
218
+ display: flex;
219
+ flex-direction: column-reverse;
220
+ }
221
+
222
+ .jp-SettingsPanel .form-group {
223
+ display: flex;
224
+ padding: 4px 8px 4px var(--jp-private-settingeditor-modifier-indent);
225
+ margin-top: 5px;
185
226
  }
186
227
 
187
- #setting-editor .jp-SettingsTableEditor-wrapper {
228
+ .jp-SettingsPanel .jp-SaveSettingsBanner {
188
229
  position: absolute;
189
- top: var(--jp-private-settingeditor-legend-height);
190
230
  bottom: 0;
191
- overflow-y: auto;
231
+ padding: 20px;
232
+ width: 100%;
233
+ background: var(--jp-border-color3);
192
234
  }
193
235
 
194
- #setting-editor .jp-SettingsTableEditor table {
195
- table-layout: fixed;
196
- color: var(--jp-ui-font-color1);
236
+ .jp-SettingsPanel .jp-SaveSettingsBanner button {
237
+ box-shadow: none;
238
+ outline: none;
239
+ border: none;
240
+ color: var(--jp-brand-color1);
197
241
  font-size: var(--jp-ui-font-size1);
198
- padding: 2px;
199
- width: calc(100% - 4px);
200
- overflow: hidden;
242
+ cursor: pointer;
201
243
  }
202
244
 
203
- #setting-editor .jp-SettingsTableEditor tr {
204
- color: var(--jp-ui-font-color2);
205
- height: var(--jp-private-settingeditor-row-height);
206
- overflow: hidden;
245
+ .jp-SettingsPanel .jp-SaveSettingsBanner button:hover {
246
+ color: var(--jp-brand-color0);
207
247
  }
208
248
 
209
- #setting-editor .jp-SettingsTableEditor th {
210
- background-color: var(--jp-layout-color3);
211
- border: 1px solid transparent;
212
- font-weight: bold;
213
- height: var(--jp-private-settingeditor-row-height);
249
+ .jp-SettingsPanel .jp-SettingsHeader h2 {
250
+ font-size: var(--jp-content-font-size3);
251
+ color: var(--jp-ui-font-color0);
252
+ font-weight: 300;
253
+ margin: 1em;
214
254
  }
215
255
 
216
- #setting-editor .jp-SettingsTableEditor td {
217
- border: 1px solid transparent;
218
- height: var(--jp-private-settingeditor-row-height);
256
+ .jp-SettingsPanel .jp-SettingsHeader-description {
257
+ font-size: var(--jp-content-font-size2);
258
+ color: var(--jp-ui-font-color1);
259
+ font-weight: 200;
260
+ margin: 1em;
261
+ line-height: var(--jp-content-font-size3);
262
+ }
263
+
264
+ .jp-SettingsPanel .jp-SettingsTitle {
265
+ display: flex;
266
+ align-items: center;
267
+ padding-left: 1em;
268
+ }
269
+
270
+ .jp-SettingsPanel .jp-SettingsTitle-caret {
271
+ width: 2em;
272
+ flex-shrink: 0;
273
+ }
274
+
275
+ .jp-SettingsForm {
276
+ position: relative;
219
277
  }
220
278
 
221
- #setting-editor .jp-SettingsTableEditor th.jp-SettingsTableEditor-key {
222
- width: var(--jp-private-settingeditor-key-width);
279
+ .jp-SettingsPanel .jp-SettingsHeader {
280
+ display: flex;
281
+ flex: auto;
282
+ justify-content: space-between;
283
+ cursor: pointer;
284
+ border: 1px solid var(--jp-border-color2);
223
285
  }
224
286
 
225
- #setting-editor .jp-SettingsTableEditor th.jp-SettingsTableEditor-type {
226
- width: var(--jp-private-settingeditor-type-width);
287
+ .jp-PluginList .jp-FilterBox {
288
+ margin: 8px 12px 0;
289
+ }
290
+
291
+ .jp-PluginList mark {
292
+ background-color: transparent;
293
+ font-weight: bold;
294
+ color: var(--jp-ui-font-color1);
227
295
  }
228
296
 
229
- #setting-editor .jp-SettingsTableEditor td.jp-SettingsTableEditor-key {
297
+ .jp-PluginList-entry {
298
+ display: flex;
299
+ flex-direction: column;
300
+ border: 1px solid transparent;
301
+ background: transparent;
230
302
  overflow: hidden;
303
+ padding: 4px 0 4px 4px;
231
304
  white-space: nowrap;
305
+ }
306
+
307
+ .jp-PluginList-entry:hover {
308
+ background: var(--jp-layout-color1);
309
+ }
310
+
311
+ .jp-PluginList-entry li {
312
+ margin-left: 27px;
313
+ margin-top: 5px;
314
+ color: var(--jp-ui-font-color1);
315
+ overflow-x: hidden;
232
316
  text-overflow: ellipsis;
233
317
  }
234
318
 
235
- #setting-editor .jp-SettingsTableEditor td.jp-SettingsTableEditor-value {
236
- overflow: hidden;
237
- white-space: nowrap;
319
+ .jp-PluginList-entry-label {
320
+ display: flex;
321
+ }
322
+
323
+ .jp-PluginList-entry-label-text {
238
324
  text-overflow: ellipsis;
325
+ overflow-x: hidden;
326
+ white-space: nowrap;
327
+ color: var(--jp-ui-font-color1);
328
+ line-height: var(--jp-cell-collapser-min-height);
239
329
  }
240
330
 
241
- #setting-editor .jp-SettingsTableEditor td.jp-SettingsTableEditor-type {
242
- text-align: right;
331
+ .jp-SettingsPanel .jp-SettingsHeader-Name {
332
+ text-transform: inherit;
333
+ font-size: var(--jp-content-font-size3);
334
+ }
335
+
336
+ .jp-SettingsPanel .jp-SettingsEditor {
337
+ padding: 20px;
338
+ }
339
+
340
+ .jp-SettingsPanel .jp-SettingEditor-Switch .jp-switch {
341
+ position: absolute;
342
+ bottom: 0;
343
+ z-index: 999;
344
+ background-color: var(--jp-border-color3);
345
+ border: 1px solid var(--jp-border-color1);
346
+ }
347
+
348
+ .jp-SettingsPanel {
349
+ overflow-y: auto;
350
+ height: 100%;
351
+ }
352
+
353
+ .jp-SettingsForm button.jp-RestoreButton {
354
+ white-space: nowrap;
355
+ background: none;
356
+ border: none;
357
+ outline: none;
358
+ box-shadow: none;
359
+ font-size: var(--jp-content-font-size2);
360
+ color: var(--jp-brand-color1);
361
+ cursor: pointer;
362
+ margin-right: 5px;
363
+ }
364
+
365
+ .jp-PluginEditor {
366
+ overflow: auto;
243
367
  }
package/style/index.css CHANGED
@@ -9,6 +9,7 @@
9
9
  @import url('~@jupyterlab/apputils/style/index.css');
10
10
  @import url('~@jupyterlab/codeeditor/style/index.css');
11
11
  @import url('~@jupyterlab/rendermime/style/index.css');
12
+ @import url('~@jupyterlab/application/style/index.css');
12
13
  @import url('~@jupyterlab/inspector/style/index.css');
13
14
 
14
15
  @import url('./base.css');