@ni/spright-components 6.24.0 → 7.0.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/dist/all-components-bundle.js +47 -12
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +87 -83
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/custom-elements.json +141 -30
- package/dist/custom-elements.md +44 -20
- package/dist/esm/all-components.d.ts +1 -0
- package/dist/esm/all-components.js +1 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/chat/input/index.d.ts +0 -2
- package/dist/esm/chat/input/index.js +0 -6
- package/dist/esm/chat/input/index.js.map +1 -1
- package/dist/esm/chat/input/template.js +3 -2
- package/dist/esm/chat/input/template.js.map +1 -1
- package/dist/esm/label-provider/chat/index.d.ts +23 -0
- package/dist/esm/label-provider/chat/index.js +34 -0
- package/dist/esm/label-provider/chat/index.js.map +1 -0
- package/dist/esm/label-provider/chat/label-token-defaults.d.ts +6 -0
- package/dist/esm/label-provider/chat/label-token-defaults.js +5 -0
- package/dist/esm/label-provider/chat/label-token-defaults.js.map +1 -0
- package/dist/esm/label-provider/chat/label-tokens.d.ts +3 -0
- package/dist/esm/label-provider/chat/label-tokens.js +11 -0
- package/dist/esm/label-provider/chat/label-tokens.js.map +1 -0
- package/package.json +1 -1
|
@@ -27009,7 +27009,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27009
27009
|
${display$1('none')}
|
|
27010
27010
|
`;
|
|
27011
27011
|
|
|
27012
|
-
const supportedLabels$
|
|
27012
|
+
const supportedLabels$2 = {
|
|
27013
27013
|
popupDismiss: popupDismissLabel,
|
|
27014
27014
|
numericDecrement: numericDecrementLabel,
|
|
27015
27015
|
numericIncrement: numericIncrementLabel,
|
|
@@ -27031,7 +27031,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27031
27031
|
class LabelProviderCore extends LabelProviderBase {
|
|
27032
27032
|
constructor() {
|
|
27033
27033
|
super(...arguments);
|
|
27034
|
-
this.supportedLabels = supportedLabels$
|
|
27034
|
+
this.supportedLabels = supportedLabels$2;
|
|
27035
27035
|
}
|
|
27036
27036
|
}
|
|
27037
27037
|
__decorate([
|
|
@@ -27168,7 +27168,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27168
27168
|
cssCustomPropertyName: null
|
|
27169
27169
|
}).withDefault(tableLabelDefaults.tableGroupRowPlaceholderEmptyLabel);
|
|
27170
27170
|
|
|
27171
|
-
const supportedLabels = {
|
|
27171
|
+
const supportedLabels$1 = {
|
|
27172
27172
|
groupCollapse: tableGroupCollapseLabel,
|
|
27173
27173
|
groupExpand: tableGroupExpandLabel,
|
|
27174
27174
|
rowCollapse: tableRowCollapseLabel,
|
|
@@ -27192,7 +27192,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27192
27192
|
class LabelProviderTable extends LabelProviderBase {
|
|
27193
27193
|
constructor() {
|
|
27194
27194
|
super(...arguments);
|
|
27195
|
-
this.supportedLabels = supportedLabels;
|
|
27195
|
+
this.supportedLabels = supportedLabels$1;
|
|
27196
27196
|
}
|
|
27197
27197
|
}
|
|
27198
27198
|
__decorate([
|
|
@@ -104721,6 +104721,20 @@ focus outline in that case.
|
|
|
104721
104721
|
}
|
|
104722
104722
|
`;
|
|
104723
104723
|
|
|
104724
|
+
const chatLabelDefaults = {
|
|
104725
|
+
chatSendLabel: 'Send',
|
|
104726
|
+
chatStopLabel: 'Stop'
|
|
104727
|
+
};
|
|
104728
|
+
|
|
104729
|
+
const chatSendLabel = DesignToken.create({
|
|
104730
|
+
name: 'chat-send-label',
|
|
104731
|
+
cssCustomPropertyName: null
|
|
104732
|
+
}).withDefault(chatLabelDefaults.chatSendLabel);
|
|
104733
|
+
const chatStopLabel = DesignToken.create({
|
|
104734
|
+
name: 'chat-stop-label',
|
|
104735
|
+
cssCustomPropertyName: null
|
|
104736
|
+
}).withDefault(chatLabelDefaults.chatStopLabel);
|
|
104737
|
+
|
|
104724
104738
|
const template$e = html `
|
|
104725
104739
|
<div class="container">
|
|
104726
104740
|
<section class="attachments ${x => (x.attachmentsIsEmpty ? '' : 'has-content')}">
|
|
@@ -104752,10 +104766,10 @@ focus outline in that case.
|
|
|
104752
104766
|
?disabled=${x => (x.processing ? false : (x.sendDisabled || x.isInputEmpty))}
|
|
104753
104767
|
@click=${x => (x.processing ? x.stopButtonClickHandler() : x.sendButtonClickHandler())}
|
|
104754
104768
|
tabindex="${x => x.tabIndex}"
|
|
104755
|
-
title=${x => (x.processing ? x
|
|
104769
|
+
title=${x => (x.processing ? chatStopLabel.getValueFor(x) : chatSendLabel.getValueFor(x))}
|
|
104756
104770
|
content-hidden
|
|
104757
104771
|
>
|
|
104758
|
-
${x => (x.processing ? x
|
|
104772
|
+
${x => (x.processing ? chatStopLabel.getValueFor(x) : chatSendLabel.getValueFor(x))}
|
|
104759
104773
|
${when(x => x.processing, html `<${iconStopSquareTag} slot="start"></${iconStopSquareTag}>`, html `<${iconPaperPlaneTag} slot="start"></${iconPaperPlaneTag}>`)}
|
|
104760
104774
|
</${buttonTag}>
|
|
104761
104775
|
</section>
|
|
@@ -104929,12 +104943,6 @@ focus outline in that case.
|
|
|
104929
104943
|
__decorate([
|
|
104930
104944
|
attr
|
|
104931
104945
|
], ChatInput.prototype, "placeholder", void 0);
|
|
104932
|
-
__decorate([
|
|
104933
|
-
attr({ attribute: 'send-button-label' })
|
|
104934
|
-
], ChatInput.prototype, "sendButtonLabel", void 0);
|
|
104935
|
-
__decorate([
|
|
104936
|
-
attr({ attribute: 'stop-button-label' })
|
|
104937
|
-
], ChatInput.prototype, "stopButtonLabel", void 0);
|
|
104938
104946
|
__decorate([
|
|
104939
104947
|
attr
|
|
104940
104948
|
], ChatInput.prototype, "value", void 0);
|
|
@@ -105915,6 +105923,33 @@ focus outline in that case.
|
|
|
105915
105923
|
.withPrefix('spright')
|
|
105916
105924
|
.register(sprightIconWorkItemWrenchHammer());
|
|
105917
105925
|
|
|
105926
|
+
const supportedLabels = {
|
|
105927
|
+
send: chatSendLabel,
|
|
105928
|
+
stop: chatStopLabel
|
|
105929
|
+
};
|
|
105930
|
+
/**
|
|
105931
|
+
* Label provider for Spright chat components
|
|
105932
|
+
*/
|
|
105933
|
+
class LabelProviderChat extends LabelProviderBase {
|
|
105934
|
+
constructor() {
|
|
105935
|
+
super(...arguments);
|
|
105936
|
+
this.supportedLabels = supportedLabels;
|
|
105937
|
+
}
|
|
105938
|
+
}
|
|
105939
|
+
__decorate([
|
|
105940
|
+
attr
|
|
105941
|
+
], LabelProviderChat.prototype, "send", void 0);
|
|
105942
|
+
__decorate([
|
|
105943
|
+
attr
|
|
105944
|
+
], LabelProviderChat.prototype, "stop", void 0);
|
|
105945
|
+
const sprightLabelProviderChat = LabelProviderChat.compose({
|
|
105946
|
+
baseName: 'label-provider-chat',
|
|
105947
|
+
styles: styles$X
|
|
105948
|
+
});
|
|
105949
|
+
DesignSystem.getOrCreate()
|
|
105950
|
+
.withPrefix('spright')
|
|
105951
|
+
.register(sprightLabelProviderChat());
|
|
105952
|
+
|
|
105918
105953
|
const styles = css `
|
|
105919
105954
|
${display('inline-block')}
|
|
105920
105955
|
|