@jupyterlab/ui-components 3.3.0-alpha.6 → 4.0.0-alpha.15

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 (38) hide show
  1. package/lib/components/button.d.ts +21 -0
  2. package/lib/components/button.js +24 -0
  3. package/lib/components/button.js.map +1 -0
  4. package/lib/components/collapse.d.ts +13 -58
  5. package/lib/components/collapse.js +20 -141
  6. package/lib/components/collapse.js.map +1 -1
  7. package/lib/components/collapser.d.ts +64 -0
  8. package/lib/components/collapser.js +145 -0
  9. package/lib/components/collapser.js.map +1 -0
  10. package/lib/components/index.d.ts +4 -1
  11. package/lib/components/index.js +4 -1
  12. package/lib/components/index.js.map +1 -1
  13. package/lib/components/inputgroup.d.ts +18 -0
  14. package/lib/components/inputgroup.js +27 -0
  15. package/lib/components/inputgroup.js.map +1 -0
  16. package/lib/components/menu.d.ts +18 -13
  17. package/lib/components/menu.js +138 -3
  18. package/lib/components/menu.js.map +1 -1
  19. package/lib/components/toolbar.d.ts +115 -17
  20. package/lib/components/toolbar.js +209 -53
  21. package/lib/components/toolbar.js.map +1 -1
  22. package/lib/icon/iconimports.d.ts +1 -0
  23. package/lib/icon/iconimports.js +2 -0
  24. package/lib/icon/iconimports.js.map +1 -1
  25. package/lib/index.d.ts +0 -1
  26. package/lib/index.js +0 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/style/icon.js +0 -1
  29. package/lib/style/icon.js.map +1 -1
  30. package/package.json +14 -24
  31. package/style/base.css +88 -17
  32. package/style/deprecated.css +4 -0
  33. package/style/icons/toolbar/bug-dot.svg +6 -0
  34. package/style/index.css +0 -2
  35. package/style/index.js +0 -2
  36. package/lib/blueprint.d.ts +0 -20
  37. package/lib/blueprint.js +0 -23
  38. package/lib/blueprint.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupyterlab/ui-components",
3
- "version": "3.3.0-alpha.6",
3
+ "version": "4.0.0-alpha.15",
4
4
  "description": "JupyterLab - UI components written in React",
5
5
  "homepage": "https://github.com/jupyterlab/jupyterlab",
