@ni/ok-components 1.0.0 → 1.0.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.
|
@@ -98696,10 +98696,57 @@ focus outline in that case.
|
|
|
98696
98696
|
width: 80px;
|
|
98697
98697
|
margin: ${mediumPadding};
|
|
98698
98698
|
}
|
|
98699
|
+
|
|
98700
|
+
.attachments {
|
|
98701
|
+
display: none;
|
|
98702
|
+
}
|
|
98703
|
+
|
|
98704
|
+
.attachments.has-content {
|
|
98705
|
+
display: flex;
|
|
98706
|
+
flex-wrap: wrap;
|
|
98707
|
+
gap: ${mediumPadding};
|
|
98708
|
+
padding: ${mediumPadding};
|
|
98709
|
+
max-height: calc(${controlSlimHeight} * 3 + ${mediumPadding} * 4 );
|
|
98710
|
+
overflow-y: auto;
|
|
98711
|
+
}
|
|
98712
|
+
|
|
98713
|
+
.attachments ::slotted(*) {
|
|
98714
|
+
height: ${controlSlimHeight};
|
|
98715
|
+
}
|
|
98716
|
+
|
|
98717
|
+
.footer {
|
|
98718
|
+
display: flex;
|
|
98719
|
+
flex-direction: row;
|
|
98720
|
+
align-items: flex-end;
|
|
98721
|
+
justify-content: flex-end;
|
|
98722
|
+
}
|
|
98723
|
+
|
|
98724
|
+
.footer-actions {
|
|
98725
|
+
display: none;
|
|
98726
|
+
flex: 1;
|
|
98727
|
+
}
|
|
98728
|
+
|
|
98729
|
+
.footer-actions.has-content {
|
|
98730
|
+
display: flex;
|
|
98731
|
+
align-items: center;
|
|
98732
|
+
flex-wrap: wrap;
|
|
98733
|
+
column-gap: ${mediumPadding};
|
|
98734
|
+
margin: ${mediumPadding};
|
|
98735
|
+
}
|
|
98736
|
+
|
|
98737
|
+
.footer-actions ::slotted(*) {
|
|
98738
|
+
height: ${controlSlimHeight};
|
|
98739
|
+
}
|
|
98699
98740
|
`;
|
|
98700
98741
|
|
|
98701
98742
|
const template$a = html `
|
|
98702
98743
|
<div class="container">
|
|
98744
|
+
<section class="attachments ${x => (x.attachmentsIsEmpty ? '' : 'has-content')}">
|
|
98745
|
+
<slot
|
|
98746
|
+
name="attachments"
|
|
98747
|
+
${slotted({ property: 'slottedAttachmentsElements' })}
|
|
98748
|
+
></slot>
|
|
98749
|
+
</section>
|
|
98703
98750
|
<textarea
|
|
98704
98751
|
${ref('textArea')}
|
|
98705
98752
|
placeholder="${x => x.placeholder}"
|
|
@@ -98709,19 +98756,27 @@ focus outline in that case.
|
|
|
98709
98756
|
@keydown="${(x, c) => x.textAreaKeydownHandler(c.event)}"
|
|
98710
98757
|
@input="${x => x.textAreaInputHandler()}"
|
|
98711
98758
|
></textarea>
|
|
98712
|
-
|
|
98713
|
-
class="
|
|
98714
|
-
|
|
98715
|
-
|
|
98716
|
-
|
|
98717
|
-
|
|
98718
|
-
|
|
98719
|
-
|
|
98720
|
-
|
|
98721
|
-
|
|
98722
|
-
|
|
98723
|
-
|
|
98724
|
-
|
|
98759
|
+
<section class="footer">
|
|
98760
|
+
<section class="footer-actions ${x => (x.footerActionsIsEmpty ? '' : 'has-content')}">
|
|
98761
|
+
<slot
|
|
98762
|
+
name="footer-actions"
|
|
98763
|
+
${slotted({ property: 'slottedFooterActionsElements' })}
|
|
98764
|
+
></slot>
|
|
98765
|
+
</section>
|
|
98766
|
+
<${buttonTag}
|
|
98767
|
+
class="action-button"
|
|
98768
|
+
appearance="block"
|
|
98769
|
+
appearance-variant="${x => (x.processing ? 'primary' : 'accent')}"
|
|
98770
|
+
?disabled=${x => (x.processing ? false : (x.sendDisabled || x.isInputEmpty))}
|
|
98771
|
+
@click=${x => (x.processing ? x.stopButtonClickHandler() : x.sendButtonClickHandler())}
|
|
98772
|
+
tabindex="${x => x.tabIndex}"
|
|
98773
|
+
title=${x => (x.processing ? x.stopButtonLabel : x.sendButtonLabel)}
|
|
98774
|
+
content-hidden
|
|
98775
|
+
>
|
|
98776
|
+
${x => (x.processing ? x.stopButtonLabel : x.sendButtonLabel)}
|
|
98777
|
+
${when(x => x.processing, html `<${iconStopSquareTag} slot="start"></${iconStopSquareTag}>`, html `<${iconPaperPlaneTag} slot="start"></${iconPaperPlaneTag}>`)}
|
|
98778
|
+
</${buttonTag}>
|
|
98779
|
+
</section>
|
|
98725
98780
|
<${iconExclamationMarkTag}
|
|
98726
98781
|
severity="error"
|
|
98727
98782
|
class="error-icon ${x => (x.scrollbarWidth >= 0 ? 'scrollbar-width-calculated' : '')}"
|
|
@@ -98750,8 +98805,18 @@ focus outline in that case.
|
|
|
98750
98805
|
* @internal
|
|
98751
98806
|
*/
|
|
98752
98807
|
this.scrollbarWidth = -1;
|
|
98808
|
+
/** @internal */
|
|
98809
|
+
this.footerActionsIsEmpty = true;
|
|
98810
|
+
/** @internal */
|
|
98811
|
+
this.attachmentsIsEmpty = true;
|
|
98753
98812
|
this.updateScrollbarWidthQueued = false;
|
|
98754
98813
|
}
|
|
98814
|
+
slottedFooterActionsElementsChanged(_prev, next) {
|
|
98815
|
+
this.footerActionsIsEmpty = next === undefined || next.length === 0;
|
|
98816
|
+
}
|
|
98817
|
+
slottedAttachmentsElementsChanged(_prev, next) {
|
|
98818
|
+
this.attachmentsIsEmpty = next === undefined || next.length === 0;
|
|
98819
|
+
}
|
|
98755
98820
|
/**
|
|
98756
98821
|
* @internal
|
|
98757
98822
|
*/
|
|
@@ -98912,6 +98977,18 @@ focus outline in that case.
|
|
|
98912
98977
|
__decorate([
|
|
98913
98978
|
observable
|
|
98914
98979
|
], ChatInput.prototype, "scrollbarWidth", void 0);
|
|
98980
|
+
__decorate([
|
|
98981
|
+
observable
|
|
98982
|
+
], ChatInput.prototype, "footerActionsIsEmpty", void 0);
|
|
98983
|
+
__decorate([
|
|
98984
|
+
observable
|
|
98985
|
+
], ChatInput.prototype, "slottedFooterActionsElements", void 0);
|
|
98986
|
+
__decorate([
|
|
98987
|
+
observable
|
|
98988
|
+
], ChatInput.prototype, "attachmentsIsEmpty", void 0);
|
|
98989
|
+
__decorate([
|
|
98990
|
+
observable
|
|
98991
|
+
], ChatInput.prototype, "slottedAttachmentsElements", void 0);
|
|
98915
98992
|
const sprightChatInput = ChatInput.compose({
|
|
98916
98993
|
baseName: 'chat-input',
|
|
98917
98994
|
template: template$a,
|