@jupyterlab/ui-components 4.6.0-alpha.4 → 4.6.0-beta.0
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/lib/components/form.js +1 -0
- package/lib/components/form.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/panelwithtoolbar.js +2 -1
- package/lib/components/panelwithtoolbar.js.map +1 -1
- package/lib/components/search.js +1 -0
- package/lib/components/search.js.map +1 -1
- package/lib/components/toolbar.d.ts +1 -1
- package/lib/components/toolbar.js +9 -6
- package/lib/components/toolbar.js.map +1 -1
- package/lib/components/vdom.js +1 -0
- package/lib/components/vdom.js.map +1 -1
- package/lib/components/windowedlist.js +2 -0
- package/lib/components/windowedlist.js.map +1 -1
- package/lib/icon/iconimports.d.ts +2 -0
- package/lib/icon/iconimports.js +4 -0
- package/lib/icon/iconimports.js.map +1 -1
- package/lib/icon/labicon.js +7 -1
- package/lib/icon/labicon.js.map +1 -1
- package/lib/icon/widgets/menusvg.js +1 -0
- package/lib/icon/widgets/menusvg.js.map +1 -1
- package/lib/icon/widgets/tabbarsvg.d.ts +15 -1
- package/lib/icon/widgets/tabbarsvg.js +23 -4
- package/lib/icon/widgets/tabbarsvg.js.map +1 -1
- package/lib/style/icon.js +13 -6
- package/lib/style/icon.js.map +1 -1
- package/lib/utils.js +1 -0
- package/lib/utils.js.map +1 -1
- package/package.json +6 -6
- package/src/components/form.tsx +1 -0
- package/src/components/index.ts +1 -0
- package/src/components/panelwithtoolbar.ts +1 -1
- package/src/components/search.tsx +1 -0
- package/src/components/toolbar.tsx +9 -6
- package/src/components/vdom.ts +1 -0
- package/src/components/windowedlist.ts +2 -0
- package/src/icon/iconimports.ts +4 -0
- package/src/icon/labicon.tsx +9 -1
- package/src/icon/widgets/menusvg.ts +1 -0
- package/src/icon/widgets/tabbarsvg.ts +25 -5
- package/src/style/icon.ts +13 -6
- package/src/utils.ts +1 -0
- package/style/base.css +7 -4
- package/style/deprecated.css +10 -0
- package/style/icons/search/case-sensitive.svg +5 -3
- package/style/icons/search/filter-dot.svg +3 -3
- package/style/icons/search/filter.svg +2 -2
- package/style/icons/search/regex.svg +4 -7
- package/style/icons/search/word.svg +6 -3
- package/style/icons/toolbar/jump-back.svg +5 -0
- package/style/icons/toolbar/jump-forward.svg +5 -0
- package/style/rjsfTemplates.css +10 -1
- package/style/sidepanel.css +3 -2
- package/style/spinner.css +1 -1
- package/style/styling.css +3 -1
- package/style/toolbar.css +6 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Copyright (c) Jupyter Development Team.
|
|
2
2
|
// Distributed under the terms of the Modified BSD License.
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
4
|
|
|
4
5
|
import type { ITranslator } from '@jupyterlab/translation';
|
|
5
6
|
import { nullTranslator } from '@jupyterlab/translation';
|
|
6
7
|
import type { VirtualElement } from '@lumino/virtualdom';
|
|
7
|
-
import { hpass } from '@lumino/virtualdom';
|
|
8
|
-
import type { Widget } from '@lumino/widgets';
|
|
8
|
+
import { h, hpass } from '@lumino/virtualdom';
|
|
9
|
+
import type { Title, Widget } from '@lumino/widgets';
|
|
9
10
|
import { DockPanel, TabBar, TabPanel } from '@lumino/widgets';
|
|
10
11
|
import { LabIconStyle } from '../../style';
|
|
11
12
|
import { classes } from '../../utils';
|
|
@@ -37,10 +38,30 @@ export class TabBarSvg<T> extends TabBar<T> {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export namespace TabBarSvg {
|
|
41
|
+
/**
|
|
42
|
+
* Resolve the display label for a widget title.
|
|
43
|
+
*
|
|
44
|
+
* Falls back to the `jpTabLabel` dataset entry, then to the caption.
|
|
45
|
+
*/
|
|
46
|
+
export function titleLabel(title: Title<any>): string {
|
|
47
|
+
return title.label || title.dataset['jpTabLabel'] || title.caption;
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
/**
|
|
41
51
|
* A modified implementation of the TabBar Renderer.
|
|
42
52
|
*/
|
|
43
53
|
export class Renderer extends TabBar.Renderer {
|
|
54
|
+
/**
|
|
55
|
+
* Render the label element for a tab.
|
|
56
|
+
*
|
|
57
|
+
* @param data - The data to use for rendering the tab.
|
|
58
|
+
*
|
|
59
|
+
* @returns A virtual element representing the tab label.
|
|
60
|
+
*/
|
|
61
|
+
renderLabel(data: TabBar.IRenderData<any>): VirtualElement {
|
|
62
|
+
return h.div({ className: 'lm-TabBar-tabLabel' }, titleLabel(data.title));
|
|
63
|
+
}
|
|
64
|
+
|
|
44
65
|
/**
|
|
45
66
|
* Render the close icon element for a tab.
|
|
46
67
|
*
|
|
@@ -50,9 +71,8 @@ export namespace TabBarSvg {
|
|
|
50
71
|
*/
|
|
51
72
|
renderCloseIcon(data: TabBar.IRenderData<any>): VirtualElement {
|
|
52
73
|
const trans = (TabBarSvg.translator ?? nullTranslator).load('jupyterlab');
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
: trans.__('Close tab');
|
|
74
|
+
const label = titleLabel(data.title);
|
|
75
|
+
const title = label ? trans.__('Close %1', label) : trans.__('Close tab');
|
|
56
76
|
const className = classes(
|
|
57
77
|
'jp-icon-hover lm-TabBar-tabCloseIcon',
|
|
58
78
|
LabIconStyle.styleClass({
|
package/src/style/icon.ts
CHANGED
|
@@ -147,12 +147,20 @@ export namespace LabIconStyle {
|
|
|
147
147
|
const builtinSheets: { [k in IBuiltin]: ISheet } = {
|
|
148
148
|
breadCrumb: {
|
|
149
149
|
container: {
|
|
150
|
+
borderRadius: 'var(--jp-border-radius)',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
justifyContent: 'center',
|
|
153
|
+
display: 'inline-flex',
|
|
154
|
+
verticalAlign: 'middle',
|
|
155
|
+
height: '20px',
|
|
156
|
+
width: '20px',
|
|
157
|
+
lineHeight: 1,
|
|
150
158
|
$nest: {
|
|
151
159
|
// `&` will be substituted for the generated classname (interpolation)
|
|
152
|
-
'&:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
'&:focus-visible': {
|
|
161
|
+
outlineWidth: 'var(--jp-focus-outline-width)',
|
|
162
|
+
outlineColor: 'var(--jp-focus-outline-color)',
|
|
163
|
+
outlineStyle: 'solid'
|
|
156
164
|
},
|
|
157
165
|
'&:hover': {
|
|
158
166
|
backgroundColor: 'var(--jp-layout-color2)'
|
|
@@ -166,8 +174,7 @@ export namespace LabIconStyle {
|
|
|
166
174
|
element: {
|
|
167
175
|
borderRadius: 'var(--jp-border-radius)',
|
|
168
176
|
cursor: 'pointer',
|
|
169
|
-
|
|
170
|
-
padding: '0px 2px',
|
|
177
|
+
display: 'block',
|
|
171
178
|
height: '16px',
|
|
172
179
|
width: '16px',
|
|
173
180
|
verticalAlign: 'middle'
|
package/src/utils.ts
CHANGED
package/style/base.css
CHANGED
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
.jp-Button.jp-mod-small {
|
|
101
101
|
min-height: 24px;
|
|
102
102
|
min-width: 24px;
|
|
103
|
-
font-size:
|
|
103
|
+
font-size: calc(var(--jp-ui-font-size1) * 12 / 13);
|
|
104
104
|
padding: 0 7px;
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
-webkit-appearance: none;
|
|
135
135
|
-moz-appearance: none;
|
|
136
136
|
appearance: none;
|
|
137
|
-
font-size:
|
|
137
|
+
font-size: var(--jp-content-font-size1);
|
|
138
138
|
font-weight: 400;
|
|
139
139
|
height: 30px;
|
|
140
140
|
line-height: 30px;
|
|
@@ -206,16 +206,19 @@
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
.jp-HTMLSelect.jp-DefaultStyle select:focus-visible {
|
|
209
|
-
outline:
|
|
209
|
+
outline-width: var(--jp-focus-outline-width);
|
|
210
|
+
outline-color: var(--jp-focus-outline-color);
|
|
211
|
+
outline-style: solid;
|
|
210
212
|
}
|
|
211
213
|
|
|
212
214
|
/* Use our own theme for hover and option styles */
|
|
213
|
-
/* stylelint-disable
|
|
215
|
+
/* stylelint-disable selector-max-type */
|
|
214
216
|
.jp-HTMLSelect.jp-DefaultStyle select:hover,
|
|
215
217
|
.jp-HTMLSelect.jp-DefaultStyle select > option {
|
|
216
218
|
background-color: var(--jp-layout-color2);
|
|
217
219
|
color: var(--jp-ui-font-color0);
|
|
218
220
|
}
|
|
221
|
+
/* stylelint-enable selector-max-type */
|
|
219
222
|
|
|
220
223
|
.jp-ThemedContainer select {
|
|
221
224
|
box-sizing: border-box;
|
package/style/deprecated.css
CHANGED
|
@@ -75,6 +75,8 @@
|
|
|
75
75
|
--jp-icon-inspector: url('icons/filetype/inspector.svg');
|
|
76
76
|
--jp-icon-json: url('icons/filetype/json.svg');
|
|
77
77
|
--jp-icon-julia: url('icons/filetype/julia.svg');
|
|
78
|
+
--jp-icon-jump-back: url('icons/toolbar/jump-back.svg');
|
|
79
|
+
--jp-icon-jump-forward: url('icons/toolbar/jump-forward.svg');
|
|
78
80
|
--jp-icon-jupyter-favicon: url('icons/jupyter/jupyter-favicon.svg');
|
|
79
81
|
--jp-icon-jupyter: url('icons/jupyter/jupyter.svg');
|
|
80
82
|
--jp-icon-jupyterlab-wordmark: url('icons/jupyter/jupyterlab-wordmark.svg');
|
|
@@ -391,6 +393,14 @@
|
|
|
391
393
|
background-image: var(--jp-icon-julia);
|
|
392
394
|
}
|
|
393
395
|
|
|
396
|
+
.jp-JumpBackIcon {
|
|
397
|
+
background-image: var(--jp-icon-jump-back);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.jp-JumpForwardIcon {
|
|
401
|
+
background-image: var(--jp-icon-jump-forward);
|
|
402
|
+
}
|
|
403
|
+
|
|
394
404
|
.jp-JupyterFaviconIcon {
|
|
395
405
|
background-image: var(--jp-icon-jupyter-favicon);
|
|
396
406
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g fill="currentColor">
|
|
3
|
+
<path d="m5 5.76-4 8.89h1.22l1-2.22h4.45l1 2.22H9.9L6 5.75zm.45 1.22 1.77 4.34H3.67z"/>
|
|
4
|
+
<path d="M10.13 6.15c-.04.51.43.91.9.97.67.07 1.4-.15 1.86-.64.33-.36.36-.87.34-1.34v-.53c-.77.45-1.73.27-2.54.61a1 1 0 0 0-.56.93M12.7 4a.6.6 0 0 0 .56-.65c.04-.4-.17-.8-.54-.94-.5-.2-1.07-.21-1.59-.08-.8.25-.8 1.1-.8 1.1h-.99c0-.64.24-1.36.85-1.68.85-.49 1.9-.5 2.83-.23.53.15 1.07.5 1.2 1.06.12.45.06.92.08 1.38v2.86c0 .41.54.27.7.26v.78c-.42.12-.91.2-1.3-.05-.28-.18-.37-.51-.41-.82a2.9 2.9 0 0 1-3.03.94 1.8 1.8 0 0 1-1.24-1.76c-.03-.6.24-1.21.76-1.53.62-.44 1.4-.44 2.12-.54z"/>
|
|
5
|
+
</g>
|
|
4
6
|
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
<
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle class="jp-icon-dot" cx="12.5" cy="12" r="2" fill="currentColor"/>
|
|
3
|
+
<path class="jp-icon3" d="m9.33 8v5.26c0 0.197-0.0429 0.412-0.197 0.549-0.257 0.257-0.686 0.257-0.943 0l-1.34-1.34q-0.206-0.232-0.197-0.557v-3.91l-3.86-4.92a0.686 0.686 0 0 1 0.111-0.935q0.197-0.137 0.42-0.146h9.33q0.223 0 0.42 0.146c0.283 0.232 0.343 0.643 0.111 0.935z" fill="currentColor"/>
|
|
4
4
|
</svg>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path fill="
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path class="jp-icon3" fill="currentColor" d="m9.33 8v5.26c0 0.197-0.0429 0.412-0.197 0.549-0.257 0.257-0.686 0.257-0.943 0l-1.34-1.34q-0.206-0.232-0.197-0.557v-3.91l-3.86-4.92a0.686 0.686 0 0 1 0.111-0.935q0.197-0.137 0.42-0.146h9.33q0.223 0 0.42 0.146c0.283 0.232 0.343 0.643 0.111 0.935z"/>
|
|
3
3
|
</svg>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
<path d="M12 4h1v8h-1z"/>
|
|
6
|
-
<path d="m8.786 9.567 6.928-4 .5.866-6.928 4z"/>
|
|
7
|
-
<path d="m8.786 6.433.5-.866 6.928 4-.5.866z"/>
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g fill="currentColor">
|
|
3
|
+
<circle cx="2.7" cy="13" r="1.7"/>
|
|
4
|
+
<path d="m10 1.1v3.6l-3.1-1.8-0.57 1 3.1 1.8-3.1 1.8 0.57 1 3.1-1.8v3.6h1.2v-3.6l3.1 1.8 0.58-1-3.1-1.8 3.1-1.8-0.57-1-3.1 1.8v-3.6z"/>
|
|
8
5
|
</g>
|
|
9
6
|
</svg>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g fill="currentColor">
|
|
3
|
+
<path d="m1 11.12.04 2.66L15 13.8v-2.67h-1.18l-.01 1.54H2.2v-1.54z"/>
|
|
4
|
+
<path d="M3.16 9.17q0 .46.33.72t.8.26q.55 0 1.07-.25.88-.43.88-1.4v-.85q-.2.12-.5.2t-.6.12l-.64.08q-.57.08-.86.24-.48.28-.48.88M5.7 7.04q.37-.05.49-.31.07-.14.07-.4 0-.54-.39-.78-.38-.25-1.1-.25-.82 0-1.17.45-.19.24-.25.73h-.98q.03-1.16.75-1.61T4.8 4.4q1.1 0 1.8.42.69.42.69 1.31v3.62q0 .17.06.27.07.1.29.1l.16-.01.18-.03v.78q-.24.07-.37.09t-.35.02q-.55 0-.8-.4-.12-.2-.18-.57-.32.42-.92.73t-1.33.31q-.88 0-1.44-.53T2.05 9.2q0-.87.55-1.35.54-.48 1.43-.6ZM4.84 4.4" aria-label="a"/>
|
|
5
|
+
<path d="M8.42 2.21h1.02v3.12q.35-.45.83-.68t1.04-.24q1.18 0 1.9.8.74.81.74 2.38 0 1.5-.72 2.48-.73.98-2 .98-.72 0-1.21-.34-.3-.2-.63-.66v.8h-.97Zm2.74 7.9q.86 0 1.28-.67.43-.68.43-1.8 0-.99-.43-1.64-.42-.65-1.25-.65-.72 0-1.27.54-.54.53-.54 1.76 0 .88.23 1.43.41 1.04 1.55 1.04" aria-label="b"/>
|
|
6
|
+
</g>
|
|
4
7
|
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
|
|
2
|
+
<g transform="translate(24,0) scale(-1,1)" class="jp-icon3 jp-icon-selectable" fill="#616161" shape-rendering="geometricPrecision">
|
|
3
|
+
<path d="M12 14a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m11.46-5.14l-1.59 6.89L15 14.16l3.8-2.38A7.972 7.972 0 0012 8c-3.95 0-7.23 2.86-7.88 6.63l-1.97-.35C2.96 9.58 7.06 6 12 6c3.58 0 6.73 1.89 8.5 4.72l2.96-1.86z"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24">
|
|
2
|
+
<g class="jp-icon3 jp-icon-selectable" fill="#616161" shape-rendering="geometricPrecision">
|
|
3
|
+
<path d="M12 14a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m11.46-5.14l-1.59 6.89L15 14.16l3.8-2.38A7.972 7.972 0 0012 8c-3.95 0-7.23 2.86-7.88 6.63l-1.97-.35C2.96 9.58 7.06 6 12 6c3.58 0 6.73 1.89 8.5 4.72l2.96-1.86z"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
package/style/rjsfTemplates.css
CHANGED
|
@@ -58,11 +58,20 @@
|
|
|
58
58
|
.jp-FormGroup-content fieldset input:focus,
|
|
59
59
|
.jp-FormGroup-content fieldset select:focus {
|
|
60
60
|
-moz-outline-radius: unset;
|
|
61
|
-
outline
|
|
61
|
+
outline-width: var(--jp-focus-outline-width);
|
|
62
|
+
outline-color: var(--jp-input-active-border-color);
|
|
63
|
+
outline-style: solid;
|
|
62
64
|
outline-offset: -1px;
|
|
63
65
|
box-shadow: var(--jp-input-box-shadow);
|
|
64
66
|
}
|
|
65
67
|
|
|
68
|
+
.jp-FormGroup-content fieldset input[type='checkbox']:focus-visible {
|
|
69
|
+
outline-width: var(--jp-focus-outline-width);
|
|
70
|
+
outline-color: var(--jp-focus-outline-color);
|
|
71
|
+
outline-style: solid;
|
|
72
|
+
outline-offset: 1px;
|
|
73
|
+
}
|
|
74
|
+
|
|
66
75
|
.jp-FormGroup-content fieldset input:hover:not(:focus),
|
|
67
76
|
.jp-FormGroup-content fieldset select:hover:not(:focus) {
|
|
68
77
|
background-color: var(--jp-border-color2);
|
package/style/sidepanel.css
CHANGED
|
@@ -58,8 +58,9 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.lm-AccordionPanel .jp-AccordionPanel-title:focus-visible {
|
|
61
|
-
|
|
62
|
-
outline:
|
|
61
|
+
outline-color: var(--jp-focus-outline-color);
|
|
62
|
+
outline-width: var(--jp-focus-outline-width);
|
|
63
|
+
outline-style: solid;
|
|
63
64
|
outline-offset: -2px;
|
|
64
65
|
}
|
|
65
66
|
|
package/style/spinner.css
CHANGED
package/style/styling.css
CHANGED
|
@@ -49,7 +49,9 @@ input.jp-mod-styled:focus {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
input[type='checkbox'].jp-mod-styled:focus-visible {
|
|
52
|
-
outline
|
|
52
|
+
outline-width: var(--jp-focus-outline-width);
|
|
53
|
+
outline-color: var(--jp-focus-outline-color);
|
|
54
|
+
outline-style: solid;
|
|
53
55
|
outline-offset: 1px;
|
|
54
56
|
}
|
|
55
57
|
|
package/style/toolbar.css
CHANGED
|
@@ -80,6 +80,12 @@ button.jp-ToolbarButtonComponent .jp-ToolbarButtonComponent-label {
|
|
|
80
80
|
align-items: center;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
.jp-ToolbarButtonComponent::part(control):focus-visible {
|
|
84
|
+
outline-width: var(--jp-focus-outline-width);
|
|
85
|
+
outline-color: var(--jp-focus-outline-color);
|
|
86
|
+
outline-style: solid;
|
|
87
|
+
}
|
|
88
|
+
|
|
83
89
|
.jp-Toolbar > .jp-Toolbar-item.jp-Toolbar-spacer {
|
|
84
90
|
flex-grow: 1;
|
|
85
91
|
flex-shrink: 1;
|