浏览代码

Update to phosphide 0.1

Steven Silvester 9 年之前
父节点
当前提交
228abd31ad
共有 3 个文件被更改,包括 25 次插入15 次删除
  1. 20 14
      examples/lab/index.css
  2. 4 0
      examples/lab/src/plugin.ts
  3. 1 1
      package.json

+ 20 - 14
examples/lab/index.css

@@ -300,7 +300,7 @@ body {
 }
 
 
-.p-CommandPalette .p-header {
+.p-CommandPalette-header {
   color: #757575;
   font-size: 11px;
   font-weight: 500;
@@ -308,55 +308,61 @@ body {
 }
 
 
-.p-CommandPalette .p-header hr {
+.p-CommandPalette-header hr {
   height: 1px;
   border-width: 0;
   background-color: #e0e0e0;
 }
 
 
-.p-CommandPalette .p-search {
+.p-CommandPalette-search {
   margin-bottom: 4px;
 }
 
 
-.p-CommandPalette .p-search .p-input-wrapper {
+.p-CommandPalette-inputWrapper {
   border: 1px solid #e0e0e0;
   padding: 4px;
 }
 
 
-.p-CommandPalette .p-search input {
+.p-CommandPalette-search input {
   width: 100%;
   border: none;
   outline: none;
 }
 
 
-.p-CommandPalette .p-command {
+.p-CommandPalette-command {
   color: #757575;
+  cursor: pointer;
   font-weight: 500;
   font-size: 13px;
-  padding: 3px 0px;
+  padding: 3px 0 3px 2px;
 }
 
+.p-CommandPalette-command.p-mod-disabled {
+  color: #d5d5d5;
+  cursor: not-allowed;
+}
 
-.p-CommandPalette .p-command .p-description {
+.p-CommandPalette-description {
   color: #9e9e9e;
   font-weight: 400;
   font-size: 10px;
 }
 
+.p-CommandPalette-command.p-mod-disabled .p-CommandPalette-description {
+  color: #d5d5d5;
+}
 
-.p-CommandPalette .p-command .p-shortcut {
+.p-CommandPalette-shortcut {
   margin-right: 15px;
 }
 
-
-.p-CommandPalette .p-command:focus,
-.p-CommandPalette .p-command:focus .p-description,
-.p-CommandPalette .p-command:focus .p-shortcut {
-  outline: 0;
+.p-CommandPalette-command.p-mod-focus,
+.p-CommandPalette-command.p-mod-focus .p-CommandPalette-description,
+.p-CommandPalette-command.p-mod-focus .p-CommandPalette-shortcut {
   background: #2196f3;
   color: #fff;
 }

+ 4 - 0
examples/lab/src/plugin.ts

@@ -44,6 +44,10 @@ function resolve(container: Container): void {
   container.resolve({
     requires: [IAppShell, ICommandPalette, IFileBrowserWidget],
     create: (shell, palette, browser) => {
+      palette.title.text = 'Commands';
+      shell.addToLeftArea(palette, { rank: 40 });
+      shell.attach(document.body);
+      window.addEventListener('resize', () => { shell.update(); });
       browser.title.text = 'Files';
       shell.addToLeftArea(browser, { rank: 40 });
     }

+ 1 - 1
package.json

@@ -11,7 +11,7 @@
     "jupyter-js-services": "^0.3.3",
     "jupyter-js-terminal": "^0.1.12",
     "jupyter-js-utils": "^0.2.6",
-    "phosphide": "^0.0.8",
+    "phosphide": "^0.1.0",
     "phosphor-codemirror": "^0.0.1",
     "phosphor-command": "^0.5.0",
     "phosphor-di": "^0.9.0",