@ni/nimble-components 29.7.7 → 29.7.8
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 +31 -13
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +18 -9
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/patterns/dropdown/styles.js +11 -5
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/rich-text/mention-listbox/index.d.ts +12 -1
- package/dist/esm/rich-text/mention-listbox/index.js +15 -6
- package/dist/esm/rich-text/mention-listbox/index.js.map +1 -1
- package/dist/esm/rich-text/mention-listbox/styles.js +3 -2
- package/dist/esm/rich-text/mention-listbox/styles.js.map +1 -1
- package/dist/esm/rich-text/mention-listbox/template.js +2 -0
- package/dist/esm/rich-text/mention-listbox/template.js.map +1 -1
- package/package.json +1 -1
|
@@ -16333,7 +16333,7 @@
|
|
|
16333
16333
|
|
|
16334
16334
|
/**
|
|
16335
16335
|
* Do not edit directly
|
|
16336
|
-
* Generated on Mon, 08 Jul 2024
|
|
16336
|
+
* Generated on Mon, 08 Jul 2024 22:30:19 GMT
|
|
16337
16337
|
*/
|
|
16338
16338
|
|
|
16339
16339
|
const Information100DarkUi = "#a46eff";
|
|
@@ -20747,6 +20747,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20747
20747
|
block: 'block'
|
|
20748
20748
|
};
|
|
20749
20749
|
|
|
20750
|
+
// prettier-ignore
|
|
20750
20751
|
const styles$J = css `
|
|
20751
20752
|
${display('inline-flex')}
|
|
20752
20753
|
|
|
@@ -20858,18 +20859,23 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20858
20859
|
flex-direction: column;
|
|
20859
20860
|
overflow-y: auto;
|
|
20860
20861
|
width: 100%;
|
|
20862
|
+
--ni-private-listbox-visible-option-count: 10.5;
|
|
20863
|
+
--ni-private-listbox-anchor-element-gap: ${smallPadding};
|
|
20861
20864
|
--ni-private-listbox-padding: ${smallPadding};
|
|
20862
20865
|
--ni-private-listbox-filter-height: 0px;
|
|
20863
20866
|
--ni-private-listbox-loading-indicator-height: 0px;
|
|
20864
20867
|
max-height: min(
|
|
20865
20868
|
calc(
|
|
20866
|
-
|
|
20867
|
-
|
|
20868
|
-
|
|
20869
|
+
var(--ni-private-listbox-anchor-element-gap) +
|
|
20870
|
+
2 * ${borderWidth} +
|
|
20871
|
+
var(--ni-private-listbox-padding) +
|
|
20872
|
+
${controlHeight} * var(--ni-private-listbox-visible-option-count) +
|
|
20873
|
+
var(--ni-private-listbox-filter-height) +
|
|
20874
|
+
var(--ni-private-listbox-loading-indicator-height)
|
|
20869
20875
|
),
|
|
20870
20876
|
calc(
|
|
20871
|
-
var(--ni-private-listbox-available-viewport-height) -
|
|
20872
|
-
|
|
20877
|
+
var(--ni-private-listbox-available-viewport-height) -
|
|
20878
|
+
var(--ni-private-listbox-anchor-element-gap)
|
|
20873
20879
|
)
|
|
20874
20880
|
);
|
|
20875
20881
|
box-shadow: ${elevation2BoxShadow};
|
|
@@ -44176,8 +44182,9 @@ img.ProseMirror-separator {
|
|
|
44176
44182
|
}
|
|
44177
44183
|
|
|
44178
44184
|
.listbox {
|
|
44185
|
+
--ni-private-listbox-visible-option-count: 5.5;
|
|
44186
|
+
--ni-private-listbox-anchor-element-gap: 0px;
|
|
44179
44187
|
min-width: ${menuMinWidth};
|
|
44180
|
-
max-height: calc(5.5 * ${controlHeight});
|
|
44181
44188
|
}
|
|
44182
44189
|
`;
|
|
44183
44190
|
|
|
@@ -44201,6 +44208,8 @@ img.ProseMirror-separator {
|
|
|
44201
44208
|
role="listbox"
|
|
44202
44209
|
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
44203
44210
|
?disabled="${x => x.disabled}"
|
|
44211
|
+
style="--ni-private-listbox-available-viewport-height: ${x => x.availableViewportHeight}px;"
|
|
44212
|
+
${ref('listbox')}
|
|
44204
44213
|
>
|
|
44205
44214
|
<slot name="option"
|
|
44206
44215
|
${slotted({ filter: (n) => n instanceof HTMLElement && Listbox.slottedOptionFilter(n), flatten: true, property: 'slottedOptions' })}
|
|
@@ -44230,6 +44239,12 @@ img.ProseMirror-separator {
|
|
|
44230
44239
|
class RichTextMentionListbox extends ListboxElement {
|
|
44231
44240
|
constructor() {
|
|
44232
44241
|
super(...arguments);
|
|
44242
|
+
/**
|
|
44243
|
+
* The space available in the viewport for the listbox when opened.
|
|
44244
|
+
*
|
|
44245
|
+
* @internal
|
|
44246
|
+
*/
|
|
44247
|
+
this.availableViewportHeight = 0;
|
|
44233
44248
|
/**
|
|
44234
44249
|
* @internal
|
|
44235
44250
|
*/
|
|
@@ -44274,6 +44289,8 @@ img.ProseMirror-separator {
|
|
|
44274
44289
|
* @public
|
|
44275
44290
|
*/
|
|
44276
44291
|
show(options) {
|
|
44292
|
+
const listboxTop = options.anchorNode.getBoundingClientRect().bottom;
|
|
44293
|
+
this.availableViewportHeight = Math.trunc(window.innerHeight - listboxTop);
|
|
44277
44294
|
this.filter = options.filter;
|
|
44278
44295
|
this.anchorElement = options.anchorNode;
|
|
44279
44296
|
this.setOpen(true);
|
|
@@ -44299,7 +44316,8 @@ img.ProseMirror-separator {
|
|
|
44299
44316
|
href: this.firstSelectedOption.value,
|
|
44300
44317
|
displayName: this.firstSelectedOption.text
|
|
44301
44318
|
};
|
|
44302
|
-
this
|
|
44319
|
+
this.$emit('mention-selected', mentionDetail);
|
|
44320
|
+
this.setOpen(false);
|
|
44303
44321
|
return true;
|
|
44304
44322
|
}
|
|
44305
44323
|
case keyEscape: {
|
|
@@ -44366,7 +44384,8 @@ img.ProseMirror-separator {
|
|
|
44366
44384
|
href: capturedListOption.value,
|
|
44367
44385
|
displayName: capturedListOption.text
|
|
44368
44386
|
};
|
|
44369
|
-
this
|
|
44387
|
+
this.$emit('mention-selected', mentionDetail);
|
|
44388
|
+
this.setOpen(false);
|
|
44370
44389
|
return true;
|
|
44371
44390
|
}
|
|
44372
44391
|
/**
|
|
@@ -44424,10 +44443,6 @@ img.ProseMirror-separator {
|
|
|
44424
44443
|
});
|
|
44425
44444
|
}
|
|
44426
44445
|
}
|
|
44427
|
-
emitMentionSelected(mentionDetail) {
|
|
44428
|
-
this.$emit('mention-selected', mentionDetail);
|
|
44429
|
-
this.setOpen(false);
|
|
44430
|
-
}
|
|
44431
44446
|
setOpen(value) {
|
|
44432
44447
|
this.open = value;
|
|
44433
44448
|
}
|
|
@@ -44438,6 +44453,9 @@ img.ProseMirror-separator {
|
|
|
44438
44453
|
__decorate$1([
|
|
44439
44454
|
observable
|
|
44440
44455
|
], RichTextMentionListbox.prototype, "region", void 0);
|
|
44456
|
+
__decorate$1([
|
|
44457
|
+
observable
|
|
44458
|
+
], RichTextMentionListbox.prototype, "availableViewportHeight", void 0);
|
|
44441
44459
|
__decorate$1([
|
|
44442
44460
|
observable
|
|
44443
44461
|
], RichTextMentionListbox.prototype, "anchorElement", void 0);
|