@jupyterlab/shortcuts-extension 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 (39) hide show
  1. package/lib/components/ShortcutInput.d.ts +78 -0
  2. package/lib/components/ShortcutInput.js +348 -0
  3. package/lib/components/ShortcutInput.js.map +1 -0
  4. package/lib/components/ShortcutItem.d.ts +62 -0
  5. package/lib/components/ShortcutItem.js +282 -0
  6. package/lib/components/ShortcutItem.js.map +1 -0
  7. package/lib/components/ShortcutList.d.ts +23 -0
  8. package/lib/components/ShortcutList.js +19 -0
  9. package/lib/components/ShortcutList.js.map +1 -0
  10. package/lib/components/ShortcutTitleItem.d.ts +9 -0
  11. package/lib/components/ShortcutTitleItem.js +16 -0
  12. package/lib/components/ShortcutTitleItem.js.map +1 -0
  13. package/lib/components/ShortcutUI.d.ts +56 -0
  14. package/lib/components/ShortcutUI.js +363 -0
  15. package/lib/components/ShortcutUI.js.map +1 -0
  16. package/lib/components/TopNav.d.ts +48 -0
  17. package/lib/components/TopNav.js +92 -0
  18. package/lib/components/TopNav.js.map +1 -0
  19. package/lib/components/index.d.ts +2 -0
  20. package/lib/components/index.js +6 -0
  21. package/lib/components/index.js.map +1 -0
  22. package/lib/index.js +48 -5
  23. package/lib/index.js.map +1 -1
  24. package/lib/renderer.d.ts +4 -0
  25. package/lib/renderer.js +10 -0
  26. package/lib/renderer.js.map +1 -0
  27. package/package.json +34 -15
  28. package/src/components/ShortcutInput.tsx +501 -0
  29. package/src/components/ShortcutItem.tsx +491 -0
  30. package/src/components/ShortcutList.tsx +61 -0
  31. package/src/components/ShortcutTitleItem.tsx +33 -0
  32. package/src/components/ShortcutUI.tsx +512 -0
  33. package/src/components/TopNav.tsx +193 -0
  34. package/src/components/index.ts +7 -0
  35. package/src/index.ts +297 -0
  36. package/src/renderer.tsx +13 -0
  37. package/style/base.css +393 -0
  38. package/style/index.css +10 -0
  39. package/style/index.js +10 -0
