@ni/nimble-components 31.0.0 → 31.1.1
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/dist/all-components-bundle.js +48 -21
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3046 -3032
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/combobox/index.js +1 -2
- package/dist/esm/combobox/index.js.map +1 -1
- package/dist/esm/combobox/template.js +3 -0
- package/dist/esm/combobox/template.js.map +1 -1
- package/dist/esm/list-option/index.js +2 -4
- package/dist/esm/list-option/index.js.map +1 -1
- package/dist/esm/list-option-group/index.js +2 -5
- package/dist/esm/list-option-group/index.js.map +1 -1
- package/dist/esm/patterns/dropdown/styles.js +16 -6
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/select/index.d.ts +4 -0
- package/dist/esm/select/index.js +11 -0
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/select/template.js +4 -0
- package/dist/esm/select/template.js.map +1 -1
- package/dist/esm/table-column/base/index.js +2 -4
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/utilities/models/slot-text-content.d.ts +4 -0
- package/dist/esm/utilities/models/slot-text-content.js +11 -0
- package/dist/esm/utilities/models/slot-text-content.js.map +1 -0
- package/package.json +1 -1
|
@@ -16032,7 +16032,7 @@
|
|
|
16032
16032
|
|
|
16033
16033
|
/**
|
|
16034
16034
|
* Do not edit directly
|
|
16035
|
-
* Generated on
|
|
16035
|
+
* Generated on Tue, 06 Aug 2024 15:57:06 GMT
|
|
16036
16036
|
*/
|
|
16037
16037
|
|
|
16038
16038
|
const Information100DarkUi = "#a46eff";
|
|
@@ -20528,9 +20528,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20528
20528
|
:host {
|
|
20529
20529
|
color: ${bodyFontColor};
|
|
20530
20530
|
font: ${bodyFont};
|
|
20531
|
-
height: ${controlHeight};
|
|
20532
20531
|
position: relative;
|
|
20533
|
-
|
|
20532
|
+
flex-direction: column;
|
|
20533
|
+
justify-content: flex-start;
|
|
20534
20534
|
${userSelectNone}
|
|
20535
20535
|
min-width: ${menuMinWidth};
|
|
20536
20536
|
outline: none;
|
|
@@ -20546,7 +20546,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20546
20546
|
bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));
|
|
20547
20547
|
width: 0px;
|
|
20548
20548
|
height: 0px;
|
|
20549
|
-
|
|
20549
|
+
align-self: center;
|
|
20550
20550
|
border-bottom: ${borderHoverColor}
|
|
20551
20551
|
var(--ni-private-focus-indicator-width) solid;
|
|
20552
20552
|
transition: width ${smallDelay} ease-in;
|
|
@@ -20572,7 +20572,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20572
20572
|
bottom: calc(-1 * ${borderWidth});
|
|
20573
20573
|
width: 0px;
|
|
20574
20574
|
height: 0px;
|
|
20575
|
-
|
|
20575
|
+
align-self: center;
|
|
20576
20576
|
border-bottom: ${borderHoverColor}
|
|
20577
20577
|
var(--ni-private-hover-indicator-width) solid;
|
|
20578
20578
|
transition: width ${smallDelay} ease-in;
|
|
@@ -20597,12 +20597,22 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20597
20597
|
width: 0px;
|
|
20598
20598
|
}
|
|
20599
20599
|
|
|
20600
|
+
.label {
|
|
20601
|
+
display: flex;
|
|
20602
|
+
color: ${controlLabelFontColor};
|
|
20603
|
+
font: ${controlLabelFont};
|
|
20604
|
+
}
|
|
20605
|
+
|
|
20606
|
+
:host([disabled]) .label {
|
|
20607
|
+
color: ${controlLabelDisabledFontColor};
|
|
20608
|
+
}
|
|
20609
|
+
|
|
20600
20610
|
.control {
|
|
20601
20611
|
align-items: center;
|
|
20602
20612
|
cursor: pointer;
|
|
20603
20613
|
display: flex;
|
|
20604
|
-
min-height: 100%;
|
|
20605
20614
|
width: 100%;
|
|
20615
|
+
height: ${controlHeight};
|
|
20606
20616
|
border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
|
|
20607
20617
|
background-color: transparent;
|
|
20608
20618
|
padding: ${borderWidth};
|
|
@@ -20975,6 +20985,9 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20975
20985
|
@focusout="${(x, c) => x.focusoutHandler(c.event)}"
|
|
20976
20986
|
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
20977
20987
|
>
|
|
20988
|
+
<label part="label" class="label">
|
|
20989
|
+
<slot></slot>
|
|
20990
|
+
</label>
|
|
20978
20991
|
<div class="control" part="control" ${ref('controlWrapper')}>
|
|
20979
20992
|
${startSlotTemplate(context, definition)}
|
|
20980
20993
|
<slot name="control">
|
|
@@ -21739,8 +21752,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
21739
21752
|
@keydown="${(x, c) => x.toggleButtonKeyDownHandler(c.event)}"
|
|
21740
21753
|
class="dropdown-button"
|
|
21741
21754
|
part="button"
|
|
21742
|
-
aria-
|
|
21743
|
-
aria-expanded="${x => x.open}"
|
|
21755
|
+
aria-hidden="true"
|
|
21744
21756
|
tabindex="-1"
|
|
21745
21757
|
>
|
|
21746
21758
|
<${iconArrowExpanderDownTag}
|
|
@@ -25021,6 +25033,17 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
25021
25033
|
</template>
|
|
25022
25034
|
`;
|
|
25023
25035
|
|
|
25036
|
+
/**
|
|
25037
|
+
* Finds all text content within a slot and returns it as a space-delimited string.
|
|
25038
|
+
*/
|
|
25039
|
+
const slotTextContent = (slot) => {
|
|
25040
|
+
return slot
|
|
25041
|
+
.assignedNodes()
|
|
25042
|
+
.map(node => node.textContent?.trim())
|
|
25043
|
+
.filter(content => content !== undefined && content !== '')
|
|
25044
|
+
.join(' ');
|
|
25045
|
+
};
|
|
25046
|
+
|
|
25024
25047
|
/**
|
|
25025
25048
|
* A nimble-styled HTML listbox option
|
|
25026
25049
|
*/
|
|
@@ -25058,10 +25081,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
25058
25081
|
}
|
|
25059
25082
|
/** @internal */
|
|
25060
25083
|
get elementTextContent() {
|
|
25061
|
-
return this.contentSlot
|
|
25062
|
-
.assignedNodes()
|
|
25063
|
-
.map(node => node.textContent?.trim())
|
|
25064
|
-
.join(' ');
|
|
25084
|
+
return slotTextContent(this.contentSlot);
|
|
25065
25085
|
}
|
|
25066
25086
|
connectedCallback() {
|
|
25067
25087
|
super.connectedCallback();
|
|
@@ -25242,11 +25262,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
25242
25262
|
if (!this.$fastController.isConnected) {
|
|
25243
25263
|
return '';
|
|
25244
25264
|
}
|
|
25245
|
-
|
|
25246
|
-
return nodes
|
|
25247
|
-
.filter(node => node.textContent?.trim() !== '')
|
|
25248
|
-
.map(node => node.textContent?.trim())
|
|
25249
|
-
.join(' ');
|
|
25265
|
+
return slotTextContent(this.labelSlot);
|
|
25250
25266
|
}
|
|
25251
25267
|
/**
|
|
25252
25268
|
* @internal
|
|
@@ -60366,6 +60382,7 @@ img.ProseMirror-separator {
|
|
|
60366
60382
|
aria-disabled="${x => x.ariaDisabled}"
|
|
60367
60383
|
aria-expanded="${x => x.ariaExpanded}"
|
|
60368
60384
|
aria-haspopup="${x => (x.collapsible ? 'listbox' : null)}"
|
|
60385
|
+
aria-label="${x => x.labelContent}"
|
|
60369
60386
|
aria-multiselectable="${x => x.ariaMultiSelectable}"
|
|
60370
60387
|
?open="${x => x.open}"
|
|
60371
60388
|
role="combobox"
|
|
@@ -60377,6 +60394,9 @@ img.ProseMirror-separator {
|
|
|
60377
60394
|
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
60378
60395
|
@mousedown="${(x, c) => x.mousedownHandler(c.event)}"
|
|
60379
60396
|
>
|
|
60397
|
+
<label part="label" class="label" aria-hidden="true">
|
|
60398
|
+
<slot ${ref('labelSlot')}></slot>
|
|
60399
|
+
</label>
|
|
60380
60400
|
${when(x => x.collapsible, html `
|
|
60381
60401
|
<div
|
|
60382
60402
|
class="control"
|
|
@@ -60562,6 +60582,13 @@ img.ProseMirror-separator {
|
|
|
60562
60582
|
get collapsible() {
|
|
60563
60583
|
return !(this.multiple || typeof this.size === 'number');
|
|
60564
60584
|
}
|
|
60585
|
+
/** @internal */
|
|
60586
|
+
get labelContent() {
|
|
60587
|
+
if (!this.$fastController.isConnected) {
|
|
60588
|
+
return '';
|
|
60589
|
+
}
|
|
60590
|
+
return slotTextContent(this.labelSlot);
|
|
60591
|
+
}
|
|
60565
60592
|
/**
|
|
60566
60593
|
* @internal
|
|
60567
60594
|
*/
|
|
@@ -61527,6 +61554,9 @@ img.ProseMirror-separator {
|
|
|
61527
61554
|
__decorate$1([
|
|
61528
61555
|
volatile
|
|
61529
61556
|
], Select.prototype, "collapsible", null);
|
|
61557
|
+
__decorate$1([
|
|
61558
|
+
volatile
|
|
61559
|
+
], Select.prototype, "labelContent", null);
|
|
61530
61560
|
__decorate$1([
|
|
61531
61561
|
volatile
|
|
61532
61562
|
], Select.prototype, "displayValue", null);
|
|
@@ -65463,10 +65493,7 @@ img.ProseMirror-separator {
|
|
|
65463
65493
|
}
|
|
65464
65494
|
/** @internal */
|
|
65465
65495
|
get headerTextContent() {
|
|
65466
|
-
return this.contentSlot
|
|
65467
|
-
.assignedNodes()
|
|
65468
|
-
.map(node => node.textContent?.trim())
|
|
65469
|
-
.join(' ');
|
|
65496
|
+
return slotTextContent(this.contentSlot);
|
|
65470
65497
|
}
|
|
65471
65498
|
connectedCallback() {
|
|
65472
65499
|
super.connectedCallback();
|