@ni/nimble-components 15.1.1 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/all-components-bundle.js +239 -71
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1482 -1487
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/dialog/index.d.ts +1 -1
- package/dist/esm/drawer/index.d.ts +2 -1
- package/dist/esm/drawer/index.js.map +1 -1
- package/dist/esm/icon-base/icon-metadata.js +9 -0
- package/dist/esm/icon-base/icon-metadata.js.map +1 -1
- package/dist/esm/icons/all-icons.d.ts +3 -0
- package/dist/esm/icons/all-icons.js +3 -0
- package/dist/esm/icons/all-icons.js.map +1 -1
- package/dist/esm/icons/check-large.d.ts +12 -0
- package/dist/esm/icons/check-large.js +14 -0
- package/dist/esm/icons/check-large.js.map +1 -0
- package/dist/esm/icons/dot-solid-dot-stroke-measurement.d.ts +12 -0
- package/dist/esm/icons/dot-solid-dot-stroke-measurement.js +14 -0
- package/dist/esm/icons/dot-solid-dot-stroke-measurement.js.map +1 -0
- package/dist/esm/icons/triangle-filled.d.ts +12 -0
- package/dist/esm/icons/triangle-filled.js +14 -0
- package/dist/esm/icons/triangle-filled.js.map +1 -0
- package/dist/fonts.scss +1 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ The theming system is composed of:
|
|
|
75
75
|
2. Include one import in your styles for the Nimble fonts. Nimble recommends using SCSS for capabilities such as build-time property checking.
|
|
76
76
|
|
|
77
77
|
```scss
|
|
78
|
-
@import '
|
|
78
|
+
@import '@ni/nimble-components/dist/fonts';
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
3. As needed, add Nimble components as descendants of the theme provider and they will inherit the theme.
|
|
@@ -83,7 +83,7 @@ The theming system is composed of:
|
|
|
83
83
|
4. As needed, import the theme-aware design tokens in each SCSS file that will leverage the tokens for other parts of your application (for colors, fonts, etc).
|
|
84
84
|
|
|
85
85
|
```scss
|
|
86
|
-
@import '
|
|
86
|
+
@import '@ni/nimble-components/dist/tokens';
|
|
87
87
|
|
|
88
88
|
.my-element {
|
|
89
89
|
font-family: $ni-nimble-body-font-family;
|
|
@@ -70,6 +70,27 @@
|
|
|
70
70
|
* @internal
|
|
71
71
|
*/
|
|
72
72
|
const emptyArray = Object.freeze([]);
|
|
73
|
+
/**
|
|
74
|
+
* Creates a function capable of locating metadata associated with a type.
|
|
75
|
+
* @returns A metadata locator function.
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
function createMetadataLocator() {
|
|
79
|
+
const metadataLookup = new WeakMap();
|
|
80
|
+
return function (target) {
|
|
81
|
+
let metadata = metadataLookup.get(target);
|
|
82
|
+
if (metadata === void 0) {
|
|
83
|
+
let currentTarget = Reflect.getPrototypeOf(target);
|
|
84
|
+
while (metadata === void 0 && currentTarget !== null) {
|
|
85
|
+
metadata = metadataLookup.get(currentTarget);
|
|
86
|
+
currentTarget = Reflect.getPrototypeOf(currentTarget);
|
|
87
|
+
}
|
|
88
|
+
metadata = metadata === void 0 ? [] : metadata.slice(0);
|
|
89
|
+
metadataLookup.set(target, metadata);
|
|
90
|
+
}
|
|
91
|
+
return metadata;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
73
94
|
|
|
74
95
|
const updateQueue = $global.FAST.getById(1 /* updateQueue */, () => {
|
|
75
96
|
const tasks = [];
|
|
@@ -458,7 +479,6 @@
|
|
|
458
479
|
const Observable = FAST.getById(2 /* observable */, () => {
|
|
459
480
|
const volatileRegex = /(:|&&|\|\||if)/;
|
|
460
481
|
const notifierLookup = new WeakMap();
|
|
461
|
-
const accessorLookup = new WeakMap();
|
|
462
482
|
const queueUpdate = DOM.queueUpdate;
|
|
463
483
|
let watcher = void 0;
|
|
464
484
|
let createArrayObserver = (array) => {
|
|
@@ -476,24 +496,7 @@
|
|
|
476
496
|
}
|
|
477
497
|
return found;
|
|
478
498
|
}
|
|
479
|
-
|
|
480
|
-
let accessors = accessorLookup.get(target);
|
|
481
|
-
if (accessors === void 0) {
|
|
482
|
-
let currentTarget = Reflect.getPrototypeOf(target);
|
|
483
|
-
while (accessors === void 0 && currentTarget !== null) {
|
|
484
|
-
accessors = accessorLookup.get(currentTarget);
|
|
485
|
-
currentTarget = Reflect.getPrototypeOf(currentTarget);
|
|
486
|
-
}
|
|
487
|
-
if (accessors === void 0) {
|
|
488
|
-
accessors = [];
|
|
489
|
-
}
|
|
490
|
-
else {
|
|
491
|
-
accessors = accessors.slice(0);
|
|
492
|
-
}
|
|
493
|
-
accessorLookup.set(target, accessors);
|
|
494
|
-
}
|
|
495
|
-
return accessors;
|
|
496
|
-
}
|
|
499
|
+
const getAccessors = createMetadataLocator();
|
|
497
500
|
class DefaultObservableAccessor {
|
|
498
501
|
constructor(name) {
|
|
499
502
|
this.name = name;
|
|
@@ -1361,8 +1364,10 @@
|
|
|
1361
1364
|
node.parentNode.insertBefore(this.fragment, node);
|
|
1362
1365
|
}
|
|
1363
1366
|
else {
|
|
1364
|
-
const parentNode = node.parentNode;
|
|
1365
1367
|
const end = this.lastChild;
|
|
1368
|
+
if (node.previousSibling === end)
|
|
1369
|
+
return;
|
|
1370
|
+
const parentNode = node.parentNode;
|
|
1366
1371
|
let current = this.firstChild;
|
|
1367
1372
|
let next;
|
|
1368
1373
|
while (current !== end) {
|
|
@@ -1768,6 +1773,16 @@
|
|
|
1768
1773
|
}
|
|
1769
1774
|
}
|
|
1770
1775
|
|
|
1776
|
+
/**
|
|
1777
|
+
* Metadata used to configure a custom attribute's behavior.
|
|
1778
|
+
* @public
|
|
1779
|
+
*/
|
|
1780
|
+
const AttributeConfiguration = Object.freeze({
|
|
1781
|
+
/**
|
|
1782
|
+
* Locates all attribute configurations associated with a type.
|
|
1783
|
+
*/
|
|
1784
|
+
locate: createMetadataLocator(),
|
|
1785
|
+
});
|
|
1771
1786
|
/**
|
|
1772
1787
|
* A {@link ValueConverter} that converts to and from `boolean` values.
|
|
1773
1788
|
* @remarks
|
|
@@ -1908,7 +1923,7 @@
|
|
|
1908
1923
|
*/
|
|
1909
1924
|
static collect(Owner, ...attributeLists) {
|
|
1910
1925
|
const attributes = [];
|
|
1911
|
-
attributeLists.push(Owner
|
|
1926
|
+
attributeLists.push(AttributeConfiguration.locate(Owner));
|
|
1912
1927
|
for (let i = 0, ii = attributeLists.length; i < ii; ++i) {
|
|
1913
1928
|
const list = attributeLists[i];
|
|
1914
1929
|
if (list === void 0) {
|
|
@@ -1938,9 +1953,7 @@
|
|
|
1938
1953
|
// - @attr({...opts})
|
|
1939
1954
|
config.property = $prop;
|
|
1940
1955
|
}
|
|
1941
|
-
|
|
1942
|
-
($target.constructor.attributes = []);
|
|
1943
|
-
attributes.push(config);
|
|
1956
|
+
AttributeConfiguration.locate($target.constructor).push(config);
|
|
1944
1957
|
}
|
|
1945
1958
|
if (arguments.length > 1) {
|
|
1946
1959
|
// Non invocation:
|
|
@@ -4306,6 +4319,7 @@
|
|
|
4306
4319
|
* @public
|
|
4307
4320
|
*/
|
|
4308
4321
|
function applyMixins(derivedCtor, ...baseCtors) {
|
|
4322
|
+
const derivedAttributes = AttributeConfiguration.locate(derivedCtor);
|
|
4309
4323
|
baseCtors.forEach(baseCtor => {
|
|
4310
4324
|
Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
|
|
4311
4325
|
if (name !== "constructor") {
|
|
@@ -4314,10 +4328,8 @@
|
|
|
4314
4328
|
Object.getOwnPropertyDescriptor(baseCtor.prototype, name));
|
|
4315
4329
|
}
|
|
4316
4330
|
});
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
derivedCtor.attributes = existing.concat(baseCtor.attributes);
|
|
4320
|
-
}
|
|
4331
|
+
const baseAttributes = AttributeConfiguration.locate(baseCtor);
|
|
4332
|
+
baseAttributes.forEach(x => derivedAttributes.push(x));
|
|
4321
4333
|
});
|
|
4322
4334
|
}
|
|
4323
4335
|
|
|
@@ -6344,13 +6356,10 @@
|
|
|
6344
6356
|
this.removeChild(this.proxy);
|
|
6345
6357
|
(_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.removeChild(this.proxySlot);
|
|
6346
6358
|
}
|
|
6347
|
-
/**
|
|
6348
|
-
|
|
6349
|
-
* validity, but this can be extended or replaced in implementation.
|
|
6350
|
-
*/
|
|
6351
|
-
validate() {
|
|
6359
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
6360
|
+
validate(anchor) {
|
|
6352
6361
|
if (this.proxy instanceof HTMLElement) {
|
|
6353
|
-
this.setValidity(this.proxy.validity, this.proxy.validationMessage);
|
|
6362
|
+
this.setValidity(this.proxy.validity, this.proxy.validationMessage, anchor);
|
|
6354
6363
|
}
|
|
6355
6364
|
}
|
|
6356
6365
|
/**
|
|
@@ -6594,6 +6603,10 @@
|
|
|
6594
6603
|
next === "reset" && this.addEventListener("click", this.handleFormReset);
|
|
6595
6604
|
previous === "reset" && this.removeEventListener("click", this.handleFormReset);
|
|
6596
6605
|
}
|
|
6606
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
6607
|
+
validate() {
|
|
6608
|
+
super.validate(this.control);
|
|
6609
|
+
}
|
|
6597
6610
|
/**
|
|
6598
6611
|
* @internal
|
|
6599
6612
|
*/
|
|
@@ -7612,6 +7625,10 @@
|
|
|
7612
7625
|
this.setDefaultSelectedOption();
|
|
7613
7626
|
this.updateValue();
|
|
7614
7627
|
}
|
|
7628
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
7629
|
+
validate() {
|
|
7630
|
+
super.validate(this.control);
|
|
7631
|
+
}
|
|
7615
7632
|
get isAutocompleteInline() {
|
|
7616
7633
|
return (this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth);
|
|
7617
7634
|
}
|
|
@@ -7823,10 +7840,15 @@
|
|
|
7823
7840
|
if (this.isAutocompleteList && !this.open) {
|
|
7824
7841
|
this.open = true;
|
|
7825
7842
|
}
|
|
7826
|
-
if (this.isAutocompleteInline
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7843
|
+
if (this.isAutocompleteInline) {
|
|
7844
|
+
if (this.filteredOptions.length) {
|
|
7845
|
+
this.selectedOptions = [this.filteredOptions[0]];
|
|
7846
|
+
this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
|
|
7847
|
+
this.setInlineSelection();
|
|
7848
|
+
}
|
|
7849
|
+
else {
|
|
7850
|
+
this.selectedIndex = -1;
|
|
7851
|
+
}
|
|
7830
7852
|
}
|
|
7831
7853
|
return;
|
|
7832
7854
|
}
|
|
@@ -9261,11 +9283,17 @@
|
|
|
9261
9283
|
/* eslint-enable @typescript-eslint/no-non-null-assertion */
|
|
9262
9284
|
|
|
9263
9285
|
/*!
|
|
9264
|
-
* tabbable 5.
|
|
9286
|
+
* tabbable 5.3.3
|
|
9265
9287
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
9266
9288
|
*/
|
|
9267
|
-
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
9268
|
-
var
|
|
9289
|
+
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'];
|
|
9290
|
+
var NoElement = typeof Element === 'undefined';
|
|
9291
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
9292
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
9293
|
+
return element.getRootNode();
|
|
9294
|
+
} : function (element) {
|
|
9295
|
+
return element.ownerDocument;
|
|
9296
|
+
};
|
|
9269
9297
|
|
|
9270
9298
|
var isInput = function isInput(node) {
|
|
9271
9299
|
return node.tagName === 'INPUT';
|
|
@@ -9282,7 +9310,23 @@
|
|
|
9282
9310
|
return r;
|
|
9283
9311
|
};
|
|
9284
9312
|
|
|
9285
|
-
var
|
|
9313
|
+
var isZeroArea = function isZeroArea(node) {
|
|
9314
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
9315
|
+
width = _node$getBoundingClie.width,
|
|
9316
|
+
height = _node$getBoundingClie.height;
|
|
9317
|
+
|
|
9318
|
+
return width === 0 && height === 0;
|
|
9319
|
+
};
|
|
9320
|
+
|
|
9321
|
+
var isHidden = function isHidden(node, _ref) {
|
|
9322
|
+
var displayCheck = _ref.displayCheck,
|
|
9323
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
9324
|
+
|
|
9325
|
+
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
9326
|
+
// (see notes about this further down), which means we will consider it visible
|
|
9327
|
+
// (this is legacy behavior from a very long way back)
|
|
9328
|
+
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
9329
|
+
// _visibility_ check, not a _display_ check
|
|
9286
9330
|
if (getComputedStyle(node).visibility === 'hidden') {
|
|
9287
9331
|
return true;
|
|
9288
9332
|
}
|
|
@@ -9292,23 +9336,95 @@
|
|
|
9292
9336
|
|
|
9293
9337
|
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
9294
9338
|
return true;
|
|
9295
|
-
}
|
|
9339
|
+
} // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
9340
|
+
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
9341
|
+
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
9342
|
+
// is attached, and the one we need to check if it's in the document or not (because the
|
|
9343
|
+
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
9344
|
+
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
9345
|
+
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
9346
|
+
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
9347
|
+
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
9348
|
+
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
9349
|
+
// tested).
|
|
9350
|
+
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
9351
|
+
// document (per the docs) and while it's a Document-type object, that document does not
|
|
9352
|
+
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
9353
|
+
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
9354
|
+
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
9355
|
+
// node is actually detached.
|
|
9356
|
+
|
|
9357
|
+
|
|
9358
|
+
var nodeRootHost = getRootNode(node).host;
|
|
9359
|
+
var nodeIsAttached = (nodeRootHost === null || nodeRootHost === void 0 ? void 0 : nodeRootHost.ownerDocument.contains(nodeRootHost)) || node.ownerDocument.contains(node);
|
|
9296
9360
|
|
|
9297
9361
|
if (!displayCheck || displayCheck === 'full') {
|
|
9298
|
-
|
|
9299
|
-
if
|
|
9300
|
-
|
|
9362
|
+
if (typeof getShadowRoot === 'function') {
|
|
9363
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
9364
|
+
// 'non-zero-area' fallback
|
|
9365
|
+
var originalNode = node;
|
|
9366
|
+
|
|
9367
|
+
while (node) {
|
|
9368
|
+
var parentElement = node.parentElement;
|
|
9369
|
+
var rootNode = getRootNode(node);
|
|
9370
|
+
|
|
9371
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
9372
|
+
) {
|
|
9373
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
9374
|
+
// fall back to a non-zero-area test
|
|
9375
|
+
return isZeroArea(node);
|
|
9376
|
+
} else if (node.assignedSlot) {
|
|
9377
|
+
// iterate up slot
|
|
9378
|
+
node = node.assignedSlot;
|
|
9379
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
9380
|
+
// cross shadow boundary
|
|
9381
|
+
node = rootNode.host;
|
|
9382
|
+
} else {
|
|
9383
|
+
// iterate up normal dom
|
|
9384
|
+
node = parentElement;
|
|
9385
|
+
}
|
|
9301
9386
|
}
|
|
9302
9387
|
|
|
9303
|
-
node =
|
|
9304
|
-
}
|
|
9388
|
+
node = originalNode;
|
|
9389
|
+
} // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
9390
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
9391
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
9392
|
+
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
9393
|
+
// now we can just test to see if it would normally be visible or not, provided it's
|
|
9394
|
+
// attached to the main document.
|
|
9395
|
+
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
9396
|
+
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
9397
|
+
|
|
9398
|
+
|
|
9399
|
+
if (nodeIsAttached) {
|
|
9400
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
9401
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
9402
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
9403
|
+
// up the hierarchy either
|
|
9404
|
+
return !node.getClientRects().length;
|
|
9405
|
+
} // Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
9406
|
+
// API will __always__ return zero rects (this can happen, for example, if React
|
|
9407
|
+
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
9408
|
+
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
9409
|
+
//
|
|
9410
|
+
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
9411
|
+
// because styles are only computed for nodes that are in the document.
|
|
9412
|
+
//
|
|
9413
|
+
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
9414
|
+
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
9415
|
+
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
9416
|
+
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
9417
|
+
// considering __everything__ to be visible because of the innability to determine styles.
|
|
9418
|
+
|
|
9305
9419
|
} else if (displayCheck === 'non-zero-area') {
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9420
|
+
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
9421
|
+
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
9422
|
+
// client rect, we don't special-case for whether the node is attached or not. In
|
|
9423
|
+
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
9424
|
+
// times, and that includes attached or not.
|
|
9425
|
+
return isZeroArea(node);
|
|
9426
|
+
} // visible, as far as we can tell, or per current `displayCheck` mode
|
|
9309
9427
|
|
|
9310
|
-
return width === 0 && height === 0;
|
|
9311
|
-
}
|
|
9312
9428
|
|
|
9313
9429
|
return false;
|
|
9314
9430
|
}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
@@ -9317,29 +9433,21 @@
|
|
|
9317
9433
|
|
|
9318
9434
|
|
|
9319
9435
|
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
9320
|
-
if (
|
|
9321
|
-
var parentNode = node.parentElement;
|
|
9436
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
9437
|
+
var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>
|
|
9322
9438
|
|
|
9323
9439
|
while (parentNode) {
|
|
9324
9440
|
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
9325
|
-
// look for the first <legend>
|
|
9326
|
-
// <fieldset>: if the node is in that legend, it'll be enabled even
|
|
9327
|
-
// though the fieldset is disabled; otherwise, the node is in a
|
|
9328
|
-
// secondary/subsequent legend, or somewhere else within the fieldset
|
|
9329
|
-
// (however deep nested) and it'll be disabled
|
|
9441
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
9330
9442
|
for (var i = 0; i < parentNode.children.length; i++) {
|
|
9331
|
-
var child = parentNode.children.item(i);
|
|
9443
|
+
var child = parentNode.children.item(i); // when the first <legend> (in document order) is found
|
|
9332
9444
|
|
|
9333
9445
|
if (child.tagName === 'LEGEND') {
|
|
9334
|
-
if
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
// where it is now, it'll be disabled
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
return true;
|
|
9446
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
9447
|
+
// return whether `node` is a descendant of its first <legend>
|
|
9448
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
9341
9449
|
}
|
|
9342
|
-
} // the
|
|
9450
|
+
} // the disabled <fieldset> containing `node` has no <legend>
|
|
9343
9451
|
|
|
9344
9452
|
|
|
9345
9453
|
return true;
|
|
@@ -9355,7 +9463,7 @@
|
|
|
9355
9463
|
};
|
|
9356
9464
|
|
|
9357
9465
|
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
9358
|
-
if (node.disabled || isHiddenInput(node) || isHidden(node, options
|
|
9466
|
+
if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
|
|
9359
9467
|
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
9360
9468
|
return false;
|
|
9361
9469
|
}
|
|
@@ -10747,6 +10855,10 @@
|
|
|
10747
10855
|
handleChange() {
|
|
10748
10856
|
this.$emit("change");
|
|
10749
10857
|
}
|
|
10858
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
10859
|
+
validate() {
|
|
10860
|
+
super.validate(this.control);
|
|
10861
|
+
}
|
|
10750
10862
|
}
|
|
10751
10863
|
__decorate$1([
|
|
10752
10864
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
@@ -10915,6 +11027,10 @@
|
|
|
10915
11027
|
}
|
|
10916
11028
|
this.isUserInput = false;
|
|
10917
11029
|
}
|
|
11030
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
11031
|
+
validate() {
|
|
11032
|
+
super.validate(this.control);
|
|
11033
|
+
}
|
|
10918
11034
|
/**
|
|
10919
11035
|
* Sets the internal value to a valid number between the min and max properties
|
|
10920
11036
|
* @param value - user input
|
|
@@ -12272,6 +12388,9 @@
|
|
|
12272
12388
|
* @internal
|
|
12273
12389
|
*/
|
|
12274
12390
|
this.keypressHandler = (e) => {
|
|
12391
|
+
if (this.readOnly) {
|
|
12392
|
+
return;
|
|
12393
|
+
}
|
|
12275
12394
|
switch (e.key) {
|
|
12276
12395
|
case keyEnter:
|
|
12277
12396
|
case keySpace:
|
|
@@ -12875,6 +12994,10 @@
|
|
|
12875
12994
|
handleChange() {
|
|
12876
12995
|
this.$emit("change");
|
|
12877
12996
|
}
|
|
12997
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
12998
|
+
validate() {
|
|
12999
|
+
super.validate(this.control);
|
|
13000
|
+
}
|
|
12878
13001
|
}
|
|
12879
13002
|
__decorate$1([
|
|
12880
13003
|
attr({ mode: "boolean" })
|
|
@@ -14444,7 +14567,7 @@
|
|
|
14444
14567
|
.withPrefix('nimble')
|
|
14445
14568
|
.register(nimbleAnchoredRegion());
|
|
14446
14569
|
|
|
14447
|
-
|
|
14570
|
+
/******************************************************************************
|
|
14448
14571
|
Copyright (c) Microsoft Corporation.
|
|
14449
14572
|
|
|
14450
14573
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -15267,6 +15390,10 @@
|
|
|
15267
15390
|
name: 'check_dot_16_x_16',
|
|
15268
15391
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle class="cls-1" cx="12.5" cy="11.5" r="1.5"/><path class="cls-2" d="M14 4.693l-8.182 8.182L2 9.057 3.636 7.42l2.25 2.25 6.546-6.545z"/></svg>`
|
|
15269
15392
|
};
|
|
15393
|
+
const checkLarge16X16 = {
|
|
15394
|
+
name: 'check_large_16_x_16',
|
|
15395
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M14 4.693l-8.182 8.182L2 9.057 3.636 7.42l2.25 2.25 6.546-6.545L14 4.693z"/></svg>`
|
|
15396
|
+
};
|
|
15270
15397
|
const circle16X16 = {
|
|
15271
15398
|
name: 'circle_16_x_16',
|
|
15272
15399
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8 2a6 6 0 106 6 6 6 0 00-6-6zm0 9.429A3.429 3.429 0 1111.429 8 3.429 3.429 0 018 11.429z"/></svg>`
|
|
@@ -15399,6 +15526,10 @@
|
|
|
15399
15526
|
name: 'dot_solid_dot_stroke_16_x_16',
|
|
15400
15527
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M7 8a3 3 0 11-3-3 3 3 0 013 3zm5-2a2 2 0 102 2 2.002 2.002 0 00-2-2m0-1a3 3 0 11-3 3 3 3 0 013-3z"/></svg>`
|
|
15401
15528
|
};
|
|
15529
|
+
const dotSolidDotStrokeMeasurement16X16 = {
|
|
15530
|
+
name: 'dot_solid_dot_stroke_measurement_16_x_16',
|
|
15531
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M5 3h1v3H5zM6 4h4v1H6zM10 3h1v3h-1zM7 10a3 3 0 11-6 0 3 3 0 016 0zm5-2c-1.103 0-2 .897-2 2s.897 2 2 2 2-.897 2-2-.897-2-2-2m0-1a3 3 0 110 6 3 3 0 010-6z"/></svg>`
|
|
15532
|
+
};
|
|
15402
15533
|
const download16X16 = {
|
|
15403
15534
|
name: 'download_16_x_16',
|
|
15404
15535
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M14 9v5H2V9h1v4h10V9zm-5.982 2L11 5.1 8.996 6.412 9 2H7v4.387L5 5.1z"/></svg>`
|
|
@@ -15687,6 +15818,10 @@
|
|
|
15687
15818
|
name: 'triangle_16_x_16',
|
|
15688
15819
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8 2L2 14h12zm0 4.875l2.438 4.875H5.585z"/></svg>`
|
|
15689
15820
|
};
|
|
15821
|
+
const triangleFilled16X16 = {
|
|
15822
|
+
name: 'triangle_filled_16_x_16',
|
|
15823
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8 2L2 14h12L8 2z"/></svg>`
|
|
15824
|
+
};
|
|
15690
15825
|
const trueFalseRectangle16X16 = {
|
|
15691
15826
|
name: 'true_false_rectangle_16_x_16',
|
|
15692
15827
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M13.4 3.003H2.6a1.6 1.6 0 00-1.6 1.6v6.8a1.595 1.595 0 001.6 1.594h10.8a1.595 1.595 0 001.6-1.594v-6.8a1.6 1.6 0 00-1.6-1.6zM7.587 6.58H6.141v3.736H4.946V6.58H3.5v-.896h4.087zm4.913 0h-2.13v.862h1.974v.896H10.37v1.978H9.181V5.684H12.5z"/></svg>`
|
|
@@ -18119,6 +18254,17 @@
|
|
|
18119
18254
|
}
|
|
18120
18255
|
registerIcon('icon-check-dot', IconCheckDot);
|
|
18121
18256
|
|
|
18257
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
18258
|
+
/**
|
|
18259
|
+
* The icon component for the 'checkLarge' icon
|
|
18260
|
+
*/
|
|
18261
|
+
class IconCheckLarge extends Icon {
|
|
18262
|
+
constructor() {
|
|
18263
|
+
super(checkLarge16X16);
|
|
18264
|
+
}
|
|
18265
|
+
}
|
|
18266
|
+
registerIcon('icon-check-large', IconCheckLarge);
|
|
18267
|
+
|
|
18122
18268
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
18123
18269
|
/**
|
|
18124
18270
|
* The icon component for the 'circle' icon
|
|
@@ -18482,6 +18628,17 @@
|
|
|
18482
18628
|
}
|
|
18483
18629
|
registerIcon('icon-dot-solid-dot-stroke', IconDotSolidDotStroke);
|
|
18484
18630
|
|
|
18631
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
18632
|
+
/**
|
|
18633
|
+
* The icon component for the 'dotSolidDotStrokeMeasurement' icon
|
|
18634
|
+
*/
|
|
18635
|
+
class IconDotSolidDotStrokeMeasurement extends Icon {
|
|
18636
|
+
constructor() {
|
|
18637
|
+
super(dotSolidDotStrokeMeasurement16X16);
|
|
18638
|
+
}
|
|
18639
|
+
}
|
|
18640
|
+
registerIcon('icon-dot-solid-dot-stroke-measurement', IconDotSolidDotStrokeMeasurement);
|
|
18641
|
+
|
|
18485
18642
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
18486
18643
|
/**
|
|
18487
18644
|
* The icon component for the 'download' icon
|
|
@@ -19263,6 +19420,17 @@
|
|
|
19263
19420
|
}
|
|
19264
19421
|
registerIcon('icon-triangle', IconTriangle);
|
|
19265
19422
|
|
|
19423
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19424
|
+
/**
|
|
19425
|
+
* The icon component for the 'triangleFilled' icon
|
|
19426
|
+
*/
|
|
19427
|
+
class IconTriangleFilled extends Icon {
|
|
19428
|
+
constructor() {
|
|
19429
|
+
super(triangleFilled16X16);
|
|
19430
|
+
}
|
|
19431
|
+
}
|
|
19432
|
+
registerIcon('icon-triangle-filled', IconTriangleFilled);
|
|
19433
|
+
|
|
19266
19434
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
19267
19435
|
/**
|
|
19268
19436
|
* The icon component for the 'trueFalseRectangle' icon
|