package/src/index.ts ADDED
@@ -0,0 +1,297 @@
1
+ // Copyright (c) Jupyter Development Team.
2
+ // Distributed under the terms of the Modified BSD License.
3
+ /**
4
+ * @packageDocumentation
5
+ * @module shortcuts-extension
6
+ */
7
+
8
+ import {
9
+ JupyterFrontEnd,
10
+ JupyterFrontEndPlugin
11
+ } from '@jupyterlab/application';
12
+ import { ISettingRegistry, SettingRegistry } from '@jupyterlab/settingregistry';
13
+ import { ITranslator, nullTranslator } from '@jupyterlab/translation';
14
+ import {
15
+ IFormRenderer,
16
+ IFormRendererRegistry
17
+ } from '@jupyterlab/ui-components';
18
+ import { CommandRegistry } from '@lumino/commands';
19
+ import {
20
+ JSONExt,
21
+ ReadonlyPartialJSONObject,
22
+ ReadonlyPartialJSONValue
23
+ } from '@lumino/coreutils';
24
+ import { DisposableSet, IDisposable } from '@lumino/disposable';
25
+ import { Platform } from '@lumino/domutils';
26
+ import { Menu } from '@lumino/widgets';
27
+ import { IShortcutUIexternal } from './components';
28
+ import { renderShortCut } from './renderer';
29
+
30
+ function getExternalForJupyterLab(
31
+ settingRegistry: ISettingRegistry,
32
+ app: JupyterFrontEnd,
33
+ translator: ITranslator
34
+ ): IShortcutUIexternal {
35
+ const { commands } = app;
36
+ const shortcutPluginLocation = '@jupyterlab/shortcuts-extension:shortcuts';
37
+ return {
38
+ translator,
39
+ getAllShortCutSettings: () =>
40
+ settingRegistry.reload(shortcutPluginLocation),
41
+ removeShortCut: (key: string) =>
42
+ settingRegistry.remove(shortcutPluginLocation, key),
43
+ createMenu: () => new Menu({ commands }),
44
+ hasCommand: (id: string) => commands.hasCommand(id),
45
+ addCommand: (id: string, options: CommandRegistry.ICommandOptions) =>
46
+ commands.addCommand(id, options),
47
+ getLabel: (id: string) => commands.label(id)
48
+ };
49
+ }
50
+
51
+ /**
52
+ * The default shortcuts extension.
53
+ *
54
+ * #### Notes
55
+ * Shortcut values are stored in the setting system. The default values for each
56
+ * shortcut are preset in the settings schema file of this extension.
57
+ * Additionally, each shortcut can be individually set by the end user by
58
+ * modifying its setting (either in the text editor or by modifying its
59
+ * underlying JSON schema file).
60
+ *
61
+ * When setting shortcut selectors, there are two concepts to consider:
62
+ * specificity and matchability. These two interact in sometimes
63
+ * counterintuitive ways. Keyboard events are triggered from an element and
64
+ * they propagate up the DOM until they reach the `documentElement` (`<body>`).
65
+ *
66
+ * When a registered shortcut sequence is fired, the shortcut manager checks
67
+ * the node that fired the event and each of its ancestors until a node matches
68
+ * one or more registered selectors. The *first* matching selector in the
69
+ * chain of ancestors will invoke the shortcut handler and the traversal will
70
+ * end at that point. If a node matches more than one selector, the handler for
71
+ * whichever selector is more *specific* fires.
72
+ * @see https://www.w3.org/TR/css3-selectors/#specificity
73
+ *
74
+ * The practical consequence of this is that a very broadly matching selector,
75
+ * e.g. `'*'` or `'div'` may match and therefore invoke a handler *before* a
76
+ * more specific selector. The most common pitfall is to use the universal
77
+ * (`'*'`) selector. For almost any use case where a global keyboard shortcut is
78
+ * required, using the `'body'` selector is more appropriate.
79
+ */
80
+ const shortcuts: JupyterFrontEndPlugin<void> = {
81
+ id: '@jupyterlab/shortcuts-extension:shortcuts',
82
+ requires: [ISettingRegistry],
83
+ optional: [ITranslator, IFormRendererRegistry],
84
+ activate: async (
85
+ app: JupyterFrontEnd,
86
+ registry: ISettingRegistry,
87
+ translator: ITranslator | null,
88
+ editorRegistry: IFormRendererRegistry | null
89
+ ) => {
90
+ const translator_ = translator ?? nullTranslator;
91
+ const trans = translator_.load('jupyterlab');
92
+ const { commands } = app;
93
+ let canonical: ISettingRegistry.ISchema | null;
94
+ let loaded: { [name: string]: ISettingRegistry.IShortcut[] } = {};
95
+
96
+ if (editorRegistry) {
97
+ const component: IFormRenderer = {
98
+ fieldRenderer: (props: any) => {
99
+ return renderShortCut({
100
+ external: getExternalForJupyterLab(registry, app, translator_),
101
+ ...props
102
+ });
103
+ }
104
+ };
105
+ editorRegistry.addRenderer(`${shortcuts.id}.shortcuts`, component);
106
+ }
107
+
108
+ /**
109
+ * Populate the plugin's schema defaults.
110
+ */
111
+ function populate(schema: ISettingRegistry.ISchema) {
112
+ const commands = app.commands.listCommands().join('\n');
113
+
114
+ loaded = {};
115
+ schema.properties!.shortcuts.default = Object.keys(registry.plugins)
116
+ .map(plugin => {
117
+ const shortcuts =
118
+ registry.plugins[plugin]!.schema['jupyter.lab.shortcuts'] || [];
119
+ loaded[plugin] = shortcuts;
120
+ return shortcuts;
121
+ })
122
+ .concat([schema.properties!.shortcuts.default as any[]])
123
+ .reduce((acc, val) => {
124
+ if (Platform.IS_MAC) {
125
+ return acc.concat(val);
126
+ } else {
127
+ // If platform is not MacOS, remove all shortcuts containing Cmd
128
+ // as they will be modified; e.g. `Cmd A` becomes `A`
129
+ return acc.concat(
130
+ val.filter(
131
+ shortcut =>
132
+ !shortcut.keys.some(key => {
133
+ const { cmd } = CommandRegistry.parseKeystroke(key);
134
+ return cmd;
135
+ })
136
+ )
137
+ );
138
+ }
139
+ }, []) // flatten one level
140
+ .sort((a, b) => a.command.localeCompare(b.command));
141
+
142
+ schema.properties!.shortcuts.description = trans.__(
143
+ `Note: To disable a system default shortcut,
144
+ copy it to User Preferences and add the
145
+ "disabled" key, for example:
146
+ {
147
+ "command": "application:activate-next-tab",
148
+ "keys": [
149
+ "Ctrl Shift ]"
150
+ ],
151
+ "selector": "body",
152
+ "disabled": true
153
+ }
154
+
155
+ List of commands followed by keyboard shortcuts:
156
+ %1
157
+
158
+ List of keyboard shortcuts:`,
159
+ commands
160
+ );
161
+ }
162
+
163
+ registry.pluginChanged.connect(async (sender, plugin) => {
164
+ if (plugin !== shortcuts.id) {
165
+ // If the plugin changed its shortcuts, reload everything.
166
+ const oldShortcuts = loaded[plugin];
167
+ const newShortcuts =
168
+ registry.plugins[plugin]!.schema['jupyter.lab.shortcuts'] || [];
169
+ if (
170
+ oldShortcuts === undefined ||
171
+ !JSONExt.deepEqual(oldShortcuts, newShortcuts)
172
+ ) {
173
+ canonical = null;
174
+ await registry.reload(shortcuts.id);
175
+ }
176
+ }
177
+ });
178
+
179
+ // Transform the plugin object to return different schema than the default.
180
+ registry.transform(shortcuts.id, {
181
+ compose: plugin => {
182
+ // Only override the canonical schema the first time.
183
+ if (!canonical) {
184
+ canonical = JSONExt.deepCopy(plugin.schema);
185
+ populate(canonical);
186
+ }
187
+
188
+ const defaults = canonical.properties?.shortcuts?.default ?? [];
189
+ const user = {
190
+ shortcuts: plugin.data.user.shortcuts ?? []
191
+ };
192
+ const composite = {
193
+ shortcuts: SettingRegistry.reconcileShortcuts(
194
+ defaults as ISettingRegistry.IShortcut[],
195
+ user.shortcuts as ISettingRegistry.IShortcut[]
196
+ )
197
+ };
198
+
199
+ plugin.data = { composite, user };
200
+
201
+ return plugin;
202
+ },
203
+ fetch: plugin => {
204
+ // Only override the canonical schema the first time.
205
+ if (!canonical) {
206
+ canonical = JSONExt.deepCopy(plugin.schema);
207
+ populate(canonical);
208
+ }
209
+
210
+ return {
211
+ data: plugin.data,
212
+ id: plugin.id,
213
+ raw: plugin.raw,
214
+ schema: canonical,
215
+ version: plugin.version
216
+ };
217
+ }
218
+ });
219
+
220
+ try {
221
+ // Repopulate the canonical variable after the setting registry has
222
+ // preloaded all initial plugins.
223
+ canonical = null;
224
+
225
+ const settings = await registry.load(shortcuts.id);
226
+
227
+ Private.loadShortcuts(commands, settings.composite);
228
+ settings.changed.connect(() => {
229
+ Private.loadShortcuts(commands, settings.composite);
230
+ });
231
+ } catch (error) {
232
+ console.error(`Loading ${shortcuts.id} failed.`, error);
233
+ }
234
+ },
235
+ autoStart: true
236
+ };
237
+
238
+ /**
239
+ * Export the shortcut plugin as default.
240
+ */
241
+ export default shortcuts;
242
+
243
+ /**
244
+ * A namespace for private module data.
245
+ */
246
+ namespace Private {
247
+ /**
248
+ * The internal collection of currently loaded shortcuts.
249
+ */
250
+ let disposables: IDisposable;
251
+
252
+ /**
253
+ * Load the keyboard shortcuts from settings.
254
+ */
255
+ export function loadShortcuts(
256
+ commands: CommandRegistry,
257
+ composite: ReadonlyPartialJSONObject | undefined
258
+ ): void {
259
+ const shortcuts = (composite?.shortcuts ??
260
+ []) as ISettingRegistry.IShortcut[];
261
+
262
+ if (disposables) {
263
+ disposables.dispose();
264
+ }
265
+ disposables = shortcuts.reduce((acc, val): DisposableSet => {
266
+ const options = normalizeOptions(val);
267
+
268
+ if (options) {
269
+ acc.add(commands.addKeyBinding(options));
270
+ }
271
+
272
+ return acc;
273
+ }, new DisposableSet());
274
+ }
275
+
276
+ /**
277
+ * Normalize potential keyboard shortcut options.
278
+ */
279
+ function normalizeOptions(
280
+ value:
281
+ | ReadonlyPartialJSONValue
282
+ | Partial<CommandRegistry.IKeyBindingOptions>
283
+ ): CommandRegistry.IKeyBindingOptions | undefined {
284
+ if (!value || typeof value !== 'object') {
285
+ return undefined;
286
+ }
287
+
288
+ const { isArray } = Array;
289
+ const valid =
290
+ 'command' in value &&
291
+ 'keys' in value &&
292
+ 'selector' in value &&
293
+ isArray((value as Partial<CommandRegistry.IKeyBindingOptions>).keys);
294
+
295
+ return valid ? (value as CommandRegistry.IKeyBindingOptions) : undefined;
296
+ }
297
+ }
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) Jupyter Development Team.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+
6
+ import React from 'react';
7
+ import { IShortcutUIexternal, ShortcutUI } from './components';
8
+
9
+ export const renderShortCut = (props: {
10
+ external: IShortcutUIexternal;
11
+ }): JSX.Element => {
12
+ return <ShortcutUI external={props.external} height={1000} width={1000} />;
13
+ };
package/style/base.css ADDED
@@ -0,0 +1,393 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ /* Shortcut Input Style */
7
+
8
+ .jp-Shortcuts-InputBox {
9
+ display: inline-flex;
10
+ padding-top: 2px;
11
+ }
12
+
13
+ .jp-Shortcuts-InputBoxNew {
14
+ margin-left: 10px;
15
+ }
16
+
17
+ .jp-mod-hidden {
18
+ display: hidden;
19
+ }
20
+
21
+ @keyframes slide-animation {
22
+ from {
23
+ width: 0;
24
+ left: 0;
25
+ }
26
+
27
+ to {
28
+ width: 120px;
29
+ left: 0;
30
+ }
31
+ }
32
+
33
+ .jp-Shortcuts-Input {
34
+ animation-duration: 0.5 s;
35
+ animation-timing-function: ease-out;
36
+ animation-name: 'slide-animation';
37
+ border-width: var(--jp-border-width);
38
+ border-color: var(--jp-border-color3);
39
+ border-style: solid;
40
+ background-color: var(--jp-layout-color0);
41
+ margin-left: auto;
42
+ padding-left: 10px;
43
+ width: 120px;
44
+ height: 25px;
45
+ line-height: 25px;
46
+ display: block;
47
+ }
48
+
49
+ .jp-Shortcuts-Input:focus {
50
+ outline: none;
51
+ color: var(--jp-content-font-color1);
52
+ border-color: var(--jp-brand-color2);
53
+ }
54
+
55
+ .jp-mod-unavailable-Input:focus {
56
+ border-color: var(--jp-error-color2);
57
+ }
58
+
59
+ .jp-Shortcuts-InputText {
60
+ overflow-x: hidden;
61
+ overflow-y: hidden;
62
+ margin: 0;
63
+ margin-top: 4px;
64
+ padding: 0 5px;
65
+ height: 17px;
66
+ line-height: 17px;
67
+ width: fit-content;
68
+ }
69
+
70
+ .jp-mod-selected-InputText {
71
+ background-color: var(--jp-brand-color3);
72
+ overflow: hidden;
73
+ }
74
+
75
+ .jp-mod-waiting-InputText {
76
+ color: var(--jp-content-font-color3);
77
+ }
78
+
79
+ .jp-Shortcuts-Submit {
80
+ background-color: var(--jp-brand-color2);
81
+ border-radius: 0;
82
+ border: none;
83
+ color: var(--jp-layout-color0);
84
+ font-family: var(--jp-ui-font-family);
85
+ display: block;
86
+ height: 27px;
87
+ width: 26px;
88
+ cursor: pointer;
89
+ }
90
+
91
+ .jp-Shortcuts-Submit:focus {
92
+ outline: none;
93
+ }
94
+
95
+ .jp-Shortcuts-Submit .jp-icon3[fill] {
96
+ fill: var(--jp-layout-color1);
97
+ }
98
+
99
+ .jp-Shortcuts-Submit.jp-mod-defunc-Submit {
100
+ background-color: var(--jp-layout-color3);
101
+ }
102
+
103
+ .jp-Shortcuts-Submit.jp-mod-defunc-Submit .jp-icon3[fill] {
104
+ fill: var(--jp-inverse-layout-color1);
105
+ }
106
+
107
+ .jp-Shortcuts-Submit.jp-mod-conflict-Submit {
108
+ background-color: var(--jp-error-color1);
109
+ }
110
+
111
+ /* Shortcut Item Style */
112
+ .jp-Shortcuts-Cell {
113
+ padding: 6px 12px;
114
+ display: table-cell;
115
+ width: 20%;
116
+ vertical-align: middle;
117
+ }
118
+
119
+ .jp-Shortcuts-ShortcutCell {
120
+ display: flex;
121
+ min-width: 100px;
122
+ flex-wrap: wrap;
123
+ }
124
+
125
+ .jp-Shortcuts-EmptyCell {
126
+ height: 32px;
127
+ }
128
+
129
+ .jp-Shortcuts-Row {
130
+ padding: 10px;
131
+ width: 100%;
132
+ display: table-row;
133
+ border-bottom: var(--jp-border-width) solid var(--jp-border-color1);
134
+ vertical-align: middle;
135
+ background-color: var(--jp-layout-color0);
136
+ }
137
+
138
+ .jp-Shortcuts-Row:hover .jp-Shortcuts-ShortcutKeys {
139
+ border-color: var(--jp-border-color1);
140
+ background: var(--jp-layout-color2);
141
+ }
142
+
143
+ .jp-Shortcuts-Row:hover #add-link,
144
+ .jp-Shortcuts-Row:hover #or {
145
+ display: block;
146
+ }
147
+
148
+ .jp-Shortcuts-ErrorMessage {
149
+ color: var(--jp-error-color1);
150
+ margin-top: 9px;
151
+ }
152
+
153
+ .jp-Shortcuts-ErrorButton {
154
+ line-height: 34px;
155
+ margin-left: 10px;
156
+ }
157
+
158
+ .jp-Shortcuts-ErrorButton button:nth-of-type(1) {
159
+ height: 25px;
160
+ margin-right: 5px;
161
+ background-color: var(--jp-border-color0);
162
+ color: white;
163
+ outline: none;
164
+ }
165
+
166
+ .jp-Shortcuts-ErrorButton button:nth-of-type(1):active,
167
+ .jp-Shortcuts-ErrorButton button:nth-of-type(1):focus {
168
+ outline: none;
169
+ border: none;
170
+ }
171
+
172
+ .jp-Shortcuts-ErrorButton button:nth-of-type(2) {
173
+ height: 25px;
174
+ background-color: var(--jp-error-color1);
175
+ color: white;
176
+ outline: none;
177
+ }
178
+
179
+ .jp-Shortcuts-ErrorButton button:nth-of-type(2):active,
180
+ .jp-Shortcuts-ErrorButton button:nth-of-type(2):focus {
181
+ outline: none;
182
+ border: none;
183
+ }
184
+
185
+ .jp-Shortcuts-ShortcutContainer {
186
+ display: flex;
187
+ flex-wrap: wrap;
188
+ }
189
+
190
+ .jp-Shortcuts-ShortcutContainer:hover .jp-Shortcuts-ShortcutKeys {
191
+ border-color: var(--jp-border-color3);
192
+ background: var(--jp-layout-color3);
193
+ }
194
+
195
+ .jp-Shortcuts-ShortcutKeysContainer {
196
+ font-size: var(--jp-code-font-size);
197
+ font-family: var(--jp-ui-font-family);
198
+ display: flex;
199
+ }
200
+
201
+ .jp-Shortcuts-ConflictContainer {
202
+ display: flex;
203
+ flex-wrap: wrap;
204
+ padding: 6px 12px;
205
+ margin-left: 20%;
206
+ }
207
+
208
+ .jp-Shortcuts-ShortcutKeys {
209
+ border-width: var(--jp-border-width);
210
+ border-color: var(--jp-layout-color0);
211
+ border-radius: var(--jp-border-radius);
212
+ padding: 5px 6px;
213
+ margin: 3px 0;
214
+ }
215
+
216
+ .jp-Shortcuts-Or {
217
+ margin-right: 12px;
218
+ margin-left: 12px;
219
+ margin-top: 8px;
220
+ color: var(--jp-content-font-color3);
221
+ display: none;
222
+ }
223
+
224
+ .jp-Shortcuts-Or:hover {
225
+ display: block;
226
+ }
227
+
228
+ .jp-Shortcuts-OrTwo {
229
+ margin-right: 12px;
230
+ margin-left: 12px;
231
+ margin-top: 8px;
232
+ color: var(--jp-content-font-color3);
233
+ display: block;
234
+ }
235
+
236
+ .jp-Shortcuts-Comma {
237
+ margin-top: 10px;
238
+ margin-right: 2px;
239
+ margin-left: 2px;
240
+ }
241
+
242
+ .jp-Shortcuts-Plus {
243
+ display: none;
244
+ background: var(--jp-brand-color3);
245
+ border-color: var(--jp-layout-color0);
246
+ border-radius: var(--jp-border-radius);
247
+ border-width: var(--jp-border-width);
248
+ margin: 3px 0;
249
+ padding: 5px 6px;
250
+ }
251
+
252
+ .jp-Shortcuts-Plus:hover {
253
+ background-color: var(--jp-brand-color2);
254
+ }
255
+
256
+ .jp-Shortcuts-Plus:active {
257
+ background-color: var(--jp-brand-color2);
258
+ }
259
+
260
+ .jp-Shortcuts-Reset {
261
+ color: var(--jp-brand-color2);
262
+ padding-left: 10px;
263
+ }
264
+
265
+ .jp-Shortcuts-Reset:hover {
266
+ color: var(--jp-brand-color1);
267
+ }
268
+
269
+ .jp-Shortcuts-SourceCell {
270
+ display: inline-block;
271
+ }
272
+
273
+ /* Shortcut List Style */
274
+ .jp-Shortcuts-ShortcutList {
275
+ width: 100%;
276
+ display: table;
277
+ border-collapse: collapse;
278
+ }
279
+
280
+ .jp-Shortcuts-ShortcutListContainer {
281
+ overflow-y: scroll;
282
+ border: var(--jp-border-width) solid var(--jp-border-color1);
283
+ }
284
+
285
+ /* Shortcut Title Item Style */
286
+ .jp-Shortcuts-Header {
287
+ display: flex;
288
+ cursor: pointer;
289
+ }
290
+
291
+ .jp-Shortcuts-Header:hover .jp-ShortcutTitleItem-sortButton .jp-icon3[fill],
292
+ .jp-Shortcuts-Header:focus .jp-ShortcutTitleItem-sortButton .jp-icon3[fill] {
293
+ fill: var(--jp-ui-font-color0);
294
+ }
295
+
296
+ .jp-Shortcuts-Header:active .jp-ShortcutTitleItem-sortButton {
297
+ outline: none;
298
+ }
299
+
300
+ .jp-Shortcuts-CurrentHeader .jp-icon3[fill] {
301
+ fill: var(--jp-ui-font-color0);
302
+ }
303
+
304
+ /* Shortcut UI Style */
305
+
306
+ .jp-Shortcuts-ShortcutUI {
307
+ display: flex;
308
+ flex-direction: column;
309
+ font-size: var(--jp-ui-font-size1);
310
+ font-family: var(--jp-ui-font-family);
311
+ color: var(--jp-content-font-color1);
312
+ min-width: 450px;
313
+ width: 100%;
314
+ }
315
+
316
+ /* TopNav Style */
317
+ .jp-Shortcuts-Top {
318
+ display: block;
319
+ }
320
+
321
+ .jp-Shortcuts-TopNav {
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: space-between;
325
+ box-sizing: border-box;
326
+ font-size: var(--jp-ui-font-size1);
327
+ background-color: var(--jp-layout-color0);
328
+ }
329
+
330
+ .jp-Shortcuts-Symbols {
331
+ padding: 0 12px;
332
+ }
333
+
334
+ .jp-Shortcuts-Symbols td:nth-child(2) {
335
+ padding-right: 10px;
336
+ }
337
+
338
+ .jp-Shortcuts-Search {
339
+ height: 30px;
340
+ }
341
+
342
+ .jp-Shortcuts-Search > input {
343
+ box-shadow: none;
344
+ }
345
+
346
+ .jp-Shortcuts-AdvancedOptionsSmall {
347
+ width: 30%;
348
+ }
349
+
350
+ .jp-Shortcuts-AdvancedOptionsRight {
351
+ margin-top: 8px;
352
+ }
353
+
354
+ .jp-Shortcuts-AdvancedOptionsLink {
355
+ color: var(--jp-content-link-color);
356
+ text-decoration: none;
357
+ margin-right: 15px;
358
+ }
359
+
360
+ .jp-Shortcuts-AdvancedOptionsLink:hover {
361
+ color: var(--jp-brand-color0);
362
+ }
363
+
364
+ .jp-Shortcuts-AdvancedOptionsLink:active {
365
+ color: var(--jp-brand-color0);
366
+ }
367
+
368
+ .jp-Shortcuts-HeaderRowContainer {
369
+ padding-right: 14px;
370
+ }
371
+
372
+ .jp-Shortcuts-HeaderRow {
373
+ font-weight: bold;
374
+ font-size: var(--jp-ui-font-size1);
375
+ background-color: var(--jp-layout-color0);
376
+ width: 100%;
377
+ z-index: 1;
378
+ display: table;
379
+ padding: 10px 0;
380
+ }
381
+
382
+ .jp-Shortcuts-commandIcon {
383
+ margin-right: 13px;
384
+ }
385
+
386
+ .jp-Shortcuts-altIcon {
387
+ margin-right: 14px;
388
+ }
389
+
390
+ .jp-Shortcuts-controlIcon {
391
+ margin-left: 8px;
392
+ margin-right: 16px;
393
+ }
@@ -0,0 +1,10 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ /* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
7
+ @import url('~@lumino/widgets/style/index.css');
8
+ @import url('~@jupyterlab/ui-components/style/index.css');
9
+
10
+ @import url('./base.css');
package/style/index.js ADDED
@@ -0,0 +1,10 @@
1
+ /*-----------------------------------------------------------------------------
2
+ | Copyright (c) Jupyter Development Team.
3
+ | Distributed under the terms of the Modified BSD License.
4
+ |----------------------------------------------------------------------------*/
5
+
6
+ /* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
7
+ import '@lumino/widgets/style/index.js';
8
+ import '@jupyterlab/ui-components/style/index.js';
9
+
10
+ import './base.css';