6
6
  "bugs": {
@@ -42,20 +42,18 @@
42
42
  "watch": "tsc -b --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@blueprintjs/core": "^3.36.0",
46
- "@blueprintjs/select": "^3.15.0",
47
- "@jupyterlab/coreutils": "^5.3.0-alpha.6",
48
- "@jupyterlab/translation": "^3.3.0-alpha.6",
49
- "@lumino/algorithm": "^1.3.3",
50
- "@lumino/commands": "^1.12.0",
51
- "@lumino/coreutils": "^1.5.3",
52
- "@lumino/disposable": "^1.4.3",
53
- "@lumino/messaging": "^1.4.3",
54
- "@lumino/polling": "^1.3.3",
55
- "@lumino/properties": "^1.2.3",
56
- "@lumino/signaling": "^1.4.3",
57
- "@lumino/virtualdom": "^1.8.0",
58
- "@lumino/widgets": "^1.26.0",
45
+ "@jupyterlab/coreutils": "^5.3.0-alpha.15",
46
+ "@jupyterlab/translation": "^3.3.0-alpha.15",
47
+ "@lumino/algorithm": "^1.8.0",
48
+ "@lumino/commands": "^1.17.0",
49
+ "@lumino/coreutils": "^1.10.0",
50
+ "@lumino/disposable": "^1.9.0",
51
+ "@lumino/messaging": "^1.9.0",
52
+ "@lumino/polling": "^1.8.0",
53
+ "@lumino/properties": "^1.7.0",
54
+ "@lumino/signaling": "^1.9.0",
55
+ "@lumino/virtualdom": "^1.13.0",
56
+ "@lumino/widgets": "^1.28.0",
59
57
  "react": "^17.0.1",
60
58
  "react-dom": "^17.0.1",
61
59
  "typestyle": "^2.0.4"
@@ -63,7 +61,7 @@
63
61
  "devDependencies": {
64
62
  "@babel/core": "^7.10.2",
65
63
  "@babel/preset-env": "^7.10.2",
66
- "@jupyterlab/testutils": "^3.3.0-alpha.6",
64
+ "@jupyterlab/testutils": "^3.3.0-alpha.15",
67
65
  "@storybook/addon-actions": "6.0.20",
68
66
  "@storybook/react": "6.0.20",
69
67
  "@types/jest": "^26.0.10",
@@ -83,13 +81,5 @@
83
81
  "publishConfig": {
84
82
  "access": "public"
85
83
  },
86
- "jupyterlab": {
87
- "extraStyles": {
88
- "blueprintjs": [
89
- "icons/lib/css/blueprint-icons.css",
90
- "core/lib/css/blueprint.css"
91
- ]
92
- }
93
- },
94
84
  "styleModule": "style/index.js"
95
85
  }
package/style/base.css CHANGED
@@ -28,8 +28,13 @@ html {
28
28
  }
29
29
 
30
30
  body {
31
- color: unset;
32
- font-family: var(--jp-ui-font-family);
31
+ color: var(--jp-ui-font-color1);
32
+ font-size: var(--jp-ui-font-size1);
33
+ /* Blueprint reset rules */
34
+ font-weight: 400;
35
+ letter-spacing: 0;
36
+ line-height: 1.28581;
37
+ text-transform: none;
33
38
  }
34
39
 
35
40
  p {
@@ -64,29 +69,79 @@ a:hover {
64
69
 
65
70
  /* Styles for ui-components */
66
71
  .jp-Button {
72
+ color: var(--jp-ui-font-color2);
67
73
  border-radius: var(--jp-border-radius);
68
74
  padding: 0px 12px;
69
75
  font-size: var(--jp-ui-font-size1);
76
+ /* Copy from blueprint 3 */
77
+ display: inline-flex;
78
+ flex-direction: row;
79
+ border: none;
80
+ cursor: pointer;
81
+ align-items: center;
82
+ justify-content: center;
83
+ text-align: left;
84
+ vertical-align: middle;
85
+ min-height: 30px;
86
+ min-width: 30px;
87
+ }
88
+
89
+ .jp-Button:disabled {
90
+ cursor: not-allowed;
91
+ }
92
+
93
+ .jp-Button:empty {
94
+ padding: 0 !important;
95
+ }
96
+
97
+ .jp-Button.jp-mod-small {
98
+ min-height: 24px;
99
+ min-width: 24px;
100
+ font-size: 12px;
101
+ padding: 0 7px;
70
102
  }
71
103
 
72
104
  /* Use our own theme for hover styles */
73
- button.jp-Button.bp3-button.bp3-minimal:hover {
105
+ .jp-Button.jp-mod-minimal:hover {
74
106
  background-color: var(--jp-layout-color2);
75
107
  }
76
- .jp-Button.minimal {
77
- color: unset !important;
108
+
109
+ .jp-Button.jp-mod-minimal {
110
+ background: none;
78
111
  }
79
112
 
80
- .jp-Button.jp-ToolbarButtonComponent {
81
- text-transform: none;
113
+ .jp-InputGroup {
114
+ display: block;
115
+ position: relative;
82
116
  }
83
117
 
84
118
  .jp-InputGroup input {
85
119
  box-sizing: border-box;
120
+ border: none;
86
121
  border-radius: 0;
87
122
  background-color: transparent;
88
123
  color: var(--jp-ui-font-color0);
89
124
  box-shadow: inset 0 0 0 var(--jp-border-width) var(--jp-input-border-color);
125
+
126
+ padding-bottom: 0px;
127
+ padding-top: 0px;
128
+ padding-left: 10px;
129
+ padding-right: 28px;
130
+ position: relative;
131
+ width: 100%;
132
+
133
+ -webkit-appearance: none;
134
+ -moz-appearance: none;
135
+ appearance: none;
136
+
137
+ font-size: 14px;
138
+ font-weight: 400;
139
+
140
+ height: 30px;
141
+ line-height: 30px;
142
+
143
+ outline: none;
144
+ vertical-align: middle;
90
145
  }
91
146
 
92
147
  .jp-InputGroup input:focus {
@@ -95,23 +150,28 @@ button.jp-Button.bp3-button.bp3-minimal:hover {
95
150
  inset 0 0 0 3px var(--jp-input-active-box-shadow-color);
96
151
  }
97
152
 
98
- .jp-InputGroup input::placeholder,
99
- input::placeholder {
100
- color: var(--jp-ui-font-color3);
153
+ .jp-InputGroup input:disabled {
154
+ cursor: not-allowed;
155
+ resize: block;
156
+ background-color: var(--jp-layout-color2);
157
+ color: var(--jp-ui-font-color2);
101
158
  }
102
159
 
103
- .jp-BPIcon {
104
- display: inline-block;
105
- vertical-align: middle;
106
- margin: auto;
160
+ .jp-InputGroup input:disabled ~ span {
161
+ cursor: not-allowed;
162
+ color: var(--jp-ui-font-color2);
107
163
  }
108
164
 
109
- /* Stop blueprint futzing with our icon fills */
110
- .bp3-icon.jp-BPIcon > svg:not([fill]) {
111
- fill: var(--jp-inverse-layout-color3);
165
+ .jp-InputGroup input::placeholder,
166
+ input::placeholder {
167
+ color: var(--jp-ui-font-color2);
112
168
  }
113
169
 
114
170
  .jp-InputGroupAction {
171
+ position: absolute;
172
+ top: 0;
173
+ right: 0;
174
+
115
175
  padding: 6px;
116
176
  }
117
177
 
@@ -131,6 +191,17 @@ input::placeholder {
131
191
  -webkit-appearance: none;
132
192
  }
133
193
 
194
+ .jp-HTMLSelect.jp-DefaultStyle select:disabled {
195
+ background-color: var(--jp-layout-color2);
196
+ color: var(--jp-ui-font-color2);
197
+ cursor: not-allowed;
198
+ resize: block;
199
+ }
200
+
201
+ .jp-HTMLSelect.jp-DefaultStyle select:disabled ~ span {
202
+ cursor: not-allowed;
203
+ }
204
+
134
205
  /* Use our own theme for hover and option styles */
135
206
  .jp-HTMLSelect.jp-DefaultStyle select:hover,
136
207
  .jp-HTMLSelect.jp-DefaultStyle select > option {
@@ -13,6 +13,7 @@
13
13
 
14
14
  :root {
15
15
  --jp-icon-add: url('icons/toolbar/add.svg');
16
+ --jp-icon-bug-dot: url('icons/toolbar/bug-dot.svg');
16
17
  --jp-icon-bug: url('icons/toolbar/bug.svg');
17
18
  --jp-icon-build: url('icons/sidebar/build.svg');
18
19
  --jp-icon-caret-down-empty-thin: url('icons/arrow/caret-down-empty-thin.svg');
@@ -97,6 +98,9 @@
97
98
  .jp-AddIcon {
98
99
  background-image: var(--jp-icon-add);
99
100
  }
101
+ .jp-BugDotIcon {
102
+ background-image: var(--jp-icon-bug-dot);
103
+ }
100
104
  .jp-BugIcon {
101
105
  background-image: var(--jp-icon-bug);
102
106
  }
@@ -0,0 +1,6 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g class="jp-icon3 jp-icon-selectable" fill="#616161">
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M17.19 8H20V10H17.91C17.96 10.33 18 10.66 18 11V12H20V14H18.5H18V14.0275C15.75 14.2762 14 16.1837 14 18.5C14 19.208 14.1635 19.8779 14.4549 20.4739C13.7063 20.8117 12.8757 21 12 21C9.78 21 7.85 19.79 6.81 18H4V16H6.09C6.04 15.67 6 15.34 6 15V14H4V12H6V11C6 10.66 6.04 10.33 6.09 10H4V8H6.81C7.26 7.22 7.88 6.55 8.62 6.04L7 4.41L8.41 3L10.59 5.17C11.04 5.06 11.51 5 12 5C12.49 5 12.96 5.06 13.42 5.17L15.59 3L17 4.41L15.37 6.04C16.12 6.55 16.74 7.22 17.19 8ZM10 16H14V14H10V16ZM10 12H14V10H10V12Z" fill="#616161"/>
4
+ <path d="M22 18.5C22 20.433 20.433 22 18.5 22C16.567 22 15 20.433 15 18.5C15 16.567 16.567 15 18.5 15C20.433 15 22 16.567 22 18.5Z" fill="#616161"/>
5
+ </g>
6
+ </svg>
package/style/index.css CHANGED
@@ -4,8 +4,6 @@
4
4
  |----------------------------------------------------------------------------*/
5
5
 
6
6
  /* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
7
- @import url('~@blueprintjs/core/lib/css/blueprint.css');
8
- @import url('~@blueprintjs/select/lib/css/blueprint-select.css');
9
7
  @import url('~@lumino/widgets/style/index.css');
10
8
 
11
9
  @import url('./base.css');
package/style/index.js CHANGED
@@ -4,8 +4,6 @@
4
4
  |----------------------------------------------------------------------------*/
5
5
 
6
6
  /* This file was auto-generated by ensurePackage() in @jupyterlab/buildutils */
7
- import '@blueprintjs/core/lib/css/blueprint.css';
8
- import '@blueprintjs/select/lib/css/blueprint-select.css';
9
7
  import '@lumino/widgets/style/index.js';
10
8
 
11
9
  import './base.css';
@@ -1,20 +0,0 @@
1
- import { IButtonProps as IBPButtonProps } from '@blueprintjs/core/lib/cjs/components/button/buttons';
2
- import { ICollapseProps } from '@blueprintjs/core/lib/cjs/components/collapse/collapse';
3
- import { ICheckboxProps } from '@blueprintjs/core/lib/cjs/components/forms/controls';
4
- import { IInputGroupProps as IBPInputGroupProps } from '@blueprintjs/core/lib/cjs/components/forms/inputGroup';
5
- import { ISelectProps } from '@blueprintjs/select/lib/cjs/components/select/select';
6
- import * as React from 'react';
7
- export { Intent } from '@blueprintjs/core/lib/cjs/common/intent';
8
- interface IButtonProps extends IBPButtonProps {
9
- title?: string;
10
- type?: 'button' | 'submit' | 'reset';
11
- }
12
- interface IInputGroupProps extends IBPInputGroupProps {
13
- rightIcon?: string;
14
- }
15
- declare type CommonProps<T> = React.DOMAttributes<T>;
16
- export declare const Button: (props: IButtonProps & CommonProps<any>) => JSX.Element;
17
- export declare const InputGroup: (props: IInputGroupProps & CommonProps<any>) => JSX.Element;
18
- export declare const Collapse: (props: ICollapseProps & CommonProps<any>) => JSX.Element;
19
- export declare const Select: (props: ISelectProps<any> & CommonProps<any>) => JSX.Element;
20
- export declare const Checkbox: (props: ICheckboxProps & CommonProps<any>) => JSX.Element;
package/lib/blueprint.js DELETED
@@ -1,23 +0,0 @@
1
- // Copyright (c) Jupyter Development Team.
2
- // Distributed under the terms of the Modified BSD License.
3
- import { Button as BPButton } from '@blueprintjs/core/lib/cjs/components/button/buttons';
4
- import { Collapse as BPCollapse } from '@blueprintjs/core/lib/cjs/components/collapse/collapse';
5
- import { Checkbox as BPCheckbox } from '@blueprintjs/core/lib/cjs/components/forms/controls';
6
- import { InputGroup as BPInputGroup } from '@blueprintjs/core/lib/cjs/components/forms/inputGroup';
7
- import { Select as BPSelect } from '@blueprintjs/select/lib/cjs/components/select/select';
8
- import * as React from 'react';
9
- import { LabIcon } from './icon';
10
- import { classes } from './utils';
11
- export { Intent } from '@blueprintjs/core/lib/cjs/common/intent';
12
- export const Button = (props) => (React.createElement(BPButton, Object.assign({}, props, { className: classes(props.className, props.minimal ? 'minimal' : '', 'jp-Button') })));
13
- export const InputGroup = (props) => {
14
- if (props.rightIcon) {
15
- return (React.createElement(BPInputGroup, Object.assign({}, props, { className: classes(props.className, 'jp-InputGroup'), rightElement: React.createElement("div", { className: "jp-InputGroupAction" },
16
- React.createElement(LabIcon.resolveReact, { icon: props.rightIcon })) })));
17
- }
18
- return (React.createElement(BPInputGroup, Object.assign({}, props, { className: classes(props.className, 'jp-InputGroup') })));
19
- };
20
- export const Collapse = (props) => React.createElement(BPCollapse, Object.assign({}, props));
21
- export const Select = (props) => (React.createElement(BPSelect, Object.assign({}, props, { className: classes(props.className, 'jp-Select') })));
22
- export const Checkbox = (props) => (React.createElement(BPCheckbox, Object.assign({}, props, { className: classes(props.className, 'jp-Checkbox') })));
23
- //# sourceMappingURL=blueprint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blueprint.js","sourceRoot":"","sources":["../src/blueprint.tsx"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EACL,MAAM,IAAI,QAAQ,EAEnB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,QAAQ,IAAI,UAAU,EAEvB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,QAAQ,IAAI,UAAU,EAEvB,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,UAAU,IAAI,YAAY,EAE3B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,MAAM,IAAI,QAAQ,EAEnB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAajE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAsC,EAAe,EAAE,CAAC,CAC7E,oBAAC,QAAQ,oBACH,KAAK,IACT,SAAS,EAAE,OAAO,CAChB,KAAK,CAAC,SAAS,EACf,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAC9B,WAAW,CACZ,IACD,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,KAA0C,EAC7B,EAAE;IACf,IAAI,KAAK,CAAC,SAAS,EAAE;QACnB,OAAO,CACL,oBAAC,YAAY,oBACP,KAAK,IACT,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC,EACpD,YAAY,EACV,6BAAK,SAAS,EAAC,qBAAqB;gBAClC,oBAAC,OAAO,CAAC,YAAY,IAAC,IAAI,EAAE,KAAK,CAAC,SAAS,GAAI,CAC3C,IAER,CACH,CAAC;KACH;IACD,OAAO,CACL,oBAAC,YAAY,oBACP,KAAK,IACT,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC,IACpD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,KAAwC,EAC3B,EAAE,CAAC,oBAAC,UAAU,oBAAK,KAAK,EAAI,CAAC;AAE5C,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,KAA2C,EAC9B,EAAE,CAAC,CAChB,oBAAC,QAAQ,oBAAK,KAAK,IAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAC1E,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,KAAwC,EAC3B,EAAE,CAAC,CAChB,oBAAC,UAAU,oBAAK,KAAK,IAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa,CAAC,IAAI,CAC9E,CAAC"}