@ni/spright-components 6.2.1 → 6.3.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 +20 -0
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +33 -24
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/chat/conversation/index.d.ts +1 -0
- package/dist/esm/chat/conversation/index.js +6 -1
- package/dist/esm/chat/conversation/index.js.map +1 -1
- package/dist/esm/chat/conversation/styles.js +9 -0
- package/dist/esm/chat/conversation/styles.js.map +1 -1
- package/dist/esm/chat/conversation/types.d.ts +9 -0
- package/dist/esm/chat/conversation/types.js +9 -0
- package/dist/esm/chat/conversation/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -15201,6 +15201,11 @@ const SJ=t=>`${Hs(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
|
|
|
15201
15201
|
border: ${Vl} solid ${dl};
|
|
15202
15202
|
}
|
|
15203
15203
|
|
|
15204
|
+
:host([appearance='overlay']) {
|
|
15205
|
+
background: none;
|
|
15206
|
+
border-color: transparent;
|
|
15207
|
+
}
|
|
15208
|
+
|
|
15204
15209
|
.messages {
|
|
15205
15210
|
flex: 1;
|
|
15206
15211
|
display: flex;
|
|
@@ -15213,6 +15218,10 @@ const SJ=t=>`${Hs(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
|
|
|
15213
15218
|
overflow-y: auto;
|
|
15214
15219
|
}
|
|
15215
15220
|
|
|
15221
|
+
:host([appearance='overlay']) .messages {
|
|
15222
|
+
background: none;
|
|
15223
|
+
}
|
|
15224
|
+
|
|
15216
15225
|
.input {
|
|
15217
15226
|
padding: ${Vl} ${Bl} ${Bl}
|
|
15218
15227
|
${Bl};
|
|
@@ -15227,11 +15236,11 @@ const SJ=t=>`${Hs(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
|
|
|
15227
15236
|
<slot name="input" ${ie({property:"slottedInputElements"})}>
|
|
15228
15237
|
</slot>
|
|
15229
15238
|
</div>
|
|
15230
|
-
|
|
15231
|
-
class
|
|
15232
|
-
const
|
|
15233
|
-
Di.getOrCreate().withPrefix("spright").register(
|
|
15234
|
-
const
|
|
15239
|
+
`,MJ={default:void 0}
|
|
15240
|
+
class $J extends je{constructor(){super(...arguments),this.appearance=MJ.default,this.inputEmpty=!0}slottedInputElementsChanged(t,e){this.inputEmpty=!e?.length}}t([ft],$J.prototype,"appearance",void 0),t([C],$J.prototype,"inputEmpty",void 0),t([C],$J.prototype,"slottedInputElements",void 0)
|
|
15241
|
+
const DJ=$J.compose({baseName:"chat-conversation",template:IJ,styles:_J})
|
|
15242
|
+
Di.getOrCreate().withPrefix("spright").register(DJ())
|
|
15243
|
+
const EJ=Mt`
|
|
15235
15244
|
${SJ("flex")}
|
|
15236
15245
|
|
|
15237
15246
|
:host {
|
|
@@ -15305,7 +15314,7 @@ const DJ=Mt`
|
|
|
15305
15314
|
width: 80px;
|
|
15306
15315
|
margin: ${Ll};
|
|
15307
15316
|
}
|
|
15308
|
-
`,
|
|
15317
|
+
`,AJ=Q`
|
|
15309
15318
|
<div class="container">
|
|
15310
15319
|
<textarea
|
|
15311
15320
|
${Ut("textArea")}
|
|
@@ -15329,12 +15338,12 @@ const DJ=Mt`
|
|
|
15329
15338
|
<${ob} slot="start"><${ob}/>
|
|
15330
15339
|
</${zh}>
|
|
15331
15340
|
</div>`
|
|
15332
|
-
class
|
|
15341
|
+
class OJ extends je{constructor(){super(...arguments),this.value="",this.disableSendButton=!0}textAreaKeydownHandler(t){return!(t.key===dn&&!t.shiftKey)||(this.sendButtonClickHandler(),!1)}textAreaInputHandler(){this.value=this.textArea.value,this.disableSendButton=this.shouldDisableSendButton()}valueChanged(){this.textArea&&(this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton())}connectedCallback(){super.connectedCallback(),this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton()}sendButtonClickHandler(){if(this.shouldDisableSendButton())return
|
|
15333
15342
|
const t={text:this.textArea.value}
|
|
15334
|
-
this.resetInput(),this.$emit("send",t)}shouldDisableSendButton(){return 0===this.textArea.value.length}resetInput(){this.value="",this.disableSendButton=!0,this.textArea&&(this.textArea.value="",this.textArea.focus())}}t([ft],
|
|
15335
|
-
const OJ
|
|
15336
|
-
Di.getOrCreate().withPrefix("spright").register(
|
|
15337
|
-
const
|
|
15343
|
+
this.resetInput(),this.$emit("send",t)}shouldDisableSendButton(){return 0===this.textArea.value.length}resetInput(){this.value="",this.disableSendButton=!0,this.textArea&&(this.textArea.value="",this.textArea.focus())}}t([ft],OJ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],OJ.prototype,"sendButtonLabel",void 0),t([ft],OJ.prototype,"value",void 0),t([ft({attribute:"tabindex",converter:ut})],OJ.prototype,"tabIndex",void 0),t([C],OJ.prototype,"textArea",void 0),t([C],OJ.prototype,"disableSendButton",void 0)
|
|
15344
|
+
const TJ=OJ.compose({baseName:"chat-input",template:AJ,styles:EJ,shadowOptions:{delegatesFocus:!0}})
|
|
15345
|
+
Di.getOrCreate().withPrefix("spright").register(TJ())
|
|
15346
|
+
const RJ={system:void 0,outbound:"outbound",inbound:"inbound"},FJ=Mt`
|
|
15338
15347
|
${SJ("flex")}
|
|
15339
15348
|
|
|
15340
15349
|
:host {
|
|
@@ -15348,11 +15357,11 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
|
|
|
15348
15357
|
color: ${td};
|
|
15349
15358
|
}
|
|
15350
15359
|
|
|
15351
|
-
:host([message-type='${
|
|
15360
|
+
:host([message-type='${RJ.outbound}']) {
|
|
15352
15361
|
justify-content: flex-end;
|
|
15353
15362
|
}
|
|
15354
15363
|
|
|
15355
|
-
:host([message-type='${
|
|
15364
|
+
:host([message-type='${RJ.inbound}']) {
|
|
15356
15365
|
justify-content: flex-start;
|
|
15357
15366
|
}
|
|
15358
15367
|
|
|
@@ -15372,7 +15381,7 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
|
|
|
15372
15381
|
overflow-x: auto;
|
|
15373
15382
|
}
|
|
15374
15383
|
|
|
15375
|
-
:host([message-type='${
|
|
15384
|
+
:host([message-type='${RJ.outbound}']) .message-content {
|
|
15376
15385
|
background: ${ul};
|
|
15377
15386
|
border: ${Vl} solid ${Cl};
|
|
15378
15387
|
border-radius: ${Ll} ${Ll} 0px ${Ll};
|
|
@@ -15383,7 +15392,7 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
|
|
|
15383
15392
|
display: none;
|
|
15384
15393
|
}
|
|
15385
15394
|
|
|
15386
|
-
:host([message-type='${
|
|
15395
|
+
:host([message-type='${RJ.inbound}'])
|
|
15387
15396
|
.footer-actions.has-content {
|
|
15388
15397
|
display: flex;
|
|
15389
15398
|
column-gap: ${Bl};
|
|
@@ -15401,14 +15410,14 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
|
|
|
15401
15410
|
display: none;
|
|
15402
15411
|
}
|
|
15403
15412
|
|
|
15404
|
-
:host([message-type='${
|
|
15413
|
+
:host([message-type='${RJ.inbound}']) .end {
|
|
15405
15414
|
display: flex;
|
|
15406
15415
|
column-gap: ${Bl};
|
|
15407
15416
|
margin-top: ${zl};
|
|
15408
15417
|
}
|
|
15409
15418
|
`
|
|
15410
|
-
class
|
|
15411
|
-
const NJ
|
|
15419
|
+
class NJ extends je{constructor(){super(...arguments),this.messageType=RJ.system,this.footerActionsIsEmpty=!0}slottedFooterActionsElementsChanged(t,e){this.footerActionsIsEmpty=!e?.length}}t([ft({attribute:"message-type"})],NJ.prototype,"messageType",void 0),t([C],NJ.prototype,"footerActionsIsEmpty",void 0),t([C],NJ.prototype,"slottedFooterActionsElements",void 0),Ze(NJ,re)
|
|
15420
|
+
const LJ=NJ.compose({baseName:"chat-message",template:(t,e)=>Q`
|
|
15412
15421
|
<div class="container">
|
|
15413
15422
|
${le(0,e)}
|
|
15414
15423
|
<section class="message-content">
|
|
@@ -15422,9 +15431,9 @@ const NJ=FJ.compose({baseName:"chat-message",template:(t,e)=>Q`
|
|
|
15422
15431
|
</section>
|
|
15423
15432
|
${ae(0,e)}
|
|
15424
15433
|
</div>
|
|
15425
|
-
`,styles:
|
|
15426
|
-
Di.getOrCreate().withPrefix("spright").register(
|
|
15427
|
-
const
|
|
15434
|
+
`,styles:FJ})
|
|
15435
|
+
Di.getOrCreate().withPrefix("spright").register(LJ())
|
|
15436
|
+
const BJ=Mt`
|
|
15428
15437
|
${SJ("inline-block")}
|
|
15429
15438
|
|
|
15430
15439
|
:host {
|
|
@@ -15447,7 +15456,7 @@ const LJ=Mt`
|
|
|
15447
15456
|
:host([disabled]) slot {
|
|
15448
15457
|
color: ${ed};
|
|
15449
15458
|
}
|
|
15450
|
-
`,
|
|
15451
|
-
const
|
|
15452
|
-
Di.getOrCreate().withPrefix("spright").register(
|
|
15459
|
+
`,zJ=Q`<slot></slot>`
|
|
15460
|
+
const VJ=class extends je{}.compose({baseName:"rectangle",template:zJ,styles:BJ})
|
|
15461
|
+
Di.getOrCreate().withPrefix("spright").register(VJ())}()
|
|
15453
15462
|
//# sourceMappingURL=all-components-bundle.min.js.map
|