@ni/spright-components 6.23.3 → 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 +111 -12
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +4402 -4394
- 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 +3 -3
|
@@ -18627,6 +18627,10 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18627
18627
|
name: 'arrow_partial_rotate_left_16_x_16',
|
|
18628
18628
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 11.988a3.086 3.086 0 0 0 3.143-3.025 3.08 3.08 0 0 0-3.085-3.02v.088l.826 2.067-5.598-2.796L8.884 2.5l-.742 1.932a4.62 4.62 0 0 1 4.572 4.53A4.63 4.63 0 0 1 8 13.5Z" class="cls-1"/></svg>`,
|
|
18629
18629
|
};
|
|
18630
|
+
const arrowRightArrowLeft16X16 = {
|
|
18631
|
+
name: 'arrow_right_arrow_left_16_x_16',
|
|
18632
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M5 4.167h5.173l-.99-2.084L15 4.983 9.182 7.917l.99-2.084H5zm6 6H5.827l.99-2.084L1 11.017l5.818 2.9-.99-2.084H11z"/></svg>`,
|
|
18633
|
+
};
|
|
18630
18634
|
const arrowRightThin16X16 = {
|
|
18631
18635
|
name: 'arrow_right_thin_16_x_16',
|
|
18632
18636
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m7.97 4.37-.68 1.12 3.09 1.86H2v1.3h8.38l-3.09 1.86.68 1.12L14 8z" class="cls-1"/></svg>`,
|
|
@@ -18843,6 +18847,18 @@ Defines an interaction area clip-path that leaves out the severity text so it is
|
|
|
18843
18847
|
name: 'circle_slash_16_x_16',
|
|
18844
18848
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 2a6 6 0 1 0 6 6 6 6 0 0 0-6-6m.075 1.714a4.281 4.281 0 0 1 3.573 6.647L5.714 4.427a4.26 4.26 0 0 1 2.36-.713M3.789 8a4.26 4.26 0 0 1 .713-2.36l5.934 5.933A4.281 4.281 0 0 1 3.789 8" class="cls-1"/></svg>`,
|
|
18845
18849
|
};
|
|
18850
|
+
const circleSparkle16X16 = {
|
|
18851
|
+
name: 'circle_sparkle_16_x_16',
|
|
18852
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 2C4.69 2 2 4.69 2 8s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6m1.138 7.133A3.98 3.98 0 0 0 8.003 11.5a3.98 3.98 0 0 0-1.136-2.37A4 4 0 0 0 4.5 7.998a4 4 0 0 0 2.362-1.131A3.98 3.98 0 0 0 7.997 4.5a3.98 3.98 0 0 0 1.136 2.37A4 4 0 0 0 11.5 8.002a4 4 0 0 0-2.362 1.131"/></svg>`,
|
|
18853
|
+
};
|
|
18854
|
+
const circleSparkleExclamation16X16 = {
|
|
18855
|
+
name: 'circle_sparkle_exclamation_16_x_16',
|
|
18856
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3.29 6H1.93v-.89h1.36zM8.1 2h.01zM3.15 4.56 3.3 1H1.91l.15 3.56zM14.1 8c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-.34.04-.67.09-1h2.09l.04-3.65A6 6 0 0 1 8.106 2 6.005 6.005 0 0 1 14.1 8m-2.6.002A4 4 0 0 1 9.133 6.87 3.98 3.98 0 0 1 7.997 4.5a3.98 3.98 0 0 1-1.135 2.367A4 4 0 0 1 4.5 7.997 4 4 0 0 1 6.867 9.13a3.98 3.98 0 0 1 1.136 2.37 3.98 3.98 0 0 1 1.135-2.367 4 4 0 0 1 2.362-1.13"/></svg>`,
|
|
18857
|
+
};
|
|
18858
|
+
const circleSparkleTriangle16X16 = {
|
|
18859
|
+
name: 'circle_sparkle_triangle_16_x_16',
|
|
18860
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.96 4.975H1.01l1.98-3.96 1.98 3.96zm9.03 3.01c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-.71.13-1.38.35-2.01h4.24l-1.59-3.18c.88-.51 1.91-.81 3-.81 3.31 0 6 2.69 6 6m-2.49.017A4 4 0 0 1 9.133 6.87 3.98 3.98 0 0 1 7.997 4.5a3.98 3.98 0 0 1-1.135 2.367A4 4 0 0 1 4.5 7.997 4 4 0 0 1 6.867 9.13a3.98 3.98 0 0 1 1.136 2.37 3.98 3.98 0 0 1 1.135-2.367 4 4 0 0 1 2.362-1.13"/></svg>`,
|
|
18861
|
+
};
|
|
18846
18862
|
const circleX16X16 = {
|
|
18847
18863
|
name: 'circle_x_16_x_16',
|
|
18848
18864
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 2a6 6 0 1 0 6 6 6 6 0 0 0-6-6m.075 1.714a4.26 4.26 0 0 1 2.409.743l-2.37 2.37-2.4-2.4a4.26 4.26 0 0 1 2.36-.713M4.502 5.64l2.4 2.4-2.37 2.37a4.27 4.27 0 0 1-.03-4.77m3.573 6.647a4.26 4.26 0 0 1-2.31-.685l2.349-2.35 2.322 2.322a4.26 4.26 0 0 1-2.361.713m3.573-1.925L9.326 8.039l2.35-2.349a4.25 4.25 0 0 1-.028 4.67" class="cls-1"/></svg>`,
|
|
@@ -24171,6 +24187,18 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
24171
24187
|
}
|
|
24172
24188
|
registerIconSvg('icon-arrow-partial-rotate-left', IconArrowPartialRotateLeft);
|
|
24173
24189
|
|
|
24190
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
24191
|
+
// See generation source in nimble-components/build/generate-icons
|
|
24192
|
+
/**
|
|
24193
|
+
* The icon component for the 'arrowRightArrowLeft' icon
|
|
24194
|
+
*/
|
|
24195
|
+
class IconArrowRightArrowLeft extends IconSvg {
|
|
24196
|
+
constructor() {
|
|
24197
|
+
super(arrowRightArrowLeft16X16);
|
|
24198
|
+
}
|
|
24199
|
+
}
|
|
24200
|
+
registerIconSvg('icon-arrow-right-arrow-left', IconArrowRightArrowLeft);
|
|
24201
|
+
|
|
24174
24202
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
24175
24203
|
// See generation source in nimble-components/build/generate-icons
|
|
24176
24204
|
/**
|
|
@@ -24797,6 +24825,42 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
24797
24825
|
}
|
|
24798
24826
|
registerIconSvg('icon-circle-slash', IconCircleSlash);
|
|
24799
24827
|
|
|
24828
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
24829
|
+
// See generation source in nimble-components/build/generate-icons
|
|
24830
|
+
/**
|
|
24831
|
+
* The icon component for the 'circleSparkle' icon
|
|
24832
|
+
*/
|
|
24833
|
+
class IconCircleSparkle extends IconSvg {
|
|
24834
|
+
constructor() {
|
|
24835
|
+
super(circleSparkle16X16);
|
|
24836
|
+
}
|
|
24837
|
+
}
|
|
24838
|
+
registerIconSvg('icon-circle-sparkle', IconCircleSparkle);
|
|
24839
|
+
|
|
24840
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
24841
|
+
// See generation source in nimble-components/build/generate-icons
|
|
24842
|
+
/**
|
|
24843
|
+
* The icon component for the 'circleSparkleExclamation' icon
|
|
24844
|
+
*/
|
|
24845
|
+
class IconCircleSparkleExclamation extends IconSvg {
|
|
24846
|
+
constructor() {
|
|
24847
|
+
super(circleSparkleExclamation16X16);
|
|
24848
|
+
}
|
|
24849
|
+
}
|
|
24850
|
+
registerIconSvg('icon-circle-sparkle-exclamation', IconCircleSparkleExclamation);
|
|
24851
|
+
|
|
24852
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
24853
|
+
// See generation source in nimble-components/build/generate-icons
|
|
24854
|
+
/**
|
|
24855
|
+
* The icon component for the 'circleSparkleTriangle' icon
|
|
24856
|
+
*/
|
|
24857
|
+
class IconCircleSparkleTriangle extends IconSvg {
|
|
24858
|
+
constructor() {
|
|
24859
|
+
super(circleSparkleTriangle16X16);
|
|
24860
|
+
}
|
|
24861
|
+
}
|
|
24862
|
+
registerIconSvg('icon-circle-sparkle-triangle', IconCircleSparkleTriangle);
|
|
24863
|
+
|
|
24800
24864
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
24801
24865
|
// See generation source in nimble-components/build/generate-icons
|
|
24802
24866
|
/**
|
|
@@ -26945,7 +27009,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26945
27009
|
${display$1('none')}
|
|
26946
27010
|
`;
|
|
26947
27011
|
|
|
26948
|
-
const supportedLabels$
|
|
27012
|
+
const supportedLabels$2 = {
|
|
26949
27013
|
popupDismiss: popupDismissLabel,
|
|
26950
27014
|
numericDecrement: numericDecrementLabel,
|
|
26951
27015
|
numericIncrement: numericIncrementLabel,
|
|
@@ -26967,7 +27031,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
26967
27031
|
class LabelProviderCore extends LabelProviderBase {
|
|
26968
27032
|
constructor() {
|
|
26969
27033
|
super(...arguments);
|
|
26970
|
-
this.supportedLabels = supportedLabels$
|
|
27034
|
+
this.supportedLabels = supportedLabels$2;
|
|
26971
27035
|
}
|
|
26972
27036
|
}
|
|
26973
27037
|
__decorate([
|
|
@@ -27104,7 +27168,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27104
27168
|
cssCustomPropertyName: null
|
|
27105
27169
|
}).withDefault(tableLabelDefaults.tableGroupRowPlaceholderEmptyLabel);
|
|
27106
27170
|
|
|
27107
|
-
const supportedLabels = {
|
|
27171
|
+
const supportedLabels$1 = {
|
|
27108
27172
|
groupCollapse: tableGroupCollapseLabel,
|
|
27109
27173
|
groupExpand: tableGroupExpandLabel,
|
|
27110
27174
|
rowCollapse: tableRowCollapseLabel,
|
|
@@ -27128,7 +27192,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
27128
27192
|
class LabelProviderTable extends LabelProviderBase {
|
|
27129
27193
|
constructor() {
|
|
27130
27194
|
super(...arguments);
|
|
27131
|
-
this.supportedLabels = supportedLabels;
|
|
27195
|
+
this.supportedLabels = supportedLabels$1;
|
|
27132
27196
|
}
|
|
27133
27197
|
}
|
|
27134
27198
|
__decorate([
|
|
@@ -104657,6 +104721,20 @@ focus outline in that case.
|
|
|
104657
104721
|
}
|
|
104658
104722
|
`;
|
|
104659
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
|
+
|
|
104660
104738
|
const template$e = html `
|
|
104661
104739
|
<div class="container">
|
|
104662
104740
|
<section class="attachments ${x => (x.attachmentsIsEmpty ? '' : 'has-content')}">
|
|
@@ -104688,10 +104766,10 @@ focus outline in that case.
|
|
|
104688
104766
|
?disabled=${x => (x.processing ? false : (x.sendDisabled || x.isInputEmpty))}
|
|
104689
104767
|
@click=${x => (x.processing ? x.stopButtonClickHandler() : x.sendButtonClickHandler())}
|
|
104690
104768
|
tabindex="${x => x.tabIndex}"
|
|
104691
|
-
title=${x => (x.processing ? x
|
|
104769
|
+
title=${x => (x.processing ? chatStopLabel.getValueFor(x) : chatSendLabel.getValueFor(x))}
|
|
104692
104770
|
content-hidden
|
|
104693
104771
|
>
|
|
104694
|
-
${x => (x.processing ? x
|
|
104772
|
+
${x => (x.processing ? chatStopLabel.getValueFor(x) : chatSendLabel.getValueFor(x))}
|
|
104695
104773
|
${when(x => x.processing, html `<${iconStopSquareTag} slot="start"></${iconStopSquareTag}>`, html `<${iconPaperPlaneTag} slot="start"></${iconPaperPlaneTag}>`)}
|
|
104696
104774
|
</${buttonTag}>
|
|
104697
104775
|
</section>
|
|
@@ -104865,12 +104943,6 @@ focus outline in that case.
|
|
|
104865
104943
|
__decorate([
|
|
104866
104944
|
attr
|
|
104867
104945
|
], ChatInput.prototype, "placeholder", void 0);
|
|
104868
|
-
__decorate([
|
|
104869
|
-
attr({ attribute: 'send-button-label' })
|
|
104870
|
-
], ChatInput.prototype, "sendButtonLabel", void 0);
|
|
104871
|
-
__decorate([
|
|
104872
|
-
attr({ attribute: 'stop-button-label' })
|
|
104873
|
-
], ChatInput.prototype, "stopButtonLabel", void 0);
|
|
104874
104946
|
__decorate([
|
|
104875
104947
|
attr
|
|
104876
104948
|
], ChatInput.prototype, "value", void 0);
|
|
@@ -105851,6 +105923,33 @@ focus outline in that case.
|
|
|
105851
105923
|
.withPrefix('spright')
|
|
105852
105924
|
.register(sprightIconWorkItemWrenchHammer());
|
|
105853
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
|
+
|
|
105854
105953
|
const styles = css `
|
|
105855
105954
|
${display('inline-block')}
|
|
105856
105955
|
|