@jupyterlab/ui-components 3.3.0-alpha.7 → 3.3.0-rc.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.
Files changed (52) hide show
  1. package/lib/FormComponentRegistry.d.ts +56 -0
  2. package/lib/FormComponentRegistry.js +44 -0
  3. package/lib/FormComponentRegistry.js.map +1 -0
  4. package/lib/blueprint.js +1 -1
  5. package/lib/blueprint.js.map +1 -1
  6. package/lib/components/index.d.ts +0 -6
  7. package/lib/components/index.js +0 -6
  8. package/lib/components/index.js.map +1 -1
  9. package/lib/components/menu.d.ts +10 -2
  10. package/lib/components/menu.js.map +1 -1
  11. package/lib/icon/iconimports.d.ts +1 -0
  12. package/lib/icon/iconimports.js +2 -0
  13. package/lib/icon/iconimports.js.map +1 -1
  14. package/lib/icon/labicon.d.ts +1 -1
  15. package/lib/icon/labicon.js +1 -2
  16. package/lib/icon/labicon.js.map +1 -1
  17. package/lib/index.d.ts +1 -0
  18. package/lib/index.js +1 -0
  19. package/lib/index.js.map +1 -1
  20. package/lib/style/icon.js +1 -1
  21. package/lib/style/icon.js.map +1 -1
  22. package/lib/utils.d.ts +1 -3
  23. package/lib/utils.js +1 -3
  24. package/lib/utils.js.map +1 -1
  25. package/package.json +5 -8
  26. package/style/base.css +0 -5
  27. package/style/deprecated.css +4 -0
  28. package/style/icons/toolbar/launch.svg +6 -0
  29. package/style/icons.css +0 -11
  30. package/lib/components/collapse.d.ts +0 -64
  31. package/lib/components/collapse.js +0 -145
  32. package/lib/components/collapse.js.map +0 -1
  33. package/lib/components/iframe.d.ts +0 -77
  34. package/lib/components/iframe.js +0 -89
  35. package/lib/components/iframe.js.map +0 -1
  36. package/lib/components/spinner.d.ts +0 -15
  37. package/lib/components/spinner.js +0 -28
  38. package/lib/components/spinner.js.map +0 -1
  39. package/lib/components/styling.d.ts +0 -27
  40. package/lib/components/styling.js +0 -100
  41. package/lib/components/styling.js.map +0 -1
  42. package/lib/components/toolbar.d.ts +0 -354
  43. package/lib/components/toolbar.js +0 -784
  44. package/lib/components/toolbar.js.map +0 -1
  45. package/lib/components/vdom.d.ts +0 -189
  46. package/lib/components/vdom.js +0 -203
  47. package/lib/components/vdom.js.map +0 -1
  48. package/style/collapse.css +0 -30
  49. package/style/iframe.css +0 -33
  50. package/style/spinner.css +0 -79
  51. package/style/styling.css +0 -89
  52. package/style/toolbar.css +0 -115
