@jupyterlab/ui-components 3.3.0-alpha.9 → 3.3.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.
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,64 +0,0 @@
1
- import { Message } from '@lumino/messaging';
2
- import { ISignal } from '@lumino/signaling';
3
- import { Widget } from '@lumino/widgets';
4
- /**
5
- * A panel that supports a collapsible header made from the widget's title.
6
- * Clicking on the title expands or contracts the widget.
7
- */
8
- export declare class Collapse<T extends Widget = Widget> extends Widget {
9
- constructor(options: Collapse.IOptions<T>);
10
- /**
11
- * The widget inside the collapse panel.
12
- */
13
- get widget(): T;
14
- set widget(widget: T);
15
- /**
16
- * The collapsed state of the panel.
17
- */
18
- get collapsed(): boolean;
19
- set collapsed(value: boolean);
20
- /**
21
- * A signal for when the widget collapse state changes.
22
- */
23
- get collapseChanged(): ISignal<Collapse, void>;
24
- /**
25
- * Toggle the collapse state of the panel.
26
- */
27
- toggle(): void;
28
- /**
29
- * Dispose the widget.
30
- */
31
- dispose(): void;
32
- /**
33
- * Handle the DOM events for the Collapse widget.
34
- *
35
- * @param event - The DOM event sent to the panel.
36
- *
37
- * #### Notes
38
- * This method implements the DOM `EventListener` interface and is
39
- * called in response to events on the panel's DOM node. It should
40
- * not be called directly by user code.
41
- */
42
- handleEvent(event: Event): void;
43
- protected onAfterAttach(msg: Message): void;
44
- protected onBeforeDetach(msg: Message): void;
45
- private _collapse;
46
- private _uncollapse;
47
- private _evtClick;
48
- /**
49
- * Handle the `changed` signal of a title object.
50
- */
51
- private _onTitleChanged;
52
- private _setHeader;
53
- private _collapseChanged;
54
- private _collapsed;
55
- private _content;
56
- private _header;
57
- private _widget;
58
- }
59
- export declare namespace Collapse {
60
- interface IOptions<T extends Widget = Widget> extends Widget.IOptions {
61
- widget: T;
62
- collapsed?: boolean;
63
- }
64
- }
@@ -1,145 +0,0 @@
1
- // Copyright (c) Jupyter Development Team.
2
- // Distributed under the terms of the Modified BSD License.
3
- import { Signal } from '@lumino/signaling';
4
- import { Panel, PanelLayout, Widget } from '@lumino/widgets';
5
- import { caretDownIcon, caretUpIcon } from '../icon';
6
- /**
7
- * A panel that supports a collapsible header made from the widget's title.
8
- * Clicking on the title expands or contracts the widget.
9
- */
10
- export class Collapse extends Widget {
11
- constructor(options) {
12
- super(options);
13
- this._collapseChanged = new Signal(this);
14
- const { widget, collapsed = true } = options;
15
- this.addClass('jp-Collapse');
16
- this._header = new Widget();
17
- this._header.addClass('jp-Collapse-header');
18
- this._content = new Panel();
19
- this._content.addClass('jp-Collapse-contents');
20
- const layout = new PanelLayout();
21
- this.layout = layout;
22
- layout.addWidget(this._header);
23
- layout.addWidget(this._content);
24
- this.widget = widget;
25
- this.collapsed = collapsed;
26
- }
27
- /**
28
- * The widget inside the collapse panel.
29
- */
30
- get widget() {
31
- return this._widget;
32
- }
33
- set widget(widget) {
34
- const oldWidget = this._widget;
35
- if (oldWidget) {
36
- oldWidget.title.changed.disconnect(this._onTitleChanged, this);
37
- oldWidget.parent = null;
38
- }
39
- this._widget = widget;
40
- widget.title.changed.connect(this._onTitleChanged, this);
41
- this._onTitleChanged(widget.title);
42
- this._content.addWidget(widget);
43
- }
44
- /**
45
- * The collapsed state of the panel.
46
- */
47
- get collapsed() {
48
- return this._collapsed;
49
- }
50
- set collapsed(value) {
51
- if (value === this._collapsed) {
52
- return;
53
- }
54
- if (value) {
55
- this._collapse();
56
- }
57
- else {
58
- this._uncollapse();
59
- }
60
- }
61
- /**
62
- * A signal for when the widget collapse state changes.
63
- */
64
- get collapseChanged() {
65
- return this._collapseChanged;
66
- }
67
- /**
68
- * Toggle the collapse state of the panel.
69
- */
70
- toggle() {
71
- this.collapsed = !this.collapsed;
72
- }
73
- /**
74
- * Dispose the widget.
75
- */
76
- dispose() {
77
- if (this.isDisposed) {
78
- return;
79
- }
80
- // Delete references we explicitly hold to other widgets.
81
- this._header = null;
82
- this._widget = null;
83
- this._content = null;
84
- super.dispose();
85
- }
86
- /**
87
- * Handle the DOM events for the Collapse widget.
88
- *
89
- * @param event - The DOM event sent to the panel.
90
- *
91
- * #### Notes
92
- * This method implements the DOM `EventListener` interface and is
93
- * called in response to events on the panel's DOM node. It should
94
- * not be called directly by user code.
95
- */
96
- handleEvent(event) {
97
- switch (event.type) {
98
- case 'click':
99
- this._evtClick(event);
100
- break;
101
- default:
102
- break;
103
- }
104
- }
105
- onAfterAttach(msg) {
106
- this._header.node.addEventListener('click', this);
107
- }
108
- onBeforeDetach(msg) {
109
- this._header.node.removeEventListener('click', this);
110
- }
111
- _collapse() {
112
- this._collapsed = true;
113
- if (this._content) {
114
- this._content.hide();
115
- }
116
- this._setHeader();
117
- this._collapseChanged.emit(void 0);
118
- }
119
- _uncollapse() {
120
- this._collapsed = false;
121
- if (this._content) {
122
- this._content.show();
123
- }
124
- this._setHeader();
125
- this._collapseChanged.emit(void 0);
126
- }
127
- _evtClick(event) {
128
- this.toggle();
129
- }
130
- /**
131
- * Handle the `changed` signal of a title object.
132
- */
133
- _onTitleChanged(sender) {
134
- this._setHeader();
135
- }
136
- _setHeader() {
137
- (this._collapsed ? caretUpIcon : caretDownIcon).element({
138
- container: this._header.node,
139
- label: this._widget.title.label,
140
- elementPosition: 'right',
141
- height: '28px'
142
- });
143
- }
144
- }
145
- //# sourceMappingURL=collapse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collapse.js","sourceRoot":"","sources":["../../src/components/collapse.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAG3D,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAS,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MA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- */
5
- export declare class IFrame extends Widget {
6
- /**
7
- * Create a new IFrame widget.
8
- */
9
- constructor(options?: IFrame.IOptions);
10
- /**
11
- * Referrer policy for the iframe.
12
- *
13
- * #### Notes
14
- * By default, `no-referrer` is chosen.
15
- *
16
- * For more information, see
17
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy
18
- */
19
- get referrerPolicy(): IFrame.ReferrerPolicy;
20
- set referrerPolicy(value: IFrame.ReferrerPolicy);
21
- /**
22
- * Exceptions to the sandboxing.
23
- *
24
- * #### Notes
25
- * By default, all sandboxing security policies are enabled.
26
- * This setting allows the user to selectively disable these
27
- * policies. This should be done with care, as it can
28
- * introduce security risks, and possibly allow malicious
29
- * sites to execute code in a JupyterLab session.
30
- *
31
- * For more information, see
32
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
33
- */
34
- get sandbox(): IFrame.SandboxExceptions[];
35
- set sandbox(values: IFrame.SandboxExceptions[]);
36
- /**
37
- * The url of the IFrame.
38
- */
39
- get url(): string;
40
- set url(url: string);
41
- private _sandbox;
42
- private _referrerPolicy;
43
- }
44
- /**
45
- * A namespace for IFrame widget statics.
46
- */
47
- export declare namespace IFrame {
48
- /**
49
- * Referrer policy for the iframe.
50
- *
51
- * User documentation for the policies can be found here:
52
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy
53
- */
54
- type ReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
55
- /**
56
- * Exceptions to the iframe sandboxing policies.
57
- * These are specified here:
58
- * https://www.w3.org/TR/2011/WD-html5-20110525/the-iframe-element.html#attr-iframe-sandbox
59
- *
60
- * More user-friendly documentation can be found here:
61
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#sandbox
62
- */
63
- type SandboxExceptions = 'allow-downloads' | 'allow-forms' | 'allow-modals' | 'allow-orientation-lock' | 'allow-pointer-lock' | 'allow-popups' | 'popups-to-escape-sandbox' | 'allow-presentation' | 'allow-same-origin' | 'allow-scripts' | 'allow-storage-access-by-user-activation' | 'allow-top-navigation' | 'allow-top-navigation-by-user-activation';
64
- /**
65
- * Options for creating a new IFrame widget.
66
- */
67
- interface IOptions {
68
- /**
69
- * Exceptions for the iframe sandbox.
70
- */
71
- sandbox?: SandboxExceptions[];
72
- /**
73
- * Referrer policy for the iframe.
74
- */
75
- referrerPolicy?: ReferrerPolicy;
76
- }
77
- }
@@ -1,89 +0,0 @@
1
- // Copyright (c) Jupyter Development Team.
2
- // Distributed under the terms of the Modified BSD License.
3
- import { Widget } from '@lumino/widgets';
4
- /**
5
- * A phosphor widget which wraps an IFrame.
6
- */
7
- export class IFrame extends Widget {
8
- /**
9
- * Create a new IFrame widget.
10
- */
11
- constructor(options = {}) {
12
- super({ node: Private.createNode() });
13
- this._sandbox = [];
14
- this.addClass('jp-IFrame');
15
- this.sandbox = options.sandbox || [];
16
- this.referrerPolicy = options.referrerPolicy || 'no-referrer';
17
- }
18
- /**
19
- * Referrer policy for the iframe.
20
- *
21
- * #### Notes
22
- * By default, `no-referrer` is chosen.
23
- *
24
- * For more information, see
25
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy
26
- */
27
- get referrerPolicy() {
28
- return this._referrerPolicy;
29
- }
30
- set referrerPolicy(value) {
31
- if (this._referrerPolicy === value) {
32
- return;
33
- }
34
- this._referrerPolicy = value;
35
- const iframe = this.node.querySelector('iframe');
36
- iframe.setAttribute('referrerpolicy', value);
37
- }
38
- /**
39
- * Exceptions to the sandboxing.
40
- *
41
- * #### Notes
42
- * By default, all sandboxing security policies are enabled.
43
- * This setting allows the user to selectively disable these
44
- * policies. This should be done with care, as it can
45
- * introduce security risks, and possibly allow malicious
46
- * sites to execute code in a JupyterLab session.
47
- *
48
- * For more information, see
49
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
50
- */
51
- get sandbox() {
52
- return this._sandbox.slice();
53
- }
54
- set sandbox(values) {
55
- this._sandbox = values.slice();
56
- const iframe = this.node.querySelector('iframe');
57
- const exceptions = values.length ? values.join(' ') : '';
58
- iframe.setAttribute('sandbox', exceptions);
59
- }
60
- /**
61
- * The url of the IFrame.
62
- */
63
- get url() {
64
- return this.node.querySelector('iframe').getAttribute('src') || '';
65
- }
66
- set url(url) {
67
- this.node.querySelector('iframe').setAttribute('src', url);
68
- }
69
- }
70
- /**
71
- * A namespace for private data.
72
- */
73
- var Private;
74
- (function (Private) {
75
- /**
76
- * Create the main content node of an iframe widget.
77
- */
78
- function createNode() {
79
- const node = document.createElement('div');
80
- const iframe = document.createElement('iframe');
81
- iframe.setAttribute('sandbox', '');
82
- iframe.style.height = '100%';
83
- iframe.style.width = '100%';
84
- node.appendChild(iframe);
85
- return node;
86
- }
87
- Private.createNode = createNode;
88
- })(Private || (Private = {}));
89
- //# sourceMappingURL=iframe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iframe.js","sourceRoot":"","sources":["../../src/components/iframe.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,MAAM;IAChC;;OAEG;IACH,YAAY,UAA2B,EAAE;QACvC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QA4DhC,aAAQ,GAA+B,EAAE,CAAC;QA3DhD,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACrC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,aAAa,CAAC;IAChE,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,cAAc;QAChB,OAAO,IAA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aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAChD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAC7B,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QAC5B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IARe,kBAAU,aAQzB,CAAA;AACH,CAAC,EAbS,OAAO,KAAP,OAAO,QAahB"}
@@ -1,15 +0,0 @@
1
- import { Message } from '@lumino/messaging';
2
- import { Widget } from '@lumino/widgets';
3
- /**
4
- * The spinner class.
5
- */
6
- export declare class Spinner extends Widget {
7
- /**
8
- * Construct a spinner widget.
9
- */
10
- constructor();
11
- /**
12
- * Handle `'activate-request'` messages.
13
- */
14
- protected onActivateRequest(msg: Message): void;
15
- }
@@ -1,28 +0,0 @@
1
- /* -----------------------------------------------------------------------------
2
- | Copyright (c) Jupyter Development Team.
3
- | Distributed under the terms of the Modified BSD License.
4
- |----------------------------------------------------------------------------*/
5
- import { Widget } from '@lumino/widgets';
6
- /**
7
- * The spinner class.
8
- */
9
- export class Spinner extends Widget {
10
- /**
11
- * Construct a spinner widget.
12
- */
13
- constructor() {
14
- super();
15
- this.addClass('jp-Spinner');
16
- this.node.tabIndex = -1;
17
- const content = document.createElement('div');
18
- content.className = 'jp-SpinnerContent';
19
- this.node.appendChild(content);
20
- }
21
- /**
22
- * Handle `'activate-request'` messages.
23
- */
24
- onActivateRequest(msg) {
25
- this.node.focus();
26
- }
27
- }
28
- //# sourceMappingURL=spinner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/components/spinner.ts"],"names":[],"mappings":"AAAA;;;+EAG+E;AAG/E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,MAAM;IACjC;;OAEG;IACH;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACxB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9C,OAAO,CAAC,SAAS,GAAG,mBAAmB,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACO,iBAAiB,CAAC,GAAY;QACtC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;CACF"}
@@ -1,27 +0,0 @@
1
- /**
2
- * A namespace for node styling.
3
- */
4
- export declare namespace Styling {
5
- /**
6
- * Style a node and its child elements with the default tag names.
7
- *
8
- * @param node - The base node.
9
- *
10
- * @param className - The optional CSS class to add to styled nodes.
11
- */
12
- function styleNode(node: HTMLElement, className?: string): void;
13
- /**
14
- * Style a node and its elements that have a given tag name.
15
- *
16
- * @param node - The base node.
17
- *
18
- * @param tagName - The html tag name to style.
19
- *
20
- * @param className - The optional CSS class to add to styled nodes.
21
- */
22
- function styleNodeByTag(node: HTMLElement, tagName: string, className?: string): void;
23
- /**
24
- * Wrap a select node.
25
- */
26
- function wrapSelect(node: HTMLSelectElement): HTMLElement;
27
- }
@@ -1,100 +0,0 @@
1
- // Copyright (c) Jupyter Development Team.
2
- // Distributed under the terms of the Modified BSD License.
3
- import { caretDownEmptyIcon } from '../icon';
4
- /**
5
- * A namespace for node styling.
6
- */
7
- export var Styling;
8
- (function (Styling) {
9
- /**
10
- * Style a node and its child elements with the default tag names.
11
- *
12
- * @param node - The base node.
13
- *
14
- * @param className - The optional CSS class to add to styled nodes.
15
- */
16
- function styleNode(node, className = '') {
17
- styleNodeByTag(node, 'select', className);
18
- styleNodeByTag(node, 'textarea', className);
19
- styleNodeByTag(node, 'input', className);
20
- styleNodeByTag(node, 'button', className);
21
- }
22
- Styling.styleNode = styleNode;
23
- /**
24
- * Style a node and its elements that have a given tag name.
25
- *
26
- * @param node - The base node.
27
- *
28
- * @param tagName - The html tag name to style.
29
- *
30
- * @param className - The optional CSS class to add to styled nodes.
31
- */
32
- function styleNodeByTag(node, tagName, className = '') {
33
- if (node.localName === tagName) {
34
- node.classList.add('jp-mod-styled');
35
- }
36
- if (node.localName === 'select') {
37
- wrapSelect(node);
38
- }
39
- const nodes = node.getElementsByTagName(tagName);
40
- for (let i = 0; i < nodes.length; i++) {
41
- const child = nodes[i];
42
- child.classList.add('jp-mod-styled');
43
- if (className) {
44
- child.classList.add(className);
45
- }
46
- if (tagName === 'select') {
47
- wrapSelect(child);
48
- }
49
- }
50
- }
51
- Styling.styleNodeByTag = styleNodeByTag;
52
- /**
53
- * Wrap a select node.
54
- */
55
- function wrapSelect(node) {
56
- const wrapper = document.createElement('div');
57
- wrapper.classList.add('jp-select-wrapper');
58
- node.addEventListener('focus', Private.onFocus);
59
- node.addEventListener('blur', Private.onFocus);
60
- node.classList.add('jp-mod-styled');
61
- if (node.parentElement) {
62
- node.parentElement.replaceChild(wrapper, node);
63
- }
64
- wrapper.appendChild(node);
65
- // add the icon node
66
- wrapper.appendChild(caretDownEmptyIcon.element({
67
- tag: 'span',
68
- stylesheet: 'select',
69
- right: '8px',
70
- top: '5px',
71
- width: '18px'
72
- }));
73
- return wrapper;
74
- }
75
- Styling.wrapSelect = wrapSelect;
76
- })(Styling || (Styling = {}));
77
- /**
78
- * The namespace for module private data.
79
- */
80
- var Private;
81
- (function (Private) {
82
- /**
83
- * Handle a focus event on a styled select.
84
- */
85
- function onFocus(event) {
86
- const target = event.target;
87
- const parent = target.parentElement;
88
- if (!parent) {
89
- return;
90
- }
91
- if (event.type === 'focus') {
92
- parent.classList.add('jp-mod-focused');
93
- }
94
- else {
95
- parent.classList.remove('jp-mod-focused');
96
- }
97
- }
98
- Private.onFocus = onFocus;
99
- })(Private || (Private = {}));
100
- //# sourceMappingURL=styling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styling.js","sourceRoot":"","sources":["../../src/components/styling.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,2DAA2D;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C;;GAEG;AACH,MAAM,KAAW,OAAO,CA2EvB;AA3ED,WAAiB,OAAO;IACtB;;;;;;OAMG;IACH,SAAgB,SAAS,CAAC,IAAiB,EAAE,SAAS,GAAG,EAAE;QACzD,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAC1C,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAC5C,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QACzC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC5C,CAAC;IALe,iBAAS,YAKxB,CAAA;IAED;;;;;;;;OAQG;IACH,SAAgB,cAAc,CAC5B,IAAiB,EACjB,OAAe,EACf,SAAS,GAAG,EAAE;QAEd,IAAI,IAAI,CAAC,SAAS,KAAK,OAAO,EAAE;YAC9B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;SACrC;QACD,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE;YAC/B,UAAU,CAAC,IAAyB,CAAC,CAAC;SACvC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACjD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,KAAK,CAAC,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