notebook 7.3.0rc0__py3-none-any.whl → 7.3.2__py3-none-any.whl
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.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/static/{1650.87effa8120f5c75793d2.js → 1650.8d7f95fed9378b01c97b.js} +4 -4
- notebook/static/{1650.87effa8120f5c75793d2.js.map → 1650.8d7f95fed9378b01c97b.js.map} +1 -1
- notebook/static/{1684.fa69e1c4e38197db875c.js → 1684.17fc47c7fb30c0a8e713.js} +5 -5
- notebook/static/{1684.fa69e1c4e38197db875c.js.map → 1684.17fc47c7fb30c0a8e713.js.map} +1 -1
- notebook/static/{4864.c22882a8feba283c53ca.js → 1871.29951b77779d94d726d1.js} +2 -1227
- notebook/static/1871.29951b77779d94d726d1.js.map +1 -0
- notebook/static/{2065.4b2bfec98774b3165d4a.js → 2065.e9b5d8d0a8bec3304454.js} +3 -3
- notebook/static/{2065.4b2bfec98774b3165d4a.js.map → 2065.e9b5d8d0a8bec3304454.js.map} +1 -1
- notebook/static/2816.03541f3103bf4c09e591.js +2454 -0
- notebook/static/2816.03541f3103bf4c09e591.js.map +1 -0
- notebook/static/{2913.40af140ee433938c1393.js → 2913.274b19d8f201991f4a69.js} +3 -3
- notebook/static/{2913.40af140ee433938c1393.js.map → 2913.274b19d8f201991f4a69.js.map} +1 -1
- notebook/static/{3146.d9be433c38447539b2ae.js → 3146.0525c8e3f0097710544e.js} +3 -3
- notebook/static/{3146.d9be433c38447539b2ae.js.map → 3146.0525c8e3f0097710544e.js.map} +1 -1
- notebook/static/{3768.5acd3111e6f1975cfe03.js → 3768.409eda0ebb4676a30596.js} +19 -19
- notebook/static/{7302.7dea224d66b845d1aba3.js.map → 3768.409eda0ebb4676a30596.js.map} +1 -1
- notebook/static/417.29f636ec8be265b7e480.js +35732 -0
- notebook/static/417.29f636ec8be265b7e480.js.map +1 -0
- notebook/static/{4382.4fc6da1dc03e651b486a.js → 4382.c3425ddaa226b75d1b57.js} +3 -3
- notebook/static/{4382.4fc6da1dc03e651b486a.js.map → 4382.c3425ddaa226b75d1b57.js.map} +1 -1
- notebook/static/{4645.0e67c6d0dceea70ea632.js → 4645.41cffc0184b6538b7e00.js} +5 -5
- notebook/static/{4645.0e67c6d0dceea70ea632.js.map → 4645.41cffc0184b6538b7e00.js.map} +1 -1
- notebook/static/{4837.83ca0f4b34bedf9ca04b.js → 4837.0e774b52bbcd51546b55.js} +3 -3
- notebook/static/{4837.83ca0f4b34bedf9ca04b.js.map → 4837.0e774b52bbcd51546b55.js.map} +1 -1
- notebook/static/{4926.c68927936b855fd893c5.js → 4926.70b91208fd35ee838d65.js} +3 -3
- notebook/static/{4926.c68927936b855fd893c5.js.map → 4926.70b91208fd35ee838d65.js.map} +1 -1
- notebook/static/{5135.fec9e8f8d4a46cb05da6.js → 5135.398f538011f4562d1fae.js} +11 -11
- notebook/static/{5135.fec9e8f8d4a46cb05da6.js.map → 5135.398f538011f4562d1fae.js.map} +1 -1
- notebook/static/{7534.e6ec4e7bd41255482e3e.js → 5157.325614b1326d23735fbe.js} +2 -2
- notebook/static/{7534.e6ec4e7bd41255482e3e.js.map → 5157.325614b1326d23735fbe.js.map} +1 -1
- notebook/static/{5573.6ac07c855f945dc1f930.js → 5573.fadd0e2001b2575ccb0f.js} +17 -17
- notebook/static/{5573.6ac07c855f945dc1f930.js.map → 5573.fadd0e2001b2575ccb0f.js.map} +1 -1
- notebook/static/{5601.4c763101de025f83f28e.js → 5601.3e30eb7d151dda3b25ed.js} +5 -5
- notebook/static/{5601.4c763101de025f83f28e.js.map → 5601.3e30eb7d151dda3b25ed.js.map} +1 -1
- notebook/static/{1960.7d12087e25eb6449e7ce.js → 6033.e5f43eeda4cc803965de.js} +2 -2
- notebook/static/{1960.7d12087e25eb6449e7ce.js.map → 6033.e5f43eeda4cc803965de.js.map} +1 -1
- notebook/static/{6345.06c2149842cd8d1881c9.js → 6345.351e07d7802b67cb9d25.js} +5 -5
- notebook/static/{6345.06c2149842cd8d1881c9.js.map → 6345.351e07d7802b67cb9d25.js.map} +1 -1
- notebook/static/{7302.7dea224d66b845d1aba3.js → 7302.8dfb32b083b16efa038a.js} +19 -19
- notebook/static/{3768.5acd3111e6f1975cfe03.js.map → 7302.8dfb32b083b16efa038a.js.map} +1 -1
- notebook/static/{7369.8768f287c1cf1cc37db0.js → 7369.286a75761c308381b0a4.js} +25 -25
- notebook/static/{7369.8768f287c1cf1cc37db0.js.map → 7369.286a75761c308381b0a4.js.map} +1 -1
- notebook/static/{7906.386fb917c7a78bd6575a.js → 7906.67e8d86ba7ed95cbac87.js} +3 -3
- notebook/static/{7906.386fb917c7a78bd6575a.js.map → 7906.67e8d86ba7ed95cbac87.js.map} +1 -1
- notebook/static/{8579.672ef05f50ec1a639499.js → 8579.d7fc77346371c454ec00.js} +13 -13
- notebook/static/{8579.672ef05f50ec1a639499.js.map → 8579.d7fc77346371c454ec00.js.map} +1 -1
- notebook/static/{8781.559293b7acc5c9a6c85c.js → 8781.f58f42a24da8ac99623f.js} +57 -57
- notebook/static/{8781.559293b7acc5c9a6c85c.js.map → 8781.f58f42a24da8ac99623f.js.map} +1 -1
- notebook/static/{8875.3576877a040347035e62.js → 8875.576e3c6503ecdf5c2124.js} +4 -4
- notebook/static/{8875.3576877a040347035e62.js.map → 8875.576e3c6503ecdf5c2124.js.map} +1 -1
- notebook/static/{9068.97733adfadd485aa7cd7.js → 9068.cb72a595212d6ed7de5e.js} +3 -3
- notebook/static/{9068.97733adfadd485aa7cd7.js.map → 9068.cb72a595212d6ed7de5e.js.map} +1 -1
- notebook/static/{9380.dbb97caa9c457da5267e.js → 9380.709f3e6308fc49ccb353.js} +5 -5
- notebook/static/{9380.dbb97caa9c457da5267e.js.map → 9380.709f3e6308fc49ccb353.js.map} +1 -1
- notebook/static/{9619.9264baf999dd4a76481d.js → 9619.6f4ade981540ff20b8bd.js} +3 -3
- notebook/static/{9619.9264baf999dd4a76481d.js.map → 9619.6f4ade981540ff20b8bd.js.map} +1 -1
- notebook/static/main.407246dd27aed8010549.js +1174 -0
- notebook/static/main.407246dd27aed8010549.js.map +1 -0
- notebook/static/{notebook_core.8f3a44cab16bab9bd8f4.js → notebook_core.4799ce7e762b693682b6.js} +1159 -1013
- notebook/static/{notebook_core.8f3a44cab16bab9bd8f4.js.map → notebook_core.4799ce7e762b693682b6.js.map} +1 -1
- notebook/static/third-party-licenses.json +101 -101
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.3.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.f1a870f262b5e8588c75.js +1 -0
- notebook-7.3.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/926.1e1698d53d81bf49c4ad.js +1 -0
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.e5e6d72d43bb1376115c.js → notebook-7.3.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.7261ac56728710cbd7f2.js +1 -1
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js → notebook-7.3.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.c48a681bb3e8043bbbd7.js +1 -1
- notebook-7.3.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.cad89c571bc2aee4aff2.js +1 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.3.0rc0.dist-info → notebook-7.3.2.dist-info}/METADATA +5 -4
- {notebook-7.3.0rc0.dist-info → notebook-7.3.2.dist-info}/RECORD +106 -110
- {notebook-7.3.0rc0.dist-info → notebook-7.3.2.dist-info}/WHEEL +1 -1
- notebook/static/2424.6f13f59f4bc472c3d07d.js +0 -1278
- notebook/static/2424.6f13f59f4bc472c3d07d.js.map +0 -1
- notebook/static/4864.c22882a8feba283c53ca.js.map +0 -1
- notebook/static/5430.98e90178da18bdd99116.js +0 -2145
- notebook/static/5430.98e90178da18bdd99116.js.map +0 -1
- notebook/static/8635.4c8189485e3c65e7ecc0.js +0 -11476
- notebook/static/8635.4c8189485e3c65e7ecc0.js.map +0 -1
- notebook/static/9672.b55f9504fd5af290b047.js +0 -774
- notebook/static/9672.b55f9504fd5af290b047.js.map +0 -1
- notebook/static/main.ffe733f3a4b0a84e244f.js +0 -1164
- notebook/static/main.ffe733f3a4b0a84e244f.js.map +0 -1
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/454.a8fd180a103fb540edd4.js +0 -1
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6540c9fb9260de5622ef.js +0 -1
- notebook-7.3.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.a440964232a20ad16779.js +0 -1
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.3.0rc0.data → notebook-7.3.2.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.3.0rc0.dist-info → notebook-7.3.2.dist-info}/entry_points.txt +0 -0
- {notebook-7.3.0rc0.dist-info → notebook-7.3.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,1229 +1,4 @@
|
|
|
1
|
-
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[
|
|
2
|
-
|
|
3
|
-
/***/ 8392:
|
|
4
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
|
|
8
|
-
// EXPORTS
|
|
9
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
Bg: () => (/* binding */ jpToolbar)
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
// UNUSED EXPORTS: DelegatesARIAToolbar, FoundationToolbar, Toolbar, toolbarStyles
|
|
14
|
-
|
|
15
|
-
// EXTERNAL MODULE: ../node_modules/tslib/tslib.es6.mjs
|
|
16
|
-
var tslib_es6 = __webpack_require__(82616);
|
|
17
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/observation/observable.js
|
|
18
|
-
var observable = __webpack_require__(92221);
|
|
19
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/components/attributes.js
|
|
20
|
-
var attributes = __webpack_require__(98332);
|
|
21
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/foundation-element/foundation-element.js
|
|
22
|
-
var foundation_element = __webpack_require__(50755);
|
|
23
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/localization.js
|
|
24
|
-
var localization = __webpack_require__(6618);
|
|
25
|
-
;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/direction.js
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* a method to determine the current localization direction of the view
|
|
29
|
-
* @param rootNode - the HTMLElement to begin the query from, usually "this" when used in a component controller
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
const getDirection = (rootNode) => {
|
|
33
|
-
const dirNode = rootNode.closest("[dir]");
|
|
34
|
-
return dirNode !== null && dirNode.dir === "rtl" ? localization/* Direction */.N.rtl : localization/* Direction */.N.ltr;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/apply-mixins.js
|
|
38
|
-
var apply_mixins = __webpack_require__(89155);
|
|
39
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/patterns/aria-global.js
|
|
40
|
-
var aria_global = __webpack_require__(14869);
|
|
41
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/patterns/start-end.js
|
|
42
|
-
var start_end = __webpack_require__(52865);
|
|
43
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/composed-parent.js
|
|
44
|
-
var composed_parent = __webpack_require__(75494);
|
|
45
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/template.js + 3 modules
|
|
46
|
-
var template = __webpack_require__(25269);
|
|
47
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/children.js
|
|
48
|
-
var children = __webpack_require__(58545);
|
|
49
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/node-observation.js
|
|
50
|
-
var node_observation = __webpack_require__(41681);
|
|
51
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/templating/slotted.js
|
|
52
|
-
var slotted = __webpack_require__(17832);
|
|
53
|
-
;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/toolbar/toolbar.template.js
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The template for the {@link @microsoft/fast-foundation#(Toolbar:class)} component.
|
|
58
|
-
*
|
|
59
|
-
* @public
|
|
60
|
-
*/
|
|
61
|
-
const toolbarTemplate = (context, definition) => (0,template/* html */.d) `
|
|
62
|
-
<template
|
|
63
|
-
aria-label="${x => x.ariaLabel}"
|
|
64
|
-
aria-labelledby="${x => x.ariaLabelledby}"
|
|
65
|
-
aria-orientation="${x => x.orientation}"
|
|
66
|
-
orientation="${x => x.orientation}"
|
|
67
|
-
role="toolbar"
|
|
68
|
-
@mousedown="${(x, c) => x.mouseDownHandler(c.event)}"
|
|
69
|
-
@focusin="${(x, c) => x.focusinHandler(c.event)}"
|
|
70
|
-
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
71
|
-
${(0,children/* children */.p)({
|
|
72
|
-
property: "childItems",
|
|
73
|
-
attributeFilter: ["disabled", "hidden"],
|
|
74
|
-
filter: (0,node_observation/* elements */.R)(),
|
|
75
|
-
subtree: true,
|
|
76
|
-
})}
|
|
77
|
-
>
|
|
78
|
-
<slot name="label"></slot>
|
|
79
|
-
<div class="positioning-region" part="positioning-region">
|
|
80
|
-
${(0,start_end/* startSlotTemplate */.m9)(context, definition)}
|
|
81
|
-
<slot
|
|
82
|
-
${(0,slotted/* slotted */.Q)({
|
|
83
|
-
filter: (0,node_observation/* elements */.R)(),
|
|
84
|
-
property: "slottedItems",
|
|
85
|
-
})}
|
|
86
|
-
></slot>
|
|
87
|
-
${(0,start_end/* endSlotTemplate */.LC)(context, definition)}
|
|
88
|
-
</div>
|
|
89
|
-
</template>
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/key-codes.js
|
|
93
|
-
var key_codes = __webpack_require__(27081);
|
|
94
|
-
;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/aria.js
|
|
95
|
-
/**
|
|
96
|
-
* Standard orientation values
|
|
97
|
-
*/
|
|
98
|
-
const Orientation = {
|
|
99
|
-
horizontal: "horizontal",
|
|
100
|
-
vertical: "vertical",
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
;// CONCATENATED MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/numbers.js
|
|
104
|
-
/**
|
|
105
|
-
* This method keeps a given value within the bounds of a min and max value. If the value
|
|
106
|
-
* is larger than the max, the minimum value will be returned. If the value is smaller than the minimum,
|
|
107
|
-
* the maximum will be returned. Otherwise, the value is returned un-changed.
|
|
108
|
-
*/
|
|
109
|
-
function wrapInBounds(min, max, value) {
|
|
110
|
-
if (value < min) {
|
|
111
|
-
return max;
|
|
112
|
-
}
|
|
113
|
-
else if (value > max) {
|
|
114
|
-
return min;
|
|
115
|
-
}
|
|
116
|
-
return value;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Ensures that a value is between a min and max value. If value is lower than min, min will be returned.
|
|
120
|
-
* If value is greater than max, max will be returned.
|
|
121
|
-
*/
|
|
122
|
-
function limit(min, max, value) {
|
|
123
|
-
return Math.min(Math.max(value, min), max);
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Determines if a number value is within a specified range.
|
|
127
|
-
*
|
|
128
|
-
* @param value - the value to check
|
|
129
|
-
* @param min - the range start
|
|
130
|
-
* @param max - the range end
|
|
131
|
-
*/
|
|
132
|
-
function inRange(value, min, max = 0) {
|
|
133
|
-
[min, max] = [min, max].sort((a, b) => a - b);
|
|
134
|
-
return min <= value && value < max;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
;// CONCATENATED MODULE: ../node_modules/tabbable/dist/index.esm.js
|
|
138
|
-
/*!
|
|
139
|
-
* tabbable 5.3.3
|
|
140
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
141
|
-
*/
|
|
142
|
-
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
143
|
-
var candidateSelector = /* #__PURE__ */(/* unused pure expression or super */ null && (candidateSelectors.join(',')));
|
|
144
|
-
var NoElement = typeof Element === 'undefined';
|
|
145
|
-
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
146
|
-
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
147
|
-
return element.getRootNode();
|
|
148
|
-
} : function (element) {
|
|
149
|
-
return element.ownerDocument;
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* @param {Element} el container to check in
|
|
153
|
-
* @param {boolean} includeContainer add container to check
|
|
154
|
-
* @param {(node: Element) => boolean} filter filter candidates
|
|
155
|
-
* @returns {Element[]}
|
|
156
|
-
*/
|
|
157
|
-
|
|
158
|
-
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
159
|
-
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
160
|
-
|
|
161
|
-
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
162
|
-
candidates.unshift(el);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
candidates = candidates.filter(filter);
|
|
166
|
-
return candidates;
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* @callback GetShadowRoot
|
|
170
|
-
* @param {Element} element to check for shadow root
|
|
171
|
-
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* @callback ShadowRootFilter
|
|
176
|
-
* @param {Element} shadowHostNode the element which contains shadow content
|
|
177
|
-
* @returns {boolean} true if a shadow root could potentially contain valid candidates.
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @typedef {Object} CandidatesScope
|
|
182
|
-
* @property {Element} scope contains inner candidates
|
|
183
|
-
* @property {Element[]} candidates
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @typedef {Object} IterativeOptions
|
|
188
|
-
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
189
|
-
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
190
|
-
* or a boolean stating if it has an undisclosed shadow root
|
|
191
|
-
* @property {(node: Element) => boolean} filter filter candidates
|
|
192
|
-
* @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list
|
|
193
|
-
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* @param {Element[]} elements list of element containers to match candidates from
|
|
198
|
-
* @param {boolean} includeContainer add container list to check
|
|
199
|
-
* @param {IterativeOptions} options
|
|
200
|
-
* @returns {Array.<Element|CandidatesScope>}
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
205
|
-
var candidates = [];
|
|
206
|
-
var elementsToCheck = Array.from(elements);
|
|
207
|
-
|
|
208
|
-
while (elementsToCheck.length) {
|
|
209
|
-
var element = elementsToCheck.shift();
|
|
210
|
-
|
|
211
|
-
if (element.tagName === 'SLOT') {
|
|
212
|
-
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
213
|
-
var assigned = element.assignedElements();
|
|
214
|
-
var content = assigned.length ? assigned : element.children;
|
|
215
|
-
var nestedCandidates = getCandidatesIteratively(content, true, options);
|
|
216
|
-
|
|
217
|
-
if (options.flatten) {
|
|
218
|
-
candidates.push.apply(candidates, nestedCandidates);
|
|
219
|
-
} else {
|
|
220
|
-
candidates.push({
|
|
221
|
-
scope: element,
|
|
222
|
-
candidates: nestedCandidates
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
} else {
|
|
226
|
-
// check candidate element
|
|
227
|
-
var validCandidate = matches.call(element, candidateSelector);
|
|
228
|
-
|
|
229
|
-
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
230
|
-
candidates.push(element);
|
|
231
|
-
} // iterate over shadow content if possible
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
|
|
235
|
-
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
236
|
-
var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
|
|
237
|
-
|
|
238
|
-
if (shadowRoot && validShadowRoot) {
|
|
239
|
-
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
240
|
-
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
241
|
-
// child candidates found because they're likely slotted elements (elements that are
|
|
242
|
-
// children of the web component element (which has the shadow), in the light dom, but
|
|
243
|
-
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
244
|
-
// _after_ we return from this recursive call
|
|
245
|
-
var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
246
|
-
|
|
247
|
-
if (options.flatten) {
|
|
248
|
-
candidates.push.apply(candidates, _nestedCandidates);
|
|
249
|
-
} else {
|
|
250
|
-
candidates.push({
|
|
251
|
-
scope: element,
|
|
252
|
-
candidates: _nestedCandidates
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
} else {
|
|
256
|
-
// there's not shadow so just dig into the element's (light dom) children
|
|
257
|
-
// __without__ giving the element special scope treatment
|
|
258
|
-
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return candidates;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
var getTabindex = function getTabindex(node, isScope) {
|
|
267
|
-
if (node.tabIndex < 0) {
|
|
268
|
-
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
269
|
-
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
270
|
-
// yet they are still part of the regular tab order; in FF, they get a default
|
|
271
|
-
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
272
|
-
// order, consider their tab index to be 0.
|
|
273
|
-
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
274
|
-
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
275
|
-
//
|
|
276
|
-
// isScope is positive for custom element with shadow root or slot that by default
|
|
277
|
-
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
278
|
-
// content to be inserted in the correct position
|
|
279
|
-
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
|
|
280
|
-
return 0;
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
return node.tabIndex;
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
288
|
-
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
var isInput = function isInput(node) {
|
|
292
|
-
return node.tagName === 'INPUT';
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
var isHiddenInput = function isHiddenInput(node) {
|
|
296
|
-
return isInput(node) && node.type === 'hidden';
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
300
|
-
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
301
|
-
return child.tagName === 'SUMMARY';
|
|
302
|
-
});
|
|
303
|
-
return r;
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
307
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
308
|
-
if (nodes[i].checked && nodes[i].form === form) {
|
|
309
|
-
return nodes[i];
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
var isTabbableRadio = function isTabbableRadio(node) {
|
|
315
|
-
if (!node.name) {
|
|
316
|
-
return true;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
var radioScope = node.form || getRootNode(node);
|
|
320
|
-
|
|
321
|
-
var queryRadios = function queryRadios(name) {
|
|
322
|
-
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
var radioSet;
|
|
326
|
-
|
|
327
|
-
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
328
|
-
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
329
|
-
} else {
|
|
330
|
-
try {
|
|
331
|
-
radioSet = queryRadios(node.name);
|
|
332
|
-
} catch (err) {
|
|
333
|
-
// eslint-disable-next-line no-console
|
|
334
|
-
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
335
|
-
return false;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
var checked = getCheckedRadio(radioSet, node.form);
|
|
340
|
-
return !checked || checked === node;
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
var isRadio = function isRadio(node) {
|
|
344
|
-
return isInput(node) && node.type === 'radio';
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
348
|
-
return isRadio(node) && !isTabbableRadio(node);
|
|
349
|
-
};
|
|
350
|
-
|
|
351
|
-
var isZeroArea = function isZeroArea(node) {
|
|
352
|
-
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
353
|
-
width = _node$getBoundingClie.width,
|
|
354
|
-
height = _node$getBoundingClie.height;
|
|
355
|
-
|
|
356
|
-
return width === 0 && height === 0;
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
var isHidden = function isHidden(node, _ref) {
|
|
360
|
-
var displayCheck = _ref.displayCheck,
|
|
361
|
-
getShadowRoot = _ref.getShadowRoot;
|
|
362
|
-
|
|
363
|
-
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
364
|
-
// (see notes about this further down), which means we will consider it visible
|
|
365
|
-
// (this is legacy behavior from a very long way back)
|
|
366
|
-
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
367
|
-
// _visibility_ check, not a _display_ check
|
|
368
|
-
if (getComputedStyle(node).visibility === 'hidden') {
|
|
369
|
-
return true;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
373
|
-
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
374
|
-
|
|
375
|
-
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
376
|
-
return true;
|
|
377
|
-
} // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
378
|
-
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
379
|
-
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
380
|
-
// is attached, and the one we need to check if it's in the document or not (because the
|
|
381
|
-
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
382
|
-
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
383
|
-
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
384
|
-
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
385
|
-
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
386
|
-
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
387
|
-
// tested).
|
|
388
|
-
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
389
|
-
// document (per the docs) and while it's a Document-type object, that document does not
|
|
390
|
-
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
391
|
-
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
392
|
-
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
393
|
-
// node is actually detached.
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
var nodeRootHost = getRootNode(node).host;
|
|
397
|
-
var nodeIsAttached = (nodeRootHost === null || nodeRootHost === void 0 ? void 0 : nodeRootHost.ownerDocument.contains(nodeRootHost)) || node.ownerDocument.contains(node);
|
|
398
|
-
|
|
399
|
-
if (!displayCheck || displayCheck === 'full') {
|
|
400
|
-
if (typeof getShadowRoot === 'function') {
|
|
401
|
-
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
402
|
-
// 'non-zero-area' fallback
|
|
403
|
-
var originalNode = node;
|
|
404
|
-
|
|
405
|
-
while (node) {
|
|
406
|
-
var parentElement = node.parentElement;
|
|
407
|
-
var rootNode = getRootNode(node);
|
|
408
|
-
|
|
409
|
-
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
410
|
-
) {
|
|
411
|
-
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
412
|
-
// fall back to a non-zero-area test
|
|
413
|
-
return isZeroArea(node);
|
|
414
|
-
} else if (node.assignedSlot) {
|
|
415
|
-
// iterate up slot
|
|
416
|
-
node = node.assignedSlot;
|
|
417
|
-
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
418
|
-
// cross shadow boundary
|
|
419
|
-
node = rootNode.host;
|
|
420
|
-
} else {
|
|
421
|
-
// iterate up normal dom
|
|
422
|
-
node = parentElement;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
node = originalNode;
|
|
427
|
-
} // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
428
|
-
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
429
|
-
// it might be a falsy value, which means shadow DOM support is disabled
|
|
430
|
-
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
431
|
-
// now we can just test to see if it would normally be visible or not, provided it's
|
|
432
|
-
// attached to the main document.
|
|
433
|
-
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
434
|
-
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
if (nodeIsAttached) {
|
|
438
|
-
// this works wherever the node is: if there's at least one client rect, it's
|
|
439
|
-
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
440
|
-
// node itself is hidden in place of its contents; and there's no need to search
|
|
441
|
-
// up the hierarchy either
|
|
442
|
-
return !node.getClientRects().length;
|
|
443
|
-
} // Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
444
|
-
// API will __always__ return zero rects (this can happen, for example, if React
|
|
445
|
-
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
446
|
-
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
447
|
-
//
|
|
448
|
-
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
449
|
-
// because styles are only computed for nodes that are in the document.
|
|
450
|
-
//
|
|
451
|
-
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
452
|
-
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
453
|
-
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
454
|
-
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
455
|
-
// considering __everything__ to be visible because of the innability to determine styles.
|
|
456
|
-
|
|
457
|
-
} else if (displayCheck === 'non-zero-area') {
|
|
458
|
-
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
459
|
-
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
460
|
-
// client rect, we don't special-case for whether the node is attached or not. In
|
|
461
|
-
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
462
|
-
// times, and that includes attached or not.
|
|
463
|
-
return isZeroArea(node);
|
|
464
|
-
} // visible, as far as we can tell, or per current `displayCheck` mode
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
return false;
|
|
468
|
-
}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
469
|
-
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
470
|
-
// fieldset
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
474
|
-
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
475
|
-
var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>
|
|
476
|
-
|
|
477
|
-
while (parentNode) {
|
|
478
|
-
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
479
|
-
// look for the first <legend> among the children of the disabled <fieldset>
|
|
480
|
-
for (var i = 0; i < parentNode.children.length; i++) {
|
|
481
|
-
var child = parentNode.children.item(i); // when the first <legend> (in document order) is found
|
|
482
|
-
|
|
483
|
-
if (child.tagName === 'LEGEND') {
|
|
484
|
-
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
485
|
-
// return whether `node` is a descendant of its first <legend>
|
|
486
|
-
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
487
|
-
}
|
|
488
|
-
} // the disabled <fieldset> containing `node` has no <legend>
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return true;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
parentNode = parentNode.parentElement;
|
|
495
|
-
}
|
|
496
|
-
} // else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
497
|
-
// enabled/disabled state
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
return false;
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
504
|
-
if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
|
|
505
|
-
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
506
|
-
return false;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
return true;
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
513
|
-
if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
514
|
-
return false;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
return true;
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
|
|
521
|
-
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
522
|
-
|
|
523
|
-
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
524
|
-
return true;
|
|
525
|
-
} // If a custom element has an explicit negative tabindex,
|
|
526
|
-
// browsers will not allow tab targeting said element's children.
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
return false;
|
|
530
|
-
};
|
|
531
|
-
/**
|
|
532
|
-
* @param {Array.<Element|CandidatesScope>} candidates
|
|
533
|
-
* @returns Element[]
|
|
534
|
-
*/
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
var sortByOrder = function sortByOrder(candidates) {
|
|
538
|
-
var regularTabbables = [];
|
|
539
|
-
var orderedTabbables = [];
|
|
540
|
-
candidates.forEach(function (item, i) {
|
|
541
|
-
var isScope = !!item.scope;
|
|
542
|
-
var element = isScope ? item.scope : item;
|
|
543
|
-
var candidateTabindex = getTabindex(element, isScope);
|
|
544
|
-
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
545
|
-
|
|
546
|
-
if (candidateTabindex === 0) {
|
|
547
|
-
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
548
|
-
} else {
|
|
549
|
-
orderedTabbables.push({
|
|
550
|
-
documentOrder: i,
|
|
551
|
-
tabIndex: candidateTabindex,
|
|
552
|
-
item: item,
|
|
553
|
-
isScope: isScope,
|
|
554
|
-
content: elements
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
559
|
-
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
560
|
-
return acc;
|
|
561
|
-
}, []).concat(regularTabbables);
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
var tabbable = function tabbable(el, options) {
|
|
565
|
-
options = options || {};
|
|
566
|
-
var candidates;
|
|
567
|
-
|
|
568
|
-
if (options.getShadowRoot) {
|
|
569
|
-
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
570
|
-
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
571
|
-
flatten: false,
|
|
572
|
-
getShadowRoot: options.getShadowRoot,
|
|
573
|
-
shadowRootFilter: isValidShadowRootTabbable
|
|
574
|
-
});
|
|
575
|
-
} else {
|
|
576
|
-
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
return sortByOrder(candidates);
|
|
580
|
-
};
|
|
581
|
-
|
|
582
|
-
var focusable = function focusable(el, options) {
|
|
583
|
-
options = options || {};
|
|
584
|
-
var candidates;
|
|
585
|
-
|
|
586
|
-
if (options.getShadowRoot) {
|
|
587
|
-
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
588
|
-
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
589
|
-
flatten: true,
|
|
590
|
-
getShadowRoot: options.getShadowRoot
|
|
591
|
-
});
|
|
592
|
-
} else {
|
|
593
|
-
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
return candidates;
|
|
597
|
-
};
|
|
598
|
-
|
|
599
|
-
var isTabbable = function isTabbable(node, options) {
|
|
600
|
-
options = options || {};
|
|
601
|
-
|
|
602
|
-
if (!node) {
|
|
603
|
-
throw new Error('No node provided');
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
if (matches.call(node, candidateSelector) === false) {
|
|
607
|
-
return false;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
return isNodeMatchingSelectorTabbable(options, node);
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
614
|
-
|
|
615
|
-
var isFocusable = function isFocusable(node, options) {
|
|
616
|
-
options = options || {};
|
|
617
|
-
|
|
618
|
-
if (!node) {
|
|
619
|
-
throw new Error('No node provided');
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
623
|
-
return false;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
return isNodeMatchingSelectorFocusable(options, node);
|
|
627
|
-
};
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
//# sourceMappingURL=index.esm.js.map
|
|
631
|
-
|
|
632
|
-
// EXTERNAL MODULE: ../node_modules/@jupyter/web-components/dist/esm/design-tokens.js + 30 modules
|
|
633
|
-
var design_tokens = __webpack_require__(87206);
|
|
634
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-element/dist/esm/styles/css.js
|
|
635
|
-
var css = __webpack_require__(12634);
|
|
636
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/display.js
|
|
637
|
-
var display = __webpack_require__(21601);
|
|
638
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/style/focus.js
|
|
639
|
-
var style_focus = __webpack_require__(58201);
|
|
640
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-foundation/dist/esm/utilities/match-media-stylesheet-behavior.js
|
|
641
|
-
var match_media_stylesheet_behavior = __webpack_require__(98242);
|
|
642
|
-
// EXTERNAL MODULE: ../node_modules/@microsoft/fast-web-utilities/dist/system-colors.js
|
|
643
|
-
var system_colors = __webpack_require__(30550);
|
|
644
|
-
;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/toolbar/toolbar.styles.js
|
|
645
|
-
// Copyright (c) Jupyter Development Team.
|
|
646
|
-
// Copyright (c) Microsoft Corporation.
|
|
647
|
-
// Distributed under the terms of the Modified BSD License.
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Styles for the Toolbar
|
|
654
|
-
*
|
|
655
|
-
* @public
|
|
656
|
-
*/
|
|
657
|
-
const toolbarStyles = (context, definition) => (0,css/* css */.i) `
|
|
658
|
-
${(0,display/* display */.j)('inline-flex')} :host {
|
|
659
|
-
--toolbar-item-gap: calc(
|
|
660
|
-
(var(--design-unit) + calc(var(--density) + 2)) * 1px
|
|
661
|
-
);
|
|
662
|
-
background-color: ${design_tokens/* fillColor */.If};
|
|
663
|
-
border-radius: calc(${design_tokens/* controlCornerRadius */.UW} * 1px);
|
|
664
|
-
fill: currentcolor;
|
|
665
|
-
padding: var(--toolbar-item-gap);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
:host(${style_focus/* focusVisible */.b}) {
|
|
669
|
-
outline: calc(${design_tokens/* strokeWidth */.H} * 1px) solid ${design_tokens/* accentFillFocus */.D8};
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.positioning-region {
|
|
673
|
-
align-items: flex-start;
|
|
674
|
-
display: inline-flex;
|
|
675
|
-
flex-flow: row wrap;
|
|
676
|
-
justify-content: flex-start;
|
|
677
|
-
width: 100%;
|
|
678
|
-
height: 100%;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
:host([orientation='vertical']) .positioning-region {
|
|
682
|
-
flex-direction: column;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
::slotted(:not([slot])) {
|
|
686
|
-
flex: 0 0 auto;
|
|
687
|
-
margin: 0 var(--toolbar-item-gap);
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
:host([orientation='vertical']) ::slotted(:not([slot])) {
|
|
691
|
-
margin: var(--toolbar-item-gap) 0;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
.start,
|
|
695
|
-
.end {
|
|
696
|
-
display: flex;
|
|
697
|
-
margin: auto;
|
|
698
|
-
margin-inline: 0;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
::slotted(svg) {
|
|
702
|
-
/* TODO: adaptive typography https://github.com/microsoft/fast/issues/2432 */
|
|
703
|
-
width: 16px;
|
|
704
|
-
height: 16px;
|
|
705
|
-
}
|
|
706
|
-
`.withBehaviors((0,match_media_stylesheet_behavior/* forcedColorsStylesheetBehavior */.vF)((0,css/* css */.i) `
|
|
707
|
-
:host(:${style_focus/* focusVisible */.b}) {
|
|
708
|
-
box-shadow: 0 0 0 calc(${design_tokens/* focusStrokeWidth */.vx} * 1px)
|
|
709
|
-
${system_colors/* SystemColors */.H.Highlight};
|
|
710
|
-
color: ${system_colors/* SystemColors */.H.ButtonText};
|
|
711
|
-
forced-color-adjust: none;
|
|
712
|
-
}
|
|
713
|
-
`));
|
|
714
|
-
|
|
715
|
-
;// CONCATENATED MODULE: ../node_modules/@jupyter/web-components/dist/esm/toolbar/index.js
|
|
716
|
-
// Copyright (c) Jupyter Development Team.
|
|
717
|
-
// Copyright (c) Microsoft Corporation.
|
|
718
|
-
// Distributed under the terms of the Modified BSD License.
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* A map for directionality derived from keyboard input strings,
|
|
728
|
-
* visual orientation, and text direction.
|
|
729
|
-
*
|
|
730
|
-
* @internal
|
|
731
|
-
*/
|
|
732
|
-
const ToolbarArrowKeyMap = Object.freeze({
|
|
733
|
-
[key_codes/* ArrowKeys */.uf.ArrowUp]: {
|
|
734
|
-
[Orientation.vertical]: -1
|
|
735
|
-
},
|
|
736
|
-
[key_codes/* ArrowKeys */.uf.ArrowDown]: {
|
|
737
|
-
[Orientation.vertical]: 1
|
|
738
|
-
},
|
|
739
|
-
[key_codes/* ArrowKeys */.uf.ArrowLeft]: {
|
|
740
|
-
[Orientation.horizontal]: {
|
|
741
|
-
[localization/* Direction */.N.ltr]: -1,
|
|
742
|
-
[localization/* Direction */.N.rtl]: 1
|
|
743
|
-
}
|
|
744
|
-
},
|
|
745
|
-
[key_codes/* ArrowKeys */.uf.ArrowRight]: {
|
|
746
|
-
[Orientation.horizontal]: {
|
|
747
|
-
[localization/* Direction */.N.ltr]: 1,
|
|
748
|
-
[localization/* Direction */.N.rtl]: -1
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
/**
|
|
753
|
-
* A Toolbar Custom HTML Element.
|
|
754
|
-
* Implements the {@link https://w3c.github.io/aria-practices/#Toolbar|ARIA Toolbar}.
|
|
755
|
-
*
|
|
756
|
-
* @slot start - Content which can be provided before the slotted items
|
|
757
|
-
* @slot end - Content which can be provided after the slotted items
|
|
758
|
-
* @slot - The default slot for slotted items
|
|
759
|
-
* @slot label - The toolbar label
|
|
760
|
-
* @csspart positioning-region - The element containing the items, start and end slots
|
|
761
|
-
*
|
|
762
|
-
* @public
|
|
763
|
-
*/
|
|
764
|
-
class FoundationToolbar extends foundation_element/* FoundationElement */.I {
|
|
765
|
-
constructor() {
|
|
766
|
-
super(...arguments);
|
|
767
|
-
/**
|
|
768
|
-
* The internal index of the currently focused element.
|
|
769
|
-
*
|
|
770
|
-
* @internal
|
|
771
|
-
*/
|
|
772
|
-
this._activeIndex = 0;
|
|
773
|
-
/**
|
|
774
|
-
* The text direction of the toolbar.
|
|
775
|
-
*
|
|
776
|
-
* @internal
|
|
777
|
-
*/
|
|
778
|
-
this.direction = localization/* Direction */.N.ltr;
|
|
779
|
-
/**
|
|
780
|
-
* The orientation of the toolbar.
|
|
781
|
-
*
|
|
782
|
-
* @public
|
|
783
|
-
* @remarks
|
|
784
|
-
* HTML Attribute: `orientation`
|
|
785
|
-
*/
|
|
786
|
-
this.orientation = Orientation.horizontal;
|
|
787
|
-
}
|
|
788
|
-
/**
|
|
789
|
-
* The index of the currently focused element, clamped between 0 and the last element.
|
|
790
|
-
*
|
|
791
|
-
* @internal
|
|
792
|
-
*/
|
|
793
|
-
get activeIndex() {
|
|
794
|
-
observable/* Observable */.y$.track(this, 'activeIndex');
|
|
795
|
-
return this._activeIndex;
|
|
796
|
-
}
|
|
797
|
-
set activeIndex(value) {
|
|
798
|
-
if (this.$fastController.isConnected) {
|
|
799
|
-
this._activeIndex = limit(0, this.focusableElements.length - 1, value);
|
|
800
|
-
observable/* Observable */.y$.notify(this, 'activeIndex');
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
slottedItemsChanged() {
|
|
804
|
-
if (this.$fastController.isConnected) {
|
|
805
|
-
this.reduceFocusableElements();
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* Set the activeIndex when a focusable element in the toolbar is clicked.
|
|
810
|
-
*
|
|
811
|
-
* @internal
|
|
812
|
-
*/
|
|
813
|
-
mouseDownHandler(e) {
|
|
814
|
-
var _a;
|
|
815
|
-
const activeIndex = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a.findIndex(x => x.contains(e.target));
|
|
816
|
-
if (activeIndex > -1 && this.activeIndex !== activeIndex) {
|
|
817
|
-
this.setFocusedElement(activeIndex);
|
|
818
|
-
}
|
|
819
|
-
return true;
|
|
820
|
-
}
|
|
821
|
-
childItemsChanged(prev, next) {
|
|
822
|
-
if (this.$fastController.isConnected) {
|
|
823
|
-
this.reduceFocusableElements();
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* @internal
|
|
828
|
-
*/
|
|
829
|
-
connectedCallback() {
|
|
830
|
-
super.connectedCallback();
|
|
831
|
-
this.direction = getDirection(this);
|
|
832
|
-
}
|
|
833
|
-
/**
|
|
834
|
-
* When the toolbar receives focus, set the currently active element as focused.
|
|
835
|
-
*
|
|
836
|
-
* @internal
|
|
837
|
-
*/
|
|
838
|
-
focusinHandler(e) {
|
|
839
|
-
const relatedTarget = e.relatedTarget;
|
|
840
|
-
if (!relatedTarget || this.contains(relatedTarget)) {
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
this.setFocusedElement();
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
* Determines a value that can be used to iterate a list with the arrow keys.
|
|
847
|
-
*
|
|
848
|
-
* @param this - An element with an orientation and direction
|
|
849
|
-
* @param key - The event key value
|
|
850
|
-
* @internal
|
|
851
|
-
*/
|
|
852
|
-
getDirectionalIncrementer(key) {
|
|
853
|
-
var _a, _b, _c, _d, _e;
|
|
854
|
-
return (
|
|
855
|
-
// @ts-expect-error ToolbarArrowKeyMap has not index
|
|
856
|
-
(_e = (_c = (_b = (_a = ToolbarArrowKeyMap[key]) === null || _a === void 0 ? void 0 : _a[this.orientation]) === null || _b === void 0 ? void 0 : _b[this.direction]) !== null && _c !== void 0 ? _c :
|
|
857
|
-
// @ts-expect-error ToolbarArrowKeyMap has not index
|
|
858
|
-
(_d = ToolbarArrowKeyMap[key]) === null || _d === void 0 ? void 0 : _d[this.orientation]) !== null && _e !== void 0 ? _e : 0);
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* Handle keyboard events for the toolbar.
|
|
862
|
-
*
|
|
863
|
-
* @internal
|
|
864
|
-
*/
|
|
865
|
-
keydownHandler(e) {
|
|
866
|
-
const key = e.key;
|
|
867
|
-
if (!(key in key_codes/* ArrowKeys */.uf) || e.defaultPrevented || e.shiftKey) {
|
|
868
|
-
return true;
|
|
869
|
-
}
|
|
870
|
-
const incrementer = this.getDirectionalIncrementer(key);
|
|
871
|
-
if (!incrementer) {
|
|
872
|
-
return !e.target.closest('[role=radiogroup]');
|
|
873
|
-
}
|
|
874
|
-
const nextIndex = this.activeIndex + incrementer;
|
|
875
|
-
if (this.focusableElements[nextIndex]) {
|
|
876
|
-
e.preventDefault();
|
|
877
|
-
}
|
|
878
|
-
this.setFocusedElement(nextIndex);
|
|
879
|
-
return true;
|
|
880
|
-
}
|
|
881
|
-
/**
|
|
882
|
-
* get all the slotted elements
|
|
883
|
-
* @internal
|
|
884
|
-
*/
|
|
885
|
-
get allSlottedItems() {
|
|
886
|
-
return [
|
|
887
|
-
...this.start.assignedElements(),
|
|
888
|
-
...this.slottedItems,
|
|
889
|
-
...this.end.assignedElements()
|
|
890
|
-
];
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
|
-
* Prepare the slotted elements which can be focusable.
|
|
894
|
-
*
|
|
895
|
-
* @internal
|
|
896
|
-
*/
|
|
897
|
-
reduceFocusableElements() {
|
|
898
|
-
var _a;
|
|
899
|
-
const previousFocusedElement = (_a = this.focusableElements) === null || _a === void 0 ? void 0 : _a[this.activeIndex];
|
|
900
|
-
this.focusableElements = this.allSlottedItems.reduce(FoundationToolbar.reduceFocusableItems, []);
|
|
901
|
-
// If the previously active item is still focusable, adjust the active index to the
|
|
902
|
-
// index of that item.
|
|
903
|
-
const adjustedActiveIndex = this.focusableElements.indexOf(previousFocusedElement);
|
|
904
|
-
this.activeIndex = Math.max(0, adjustedActiveIndex);
|
|
905
|
-
this.setFocusableElements();
|
|
906
|
-
}
|
|
907
|
-
/**
|
|
908
|
-
* Set the activeIndex and focus the corresponding control.
|
|
909
|
-
*
|
|
910
|
-
* @param activeIndex - The new index to set
|
|
911
|
-
* @internal
|
|
912
|
-
*/
|
|
913
|
-
setFocusedElement(activeIndex = this.activeIndex) {
|
|
914
|
-
this.activeIndex = activeIndex;
|
|
915
|
-
this.setFocusableElements();
|
|
916
|
-
if (this.focusableElements[this.activeIndex] &&
|
|
917
|
-
// Don't focus the toolbar element if some event handlers moved
|
|
918
|
-
// the focus on another element in the page.
|
|
919
|
-
this.contains(document.activeElement)) {
|
|
920
|
-
this.focusableElements[this.activeIndex].focus();
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* Reduce a collection to only its focusable elements.
|
|
925
|
-
*
|
|
926
|
-
* @param elements - Collection of elements to reduce
|
|
927
|
-
* @param element - The current element
|
|
928
|
-
*
|
|
929
|
-
* @internal
|
|
930
|
-
*/
|
|
931
|
-
static reduceFocusableItems(elements, element) {
|
|
932
|
-
var _a, _b, _c, _d;
|
|
933
|
-
const isRoleRadio = element.getAttribute('role') === 'radio';
|
|
934
|
-
const isFocusableFastElement = (_b = (_a = element.$fastController) === null || _a === void 0 ? void 0 : _a.definition.shadowOptions) === null || _b === void 0 ? void 0 : _b.delegatesFocus;
|
|
935
|
-
const hasFocusableShadow = Array.from((_d = (_c = element.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll('*')) !== null && _d !== void 0 ? _d : []).some(x => isFocusable(x));
|
|
936
|
-
if (!element.hasAttribute('disabled') &&
|
|
937
|
-
!element.hasAttribute('hidden') &&
|
|
938
|
-
(isFocusable(element) ||
|
|
939
|
-
isRoleRadio ||
|
|
940
|
-
isFocusableFastElement ||
|
|
941
|
-
hasFocusableShadow)) {
|
|
942
|
-
elements.push(element);
|
|
943
|
-
return elements;
|
|
944
|
-
}
|
|
945
|
-
if (element.childElementCount) {
|
|
946
|
-
return elements.concat(Array.from(element.children).reduce(FoundationToolbar.reduceFocusableItems, []));
|
|
947
|
-
}
|
|
948
|
-
return elements;
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* @internal
|
|
952
|
-
*/
|
|
953
|
-
setFocusableElements() {
|
|
954
|
-
if (this.$fastController.isConnected && this.focusableElements.length > 0) {
|
|
955
|
-
this.focusableElements.forEach((element, index) => {
|
|
956
|
-
element.tabIndex = this.activeIndex === index ? 0 : -1;
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
962
|
-
observable/* observable */.LO
|
|
963
|
-
], FoundationToolbar.prototype, "direction", void 0);
|
|
964
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
965
|
-
attributes/* attr */.Lj
|
|
966
|
-
], FoundationToolbar.prototype, "orientation", void 0);
|
|
967
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
968
|
-
observable/* observable */.LO
|
|
969
|
-
], FoundationToolbar.prototype, "slottedItems", void 0);
|
|
970
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
971
|
-
observable/* observable */.LO
|
|
972
|
-
], FoundationToolbar.prototype, "slottedLabel", void 0);
|
|
973
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
974
|
-
observable/* observable */.LO
|
|
975
|
-
], FoundationToolbar.prototype, "childItems", void 0);
|
|
976
|
-
/**
|
|
977
|
-
* Includes ARIA states and properties relating to the ARIA toolbar role
|
|
978
|
-
*
|
|
979
|
-
* @public
|
|
980
|
-
*/
|
|
981
|
-
class DelegatesARIAToolbar {
|
|
982
|
-
}
|
|
983
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
984
|
-
(0,attributes/* attr */.Lj)({ attribute: 'aria-labelledby' })
|
|
985
|
-
], DelegatesARIAToolbar.prototype, "ariaLabelledby", void 0);
|
|
986
|
-
(0,tslib_es6/* __decorate */.gn)([
|
|
987
|
-
(0,attributes/* attr */.Lj)({ attribute: 'aria-label' })
|
|
988
|
-
], DelegatesARIAToolbar.prototype, "ariaLabel", void 0);
|
|
989
|
-
(0,apply_mixins/* applyMixins */.e)(DelegatesARIAToolbar, aria_global/* ARIAGlobalStatesAndProperties */.v);
|
|
990
|
-
(0,apply_mixins/* applyMixins */.e)(FoundationToolbar, start_end/* StartEnd */.hW, DelegatesARIAToolbar);
|
|
991
|
-
/**
|
|
992
|
-
* @public
|
|
993
|
-
* @tagname jp-toolbar
|
|
994
|
-
*/
|
|
995
|
-
class Toolbar extends FoundationToolbar {
|
|
996
|
-
connectedCallback() {
|
|
997
|
-
super.connectedCallback();
|
|
998
|
-
const parent = (0,composed_parent/* composedParent */.T)(this);
|
|
999
|
-
if (parent) {
|
|
1000
|
-
design_tokens/* fillColor */.If.setValueFor(this, (target) => design_tokens/* neutralFillLayerRecipe */.ab
|
|
1001
|
-
.getValueFor(target)
|
|
1002
|
-
.evaluate(target, design_tokens/* fillColor */.If.getValueFor(parent)));
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* A function that returns a {@link @microsoft/fast-foundation#Toolbar} registration for configuring the component with a DesignSystem.
|
|
1008
|
-
* Implements {@link @microsoft/fast-foundation#toolbarTemplate}
|
|
1009
|
-
*
|
|
1010
|
-
* @public
|
|
1011
|
-
* @remarks
|
|
1012
|
-
*
|
|
1013
|
-
* Generates HTML Element: `<jp-toolbar>`
|
|
1014
|
-
*
|
|
1015
|
-
*/
|
|
1016
|
-
const jpToolbar = Toolbar.compose({
|
|
1017
|
-
baseName: 'toolbar',
|
|
1018
|
-
baseClass: FoundationToolbar,
|
|
1019
|
-
template: toolbarTemplate,
|
|
1020
|
-
styles: toolbarStyles,
|
|
1021
|
-
shadowOptions: {
|
|
1022
|
-
delegatesFocus: true
|
|
1023
|
-
}
|
|
1024
|
-
});
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
/***/ }),
|
|
1029
|
-
|
|
1030
|
-
/***/ 62991:
|
|
1031
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1032
|
-
|
|
1033
|
-
"use strict";
|
|
1034
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1035
|
-
/* harmony export */ e: () => (/* binding */ addJupyterLabThemeChangeListener)
|
|
1036
|
-
/* harmony export */ });
|
|
1037
|
-
/* unused harmony export applyJupyterTheme */
|
|
1038
|
-
/* harmony import */ var _microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93484);
|
|
1039
|
-
/* harmony import */ var _microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76962);
|
|
1040
|
-
/* harmony import */ var _microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77727);
|
|
1041
|
-
/* harmony import */ var _color_swatch_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(83571);
|
|
1042
|
-
/* harmony import */ var _color_utilities_base_layer_luminance_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79892);
|
|
1043
|
-
/* harmony import */ var _color_utilities_is_dark_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(90859);
|
|
1044
|
-
/* harmony import */ var _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87206);
|
|
1045
|
-
// Copyright (c) Jupyter Development Team.
|
|
1046
|
-
// Distributed under the terms of the Modified BSD License.
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
const THEME_NAME_BODY_ATTRIBUTE = 'data-jp-theme-name';
|
|
1053
|
-
const THEME_MODE_BODY_ATTRIBUTE = 'data-jp-theme-light';
|
|
1054
|
-
// Use to determine the neutral color and possibly if theme is dark
|
|
1055
|
-
const BASE_LAYOUT_COLOR = '--jp-layout-color1';
|
|
1056
|
-
/**
|
|
1057
|
-
* Flag to initialized only one listener
|
|
1058
|
-
*/
|
|
1059
|
-
let isThemeChangeInitialized = false;
|
|
1060
|
-
/**
|
|
1061
|
-
* Configures a MutationObserver to watch for Jupyter theme changes and
|
|
1062
|
-
* applies the current Jupyter theme to the toolkit components.
|
|
1063
|
-
*/
|
|
1064
|
-
function addJupyterLabThemeChangeListener() {
|
|
1065
|
-
if (!isThemeChangeInitialized) {
|
|
1066
|
-
isThemeChangeInitialized = true;
|
|
1067
|
-
initThemeChangeListener();
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
function initThemeChangeListener() {
|
|
1071
|
-
const addObserver = () => {
|
|
1072
|
-
const observer = new MutationObserver(() => {
|
|
1073
|
-
applyJupyterTheme();
|
|
1074
|
-
});
|
|
1075
|
-
observer.observe(document.body, {
|
|
1076
|
-
attributes: true,
|
|
1077
|
-
attributeFilter: [THEME_NAME_BODY_ATTRIBUTE],
|
|
1078
|
-
childList: false,
|
|
1079
|
-
characterData: false
|
|
1080
|
-
});
|
|
1081
|
-
applyJupyterTheme();
|
|
1082
|
-
};
|
|
1083
|
-
if (document.readyState === 'complete') {
|
|
1084
|
-
addObserver();
|
|
1085
|
-
}
|
|
1086
|
-
else {
|
|
1087
|
-
window.addEventListener('load', addObserver);
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
/**
|
|
1091
|
-
* Convert a string to an integer.
|
|
1092
|
-
*
|
|
1093
|
-
* @param value String to convert
|
|
1094
|
-
* @returns Extracted integer or null
|
|
1095
|
-
*/
|
|
1096
|
-
const intConverter = (value) => {
|
|
1097
|
-
const parsedValue = parseInt(value, 10);
|
|
1098
|
-
return isNaN(parsedValue) ? null : parsedValue;
|
|
1099
|
-
};
|
|
1100
|
-
/**
|
|
1101
|
-
* Mapping JupyterLab CSS variables to FAST design tokens
|
|
1102
|
-
*/
|
|
1103
|
-
const tokenMappings = {
|
|
1104
|
-
'--jp-border-width': {
|
|
1105
|
-
converter: intConverter,
|
|
1106
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .strokeWidth */ .H
|
|
1107
|
-
},
|
|
1108
|
-
'--jp-border-radius': {
|
|
1109
|
-
converter: intConverter,
|
|
1110
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .controlCornerRadius */ .UW
|
|
1111
|
-
},
|
|
1112
|
-
[BASE_LAYOUT_COLOR]: {
|
|
1113
|
-
converter: (value, isDark) => {
|
|
1114
|
-
const parsedColor = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_1__/* .parseColor */ .lu)(value);
|
|
1115
|
-
if (parsedColor) {
|
|
1116
|
-
const hsl = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__/* .rgbToHSL */ .lw)(parsedColor);
|
|
1117
|
-
// Neutral luminance should be about 50%
|
|
1118
|
-
const correctedHSL = _microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_3__/* .ColorHSL */ .H.fromObject({
|
|
1119
|
-
h: hsl.h,
|
|
1120
|
-
s: hsl.s,
|
|
1121
|
-
l: 0.5
|
|
1122
|
-
});
|
|
1123
|
-
const correctedRGB = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__/* .hslToRGB */ .hP)(correctedHSL);
|
|
1124
|
-
return _color_swatch_js__WEBPACK_IMPORTED_MODULE_4__/* .SwatchRGB */ .w.create(correctedRGB.r, correctedRGB.g, correctedRGB.b);
|
|
1125
|
-
}
|
|
1126
|
-
else {
|
|
1127
|
-
return null;
|
|
1128
|
-
}
|
|
1129
|
-
},
|
|
1130
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .neutralColor */ .z4
|
|
1131
|
-
},
|
|
1132
|
-
'--jp-brand-color1': {
|
|
1133
|
-
converter: (value, isDark) => {
|
|
1134
|
-
const parsedColor = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_1__/* .parseColor */ .lu)(value);
|
|
1135
|
-
if (parsedColor) {
|
|
1136
|
-
const hsl = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__/* .rgbToHSL */ .lw)(parsedColor);
|
|
1137
|
-
// Correct luminance to get accent fill closer to brand color 1
|
|
1138
|
-
const direction = isDark ? 1 : -1;
|
|
1139
|
-
const correctedHSL = _microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_3__/* .ColorHSL */ .H.fromObject({
|
|
1140
|
-
h: hsl.h,
|
|
1141
|
-
s: hsl.s,
|
|
1142
|
-
l: hsl.l +
|
|
1143
|
-
(direction * _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .accentFillHoverDelta */ .B2.getValueFor(document.body)) / 94.0
|
|
1144
|
-
});
|
|
1145
|
-
const correctedRGB = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__/* .hslToRGB */ .hP)(correctedHSL);
|
|
1146
|
-
return _color_swatch_js__WEBPACK_IMPORTED_MODULE_4__/* .SwatchRGB */ .w.create(correctedRGB.r, correctedRGB.g, correctedRGB.b);
|
|
1147
|
-
}
|
|
1148
|
-
else {
|
|
1149
|
-
return null;
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .accentColor */ .z
|
|
1153
|
-
},
|
|
1154
|
-
'--jp-error-color1': {
|
|
1155
|
-
converter: (value, isDark) => {
|
|
1156
|
-
const parsedColor = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_1__/* .parseColor */ .lu)(value);
|
|
1157
|
-
if (parsedColor) {
|
|
1158
|
-
const hsl = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__/* .rgbToHSL */ .lw)(parsedColor);
|
|
1159
|
-
// Correct luminance to get error fill closer
|
|
1160
|
-
const direction = isDark ? 1 : -1;
|
|
1161
|
-
const correctedHSL = _microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_3__/* .ColorHSL */ .H.fromObject({
|
|
1162
|
-
h: hsl.h,
|
|
1163
|
-
s: hsl.s,
|
|
1164
|
-
l: hsl.l +
|
|
1165
|
-
(direction * _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .accentFillHoverDelta */ .B2.getValueFor(document.body)) / 94.0
|
|
1166
|
-
});
|
|
1167
|
-
const correctedRGB = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_2__/* .hslToRGB */ .hP)(correctedHSL);
|
|
1168
|
-
return _color_swatch_js__WEBPACK_IMPORTED_MODULE_4__/* .SwatchRGB */ .w.create(correctedRGB.r, correctedRGB.g, correctedRGB.b);
|
|
1169
|
-
}
|
|
1170
|
-
else {
|
|
1171
|
-
return null;
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .errorColor */ .S_
|
|
1175
|
-
},
|
|
1176
|
-
'--jp-ui-font-family': {
|
|
1177
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .bodyFont */ .SV
|
|
1178
|
-
},
|
|
1179
|
-
'--jp-ui-font-size1': {
|
|
1180
|
-
token: _design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .typeRampBaseFontSize */ .cS
|
|
1181
|
-
}
|
|
1182
|
-
};
|
|
1183
|
-
/**
|
|
1184
|
-
* Applies the current Jupyter theme to the toolkit components.
|
|
1185
|
-
*/
|
|
1186
|
-
function applyJupyterTheme() {
|
|
1187
|
-
var _a;
|
|
1188
|
-
// Get all the styles applied to the <body> tag in the webview HTML
|
|
1189
|
-
// Importantly this includes all the CSS variables associated with the
|
|
1190
|
-
// current Jupyter theme
|
|
1191
|
-
const styles = getComputedStyle(document.body);
|
|
1192
|
-
// Set mode
|
|
1193
|
-
// It will look at the body attribute or try to extrapolate
|
|
1194
|
-
const themeMode = document.body.getAttribute(THEME_MODE_BODY_ATTRIBUTE);
|
|
1195
|
-
let isDark_ = false;
|
|
1196
|
-
if (themeMode) {
|
|
1197
|
-
isDark_ = themeMode === 'false';
|
|
1198
|
-
}
|
|
1199
|
-
else {
|
|
1200
|
-
const layoutColor = styles.getPropertyValue(BASE_LAYOUT_COLOR).toString();
|
|
1201
|
-
if (layoutColor) {
|
|
1202
|
-
const parsedColor = (0,_microsoft_fast_colors__WEBPACK_IMPORTED_MODULE_1__/* .parseColor */ .lu)(layoutColor);
|
|
1203
|
-
if (parsedColor) {
|
|
1204
|
-
isDark_ = (0,_color_utilities_is_dark_js__WEBPACK_IMPORTED_MODULE_5__/* .isDark */ ._)(_color_swatch_js__WEBPACK_IMPORTED_MODULE_4__/* .SwatchRGB */ .w.create(parsedColor.r, parsedColor.g, parsedColor.b));
|
|
1205
|
-
console.debug(`Theme is ${isDark_ ? 'dark' : 'light'} based on '${BASE_LAYOUT_COLOR}' value: ${layoutColor}.`);
|
|
1206
|
-
}
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
_design_tokens_js__WEBPACK_IMPORTED_MODULE_0__/* .baseLayerLuminance */ .q2.setValueFor(document.body, isDark_ ? _color_utilities_base_layer_luminance_js__WEBPACK_IMPORTED_MODULE_6__/* .StandardLuminance */ .h.DarkMode : _color_utilities_base_layer_luminance_js__WEBPACK_IMPORTED_MODULE_6__/* .StandardLuminance */ .h.LightMode);
|
|
1210
|
-
for (const jpTokenName in tokenMappings) {
|
|
1211
|
-
const toolkitTokenName = tokenMappings[jpTokenName];
|
|
1212
|
-
const value = styles.getPropertyValue(jpTokenName).toString();
|
|
1213
|
-
if (document.body && value !== '') {
|
|
1214
|
-
const parsedValue = ((_a = toolkitTokenName.converter) !== null && _a !== void 0 ? _a : ((v) => v))(value.trim(), isDark_);
|
|
1215
|
-
if (parsedValue !== null) {
|
|
1216
|
-
toolkitTokenName.token.setValueFor(document.body, parsedValue);
|
|
1217
|
-
}
|
|
1218
|
-
else {
|
|
1219
|
-
console.error(`Fail to parse value '${value}' for '${jpTokenName}' as FAST design token.`);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
/***/ }),
|
|
1
|
+
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[1871,7634,9531,8701],{
|
|
1227
2
|
|
|
1228
3
|
/***/ 40018:
|
|
1229
4
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -5220,4 +3995,4 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5220
3995
|
/***/ })
|
|
5221
3996
|
|
|
5222
3997
|
}]);
|
|
5223
|
-
//# sourceMappingURL=
|
|
3998
|
+
//# sourceMappingURL=1871.29951b77779d94d726d1.js.map?v=29951b77779d94d726d1
|