@@ -1,354 +0,0 @@
1
- /// <reference types="react" />
2
- import { ITranslator } from '@jupyterlab/translation';
3
- import { IIterator } from '@lumino/algorithm';
4
- import { CommandRegistry } from '@lumino/commands';
5
- import { ReadonlyJSONObject } from '@lumino/coreutils';
6
- import { Message } from '@lumino/messaging';
7
- import { Widget } from '@lumino/widgets';
8
- import { LabIcon } from '../icon';
9
- import { ReactWidget } from './vdom';
10
- /**
11
- * A class which provides a toolbar widget.
12
- */
13
- export declare class Toolbar<T extends Widget = Widget> extends Widget {
14
- /**
15
- * Construct a new toolbar widget.
16
- */
17
- constructor();
18
- /**
19
- * Get an iterator over the ordered toolbar item names.
20
- *
21
- * @returns An iterator over the toolbar item names.
22
- */
23
- names(): IIterator<string>;
24
- /**
25
- * Add an item to the end of the toolbar.
26
- *
27
- * @param name - The name of the widget to add to the toolbar.
28
- *
29
- * @param widget - The widget to add to the toolbar.
30
- *
31
- * @param index - The optional name of the item to insert after.
32
- *
33
- * @returns Whether the item was added to toolbar. Returns false if
34
- * an item of the same name is already in the toolbar.
35
- *
36
- * #### Notes
37
- * The item can be removed from the toolbar by setting its parent to `null`.
38
- */
39
- addItem(name: string, widget: T): boolean;
40
- /**
41
- * Dispose of the widget and its descendant widgets.
42
- */
43
- dispose(): void;
44
- /**
45
- * Insert an item into the toolbar at the specified index.
46
- *
47
- * @param index - The index at which to insert the item.
48
- *
49
- * @param name - The name of the item.
50
- *
51
- * @param widget - The widget to add.
52
- *
53
- * @returns Whether the item was added to the toolbar. Returns false if
54
- * an item of the same name is already in the toolbar.
55
- *
56
- * #### Notes
57
- * The index will be clamped to the bounds of the items.
58
- * The item can be removed from the toolbar by setting its parent to `null`.
59
- */
60
- insertItem(index: number, name: string, widget: T): boolean;
61
- /**
62
- * Insert an item into the toolbar at the after a target item.
63
- *
64
- * @param at - The target item to insert after.
65
- *
66
- * @param name - The name of the item.
67
- *
68
- * @param widget - The widget to add.
69
- *
70
- * @returns Whether the item was added to the toolbar. Returns false if
71
- * an item of the same name is already in the toolbar.
72
- *
73
- * #### Notes
74
- * The index will be clamped to the bounds of the items.
75
- * The item can be removed from the toolbar by setting its parent to `null`.
76
- */
77
- insertAfter(at: string, name: string, widget: T): boolean;
78
- /**
79
- * Insert an item into the toolbar at the before a target item.
80
- *
81
- * @param at - The target item to insert before.
82
- *
83
- * @param name - The name of the item.
84
- *
85
- * @param widget - The widget to add.
86
- *
87
- * @returns Whether the item was added to the toolbar. Returns false if
88
- * an item of the same name is already in the toolbar.
89
- *
90
- * #### Notes
91
- * The index will be clamped to the bounds of the items.
92
- * The item can be removed from the toolbar by setting its parent to `null`.
93
- */
94
- insertBefore(at: string, name: string, widget: T): boolean;
95
- private _insertRelative;
96
- /**
97
- * Handle the DOM events for the widget.
98
- *
99
- * @param event - The DOM event sent to the widget.
100
- *
101
- * #### Notes
102
- * This method implements the DOM `EventListener` interface and is
103
- * called in response to events on the dock panel's node. It should
104
- * not be called directly by user code.
105
- */
106
- handleEvent(event: Event): void;
107
- /**
108
- * Handle a DOM click event.
109
- */
110
- protected handleClick(event: Event): void;
111
- /**
112
- * Handle `after-attach` messages for the widget.
113
- */
114
- protected onAfterAttach(msg: Message): void;
115
- /**
116
- * Handle `before-detach` messages for the widget.
117
- */
118
- protected onBeforeDetach(msg: Message): void;
119
- protected onResize(msg: Widget.ResizeMessage): void;
120
- private _onResize;
121
- private _saveWidgetWidth;
122
- private _getWidgetWidth;
123
- readonly popupOpener: ToolbarPopupOpener;
124
- private readonly _widgetWidths;
125
- private readonly _resizer;
126
- }
127
- /**
128
- * The namespace for Toolbar class statics.
129
- */
130
- export declare namespace Toolbar {
131
- /**
132
- * Create a toolbar spacer item.
133
- *
134
- * #### Notes
135
- * It is a flex spacer that separates the left toolbar items
136
- * from the right toolbar items.
137
- */
138
- function createSpacerItem(): Widget;
139
- }
140
- /**
141
- * Namespace for ToolbarButtonComponent.
142
- */
143
- export declare namespace ToolbarButtonComponent {
144
- /**
145
- * Interface for ToolbarButtonComponent props.
146
- */
147
- interface IProps {
148
- className?: string;
149
- label?: string;
150
- icon?: LabIcon.IMaybeResolvable;
151
- iconClass?: string;
152
- iconLabel?: string;
153
- tooltip?: string;
154
- onClick?: () => void;
155
- enabled?: boolean;
156
- pressed?: boolean;
157
- pressedIcon?: LabIcon.IMaybeResolvable;
158
- pressedTooltip?: string;
159
- disabledTooltip?: string;
160
- /**
161
- * Trigger the button on the actual onClick event rather than onMouseDown.
162
- *
163
- * See note in ToolbarButtonComponent below as to why the default is to
164
- * trigger on onMouseDown.
165
- */
166
- actualOnClick?: boolean;
167
- /**
168
- * The application language translator.
169
- */
170
- translator?: ITranslator;
171
- }
172
- }
173
- /**
174
- * React component for a toolbar button.
175
- *
176
- * @param props - The props for ToolbarButtonComponent.
177
- */
178
- export declare function ToolbarButtonComponent(props: ToolbarButtonComponent.IProps): JSX.Element;
179
- /**
180
- * Adds the toolbar button class to the toolbar widget.
181
- * @param w Toolbar button widget.
182
- */
183
- export declare function addToolbarButtonClass(w: Widget): Widget;
184
- /**
185
- * Phosphor Widget version of static ToolbarButtonComponent.
186
- */
187
- export declare class ToolbarButton extends ReactWidget {
188
- private props;
189
- /**
190
- * Creates a toolbar button
191
- * @param props props for underlying `ToolbarButton` component
192
- */
193
- constructor(props?: ToolbarButtonComponent.IProps);
194
- /**
195
- * Sets the pressed state for the button
196
- * @param value true if button is pressed, false otherwise
197
- */
198
- set pressed(value: boolean);
199
- /**
200
- * Returns true if button is pressed, false otherwise
201
- */
202
- get pressed(): boolean;
203
- /**
204
- * Sets the enabled state for the button
205
- * @param value true to enable the button, false otherwise
206
- */
207
- set enabled(value: boolean);
208
- /**
209
- * Returns true if button is enabled, false otherwise
210
- */
211
- get enabled(): boolean;
212
- /**
213
- * Sets the click handler for the button
214
- * @param value click handler
215
- */
216
- set onClick(value: () => void);
217
- /**
218
- * Returns the click handler for the button
219
- */
220
- get onClick(): () => void;
221
- render(): JSX.Element;
222
- private _pressed;
223
- private _enabled;
224
- private _onClick;
225
- }
226
- /**
227
- * Namespace for CommandToolbarButtonComponent.
228
- */
229
- export declare namespace CommandToolbarButtonComponent {
230
- /**
231
- * Interface for CommandToolbarButtonComponent props.
232
- */
233
- interface IProps {
234
- /**
235
- * Application commands registry
236
- */
237
- commands: CommandRegistry;
238
- /**
239
- * Command unique id
240
- */
241
- id: string;
242
- /**
243
- * Command arguments
244
- */
245
- args?: ReadonlyJSONObject;
246
- /**
247
- * Overrides command icon
248
- */
249
- icon?: LabIcon;
250
- /**
251
- * Overrides command label
252
- */
253
- label?: string;
254
- }
255
- }
256
- /**
257
- * React component for a toolbar button that wraps a command.
258
- *
259
- * This wraps the ToolbarButtonComponent and watches the command registry
260
- * for changes to the command.
261
- */
262
- export declare function CommandToolbarButtonComponent(props: CommandToolbarButtonComponent.IProps): JSX.Element;
263
- export declare function addCommandToolbarButtonClass(w: Widget): Widget;
264
- /**
265
- * Phosphor Widget version of CommandToolbarButtonComponent.
266
- */
267
- export declare class CommandToolbarButton extends ReactWidget {
268
- private props;
269
- /**
270
- * Creates a command toolbar button
271
- * @param props props for underlying `CommandToolbarButtonComponent` component
272
- */
273
- constructor(props: CommandToolbarButtonComponent.IProps);
274
- render(): JSX.Element;
275
- }
276
- /**
277
- * A class which provides a toolbar popup
278
- * used to store widgets that don't fit
279
- * in the toolbar when it is resized
280
- */
281
- declare class ToolbarPopup extends Widget {
282
- width: number;
283
- /**
284
- * Construct a new ToolbarPopup
285
- */
286
- constructor();
287
- /**
288
- * Updates the width of the popup, this
289
- * should match with the toolbar width
290
- *
291
- * @param width - The width to resize to
292
- * @protected
293
- */
294
- updateWidth(width: number): void;
295
- /**
296
- * Aligns the popup to left bottom of widget
297
- *
298
- * @param widget the widget to align to
299
- * @private
300
- */
301
- alignTo(widget: Widget): void;
302
- /**
303
- * Inserts the widget at specified index
304
- * @param index the index
305
- * @param widget widget to add
306
- */
307
- insertWidget(index: number, widget: Widget): void;
308
- /**
309
- * Total number of widgets in the popup
310
- */
311
- widgetCount(): number;
312
- /**
313
- * Returns the widget at index
314
- * @param index the index
315
- */
316
- widgetAt(index: number): Widget;
317
- }
318
- /**
319
- * A class that provides a ToolbarPopupOpener,
320
- * which is a button added to toolbar when
321
- * the toolbar items overflow toolbar width
322
- */
323
- declare class ToolbarPopupOpener extends ToolbarButton {
324
- readonly _popup: ToolbarPopup;
325
- /**
326
- * Create a new popup opener
327
- */
328
- constructor();
329
- protected handleClick(): void;
330
- /**
331
- * Updates width and position of the popup
332
- * to align with the toolbar
333
- */
334
- updatePopup(): void;
335
- /**
336
- * Add widget to the popup, prepends widgets
337
- * @param widget the widget to add
338
- */
339
- addWidget(widget: Widget): void;
340
- /**
341
- * Returns total no of widgets in the popup
342
- */
343
- widgetCount(): number;
344
- /**
345
- * Returns widget at index in the popup
346
- * @param index
347
- */
348
- widgetAt(index: number): Widget;
349
- /**
350
- * Hides the opener and the popup
351
- */
352
- hide(): void;
353
- }
354
- export {};